Would you mind to zip and post your complete project here, so we can have a look at all possibilities that cause your problem?
If you "Clean" your project before zipping it becomes smaller, there is a 2MB limit for uploads afaik.
At (very) first sight I can see, that you use the WriteTxData() API without checking the transmitter status. This will resullt in errorneous transmission of data..
What are your Delays for? Waiting until the data is transmitted? It will go better checking the status.
Use the PutChar() API instead, which will block, if the UART is busy or the transmit-buffer / FiFo is full.
The PutString() API already blocks, so there's no need to wait for it.
Hi every body! Help me!!!
I have a prolem when PSoC conect to PC via RS232 circuit (UART).
- PSoC recieve data from PC send (char,string...).
- If PSoC receive character 'a', turn on led; else turn off led.
Currently, hardware is fine. But code not work as i need!
I checked configuration PSoC, code of my project.
I upload my project for every body.
Can you help me, please?
I do this project because i will do project:
-P0.4 receive data (char, string...) from pC.
-P0.5 forward data that P0.4 received to PC.
ViDuUART_OnlyChar_150520141.zip 244.5 K
Just a check, you have a RS232 transceiver connected to your PSOC
to develop RS232 levels for the PC serial interface ?
I see you are driving LED by setting port to high, implying LED wired from Vss to
a series R to pin. The pin cannot source as much current as sink, better you connect LED
to Vdd to series R to port, and turn it on driving pin to "0", Vss.
About RS232 circuit which i used: it is good because i coded a example to test.
- TX on PSoC transmit data (char, string) to PC, PC received data and show well.
- But RX on PSoC can't work.
(I'm using software: Terminal 1.9b to check communication between PSoC and PC)
I use 1 led to test, not more. I think project has no prolems with that led.
Can you check about configuration of my project, please?
Or, Is code incorrect?
I have just studied PSoC!