PSoC™ 5, 3 & 1 Forum Discussions
text.format{('custom.tabs.no.results')}
Hi everyone;
I just changed my project to psoc creator 3.2 (3.0 to 3.2).
When I was on 3.0 I was able to use
sprintf(buf,"my Float = %f\n\r", myFloat);
UART_1_PutString(buf)
with these linker's parameters in attachments.
Recently I changed to 3.2 creator, and now I'm not able to display float through my UART, I try to change the linker but nothing works.
I saw this post :
https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=printf+float+psoc+5
But I don"t understand how to and where change heap size to 0x200 and to add custom parameter to linker I just ahve to right in the command --> line -u_printf_float ??
Thank you very much
Show LessSimple question I've looked at several different ways. Can someone look over the code below and help me understand what I'm doing wrong? I'm recieving the warning below and the Array is not functional. It has to be something simple I'm not seeing. Any help would be greatly appreciated.
"M0121: variable 'Input_Array' set but not used [-Wunused-but-set-variable]
int main()
{
int16 x;
uint8 Input_ADC;
uint8 ADC_Result =0;
uint8 Input_Array[16];
uint8 Input_Channel =0;
CyGlobalIntEnable; /* Enable global interrupts. */
ADC_SAR_1_Start();
ADC_SAR_1_IRQ_Enable();
M_4_Write(1); // enable external analog mux
while (x<3000) // delay before using
x++; //
x=0;
for(;;)
{
Control_Reg_1_Write (Input_Channel); // set channel external mux
while (x<3000) // Delay Before Conversion
x++;
x=0;
while (Input_Channel<16) // scan routine
{
ADC_SAR_1_StartConvert(); // Start Conversion
if(ADC_SAR_1_IsEndConversion(ADC_SAR_1_WAIT_FOR_RESULT));
{
ADC_Result = ADC_SAR_1_GetResult8();
Input_Array[Input_Channel] = ADC_Result;
Input_Channel++;
Control_Reg_1_Write (Input_Channel);
while (x<3000) // Delay Before Conversion
x++; //
x=0;
}
}
}// end for
}// end main
Show LessHi,
I'm working since many time on PSoC5LP and I'm wondering if there is the possibility to retrieve an existing firmware (as hex file) on PSoC using the programmer or similar, before flashing the new one. Could anyone help me ?
Regards
Show LessHi ,
I am trying to make I2C as a SMBUS Master . I am facing following issues
1. Removal insert of SMBUS slaves make s I2C interfaces to get stuck .- Reason - In ISR I2C master is waiiting for configured number of Slave replies .
2. To avoid above issue , we tried Manual mode of I2C interfaces , But now the problem is getting stuck in thye while loop inside API .
Questions
1. Is there any SMBUS master Blocks in PSOC ? I am only seeing SMBUS slave block .. Why ?
2. How to add a timeout to PSOC generated APIs?? . I feel I2C API without a timeout is Dangerours ,
Show LessI was just wondering if we can program the controller without using the block diagrams in the schematics. I mean if I can write the APIs in .C to configure everything without making the top design. I have already done that. The only thing I'm struggling is to avoid is connection i.e. Can I configure the output of DAC to a pin using .c instead of making a connection on the top design?
Show LessHi,
I'm starting with development on PSOC and I'm interfacing a UART camera with CY8CKIT-059 and save the picture on a microSD, but when I try to save the picture I note that the function to write on the microSD is slow, cause not all data are writen on the SD. For example, the picture has a size of 25kb, but the file that I save has 10 kb. When I open the file on a hexadecimal editor I can see that lack many strings.
I add the code of the function, if is needed that I upload the project tell me.
---------------------------------------------
pFile = FS_FOpen(titulo, "w");
Camara_PutArray(ReadPic,16);
while(alar_idle==0){
if(bufful==1){
FS_FWrite(&buffrec[0],1,15,pFile);
cont=0;
bufful=0;
}
}
FS_FWrite(&buffrec[0],1,cont,pFile);
FS_FClose(pFile);
-------------------------------------------------
My UART buffer has a size of 15 bytes, and the baud of the camera is 38400 andhe frequency on the emFile is 4000 kHz. My alar_idle is a boolean that show me if the transmission has finished, cause when I tried check the last two bytes of the transmission the result not ever was appropriate. I've tried write with FS_Write, but it was worse.
I hope someone could help me.
---Updates--
-I've attached the project.
-Other problem that I had but I've solved making another routines was that I only could use the "strstr" function only once time. When start the system, but when I try to use it for take a picture, it not work.
-----
Thanks
Show LessHi all. I want to make a project with CY8CKIT-059. I want to receive sensor digital value from a photodiode using interrupt in digital pin. LCD will displays the value of sensor after interrupt works (interrupt will work when the light is OFF). After the counter value reaches 8, the processor will stop receiving data. Then, when I turn ON and OFF again the light, the processor will receive again the data until the counter value reaches 8. But, the reality is not like that. After the counter value is equal to 8, I try to turn light ON and OFF again, but the processor only receive 1 value from sensor and the counter doesn't work.
Here I also attached my project.
Looking forward for your help. Thank you
Regards
Yakub
Hello all, I need a little help.
I want an RTC with microsecond intervals, I'm using the RTC module existing in PSOC 5 prototype Kit, and to generate the microseconds I am using a up counter with a 1MHz in the input, my problem is how to reset the counter each one second interrupt of the RTC ?
I don't Know how to use RTC interrupts, I'd like to put this function "Counter_Init();" in the " RTC_EverySecondHandler(void)"
Thank you very much.
Show LessI am having trouble getting establishing UART serial communication between my PSoC 1 Eval Board, CY3210, with my PC. The specific device on the board is the CY8C29466-24PXI.
Basically, I need the PSoC to send data to my PC for a project, abut can't even get to the point of testing the UART connection. Right now, I am attempting to connect the 9-pin DSUB RS-232 port to a USB port on my PC via a standard RS-232 - USB cable. Upon connecting, my computer fails to install device driver software and stops the device due to it not working. I have installed the UART drivers from Cypress, and have attempted to associate them with the device, to no avail. Every time I manually tell my computer which driver to use, it tells me that the best driver is already installed and refuses to install the selected driver (cypressusbandbus.inf).
If anyone has any idea how I should accomplish this, I would be very grateful for your help. Perhaps my approach of using the 9-pin is completely wrong. Please provide any suggestions that may help. Thank yo
Show LessHi Guys,
Status = 0;
DMA_RSU_0_Chan = DMA_RSU_0_DmaInitialize(DMA_RSU_0_BYTES_PER_BURST, DMA_RSU_0_REQUEST_PER_BURST, HI16(DMA_RSU_0_SRC_BASE), HI16(DMA_RSU_0_DST_BASE));
DMA_RSU_0_TD[0] = CyDmaTdAllocate();
DMA_RSU_0_TD[1] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_RSU_0_TD[0],2, DMA_RSU_0_TD[1], 0);
CyDmaTdSetConfiguration(DMA_RSU_0_TD[1], 1, DMA_RSU_0_TD[0],0);
CyDmaTdSetAddress(DMA_RSU_0_TD[0], LO16((uint32)&Array[0]), LO16((uint32)SPIM_RSU_0_TXDATA_PTR));
CyDmaTdSetAddress(DMA_RSU_0_TD[1], LO16((uint32)&Status), LO16((uint32)SPIM_RSU_0_TX_STATUS_MASK_PTR));
CyDmaChSetInitialTd(DMA_RSU_0_Chan, DMA_RSU_0_TD[0]);
CyDmaChEnable(DMA_RSU_0_Chan, 1);
PS: I have read all the documents/discussions related to PSoC, and SPIM but I am still struggling to work it out. I must be missing something here. Any help is appreciated.
Show Less