14 Replies Latest reply on Mar 26, 2015 8:58 AM by helic_263931

    UART Tx example program not working

      Hi developers,


                                I am trying out the UART TX example program given in the creator 3.0 on the PSoC 5 device mounted in CY8CKIT-001 DVK board. Though as per the program I can see the LCD output, I am not able to see any response in the UART. I am monitoring the UART data through a hyperterminal. I have checked the RS 232 connector and port and found every thing to be correct and in working condition. Can some one help me get out of this.

        • 1. Re: UART Tx example program not working

          Check the serial cable (cross-over vs. straight connection). make sure the TX line of the 001 kit is indeed connected to the RX line of your PC. (or the other way round: when you send something via Hyperterminal, you should see this on the RX line of the kit - check with a scope)

          • 2. Re: UART Tx example program not working

            When connecting UART to a PC directly you have to observe the correct level. There is a level-shifter for Tx and Rx on the kit-001 board that has to be configured with a jumper. DO NOT BYPASS the receive-line, it has a +-12V level which will damage your board when not level-shifted to 5V.


            Additionally observe the voltages of your signals to detect the Tx lines which must be crossed over as said in the prior post. Do not use hardware flow control yet.





            • 3. Re: UART Tx example program not working

              dear bob and hli,


              as I have already mentioned, I have completely checked the cable. I did an RS 232 loop back test to check the cable integrity and found it working good. My jumper settings on the board are in default condition. I beleive that the only jumper affecting the RS232 port on the CY8CKIT-001 is  jumper J-10 (RS232-PWR) and I find it correctly in place. still there is no response.


              one more observation is the TX line produces waveforms during data transmission (verified through DSO). and I even tried with a standalone levelshifter circuit board (powered separately and grounds connected to DVK board). Even after all this there is no response.


              I am planning to burn the PSoC 5 self test.hex file with a hope that it will test the RS232 and say whether it is OK or NOT ok. but here too I face a difficulty burning the hex file to the PSoC 5 LP IC on the board. The programmer application does'nt list the 5868 series of the PSoC 5 IC at all. please get me out of this.

              • 4. Re: UART Tx example program not working

                Jumper J8 powers the level-shifter for the RS232, but you still have to connect your Rx and Tx pins to the connector P16. Keep in mind that a PSoC5 does not have any dedicated UART pins, so you are completely free of using any appropiate pin for RTx and Tx which then you'll have to route/wire to P16.





                • 5. Re: UART Tx example program not working

                  Where dou you observe the TX line? on the PSoC GPIO pin, on the RS232 level shifter output, or on the other end of the cable?


                  (My guess till is that the RS232 cable you have is connecting TXpsoc to TXpc, and RX likewise, instead of being cross-over)

                  • 6. Re: UART Tx example program not working

                    Dear hli ,


                     I had observed the signal at the PSoC output pin when it was connected to the levelshifter TX input and found the 5 V TTL like serial signals. The output TX pin of the levelshifter has a sawtooth like waveform in the normal state and whenever data is transmitted the differential 12 V signal seems to be added up with this 500 mV sawtooth would this be an issue. This is the first time I'm observing an RS 232 line signal.


                    and moreover I have checked the RS 232 cable also it IS a crossover cable. I don't know what is going wrong...

                    • 7. Re: UART Tx example program not working

                      If the signal at the PSoC output is ok, then check it

                      • at the output of the level shifter
                      • at the other end of the cable

                      If you use a cross-over cable. did you try a 1:1 cable too?

                      • 8. Re: UART Tx example program not working

                        Does the TX output of the level shifter have a small sawtooth like waveform by default. I can observe a 2kHz 1V sawtooth on that line.? Is this a malfunction ?

                        • 9. Re: UART Tx example program not working

                          No, it should no, there should be a flat level (of about 12V positive or negative). Did you measure this with the cable attached to the PC (if yes, try without)? Are the 1V peak-to-peak, is there an offset to GND on it?

                          • 10. Re: UART Tx example program not working

                            Dear hli,


                                               The problem got solved !!!. I used a straight through cable instead of a cross over cable. Now I can observe the data in the hyperterminal. But still I  see the 1 V sawtooth on the TX pin. And by the way I would like to know why only the straight cable works? are there any cross over at PCB trace level in the DVK board? Please clarify. This would be really useful for everyone.


                            thanks a lot

                            • 11. Re: UART Tx example program not working

                              The use of 1.1 vs. cross-over cable is always confusing. I'll try to explain:

                              • for a serial communication you need to connect RX and TX on the ends of the line (and TX with RX)
                              • the definition to which pins RX and TX belong on a device depends on what the device is
                              • there is data terminals equipment and data circuit-termiating equipment (DTA and DCE - see http://en.wikipedia.org/wiki/Data_terminal_equipment )
                              • on a 9-pin port, DTE has RX on pin 2 and DCE has RX on pin 3
                              • so if you connect devices of the same type together you need a crossover cable (to switch pins 2 and three)
                              • but if you connect DTE with DCE you need a 1:1 cable

                              Regarding the 1V sawtooth: the level shifter has a charge-pump in it to generate the voltages needed for the RS232 communication. So you see the artifacts of that generation.

                              • 12. Re: UART Tx example program not working

                                So what type is the PSoC DVK . Is it a DTE or a DCE?

                                • 13. Re: UART Tx example program not working

                                  In the "good old times" when the only interfaces a computer had were Centronix and RS232 I used to verify the RS232 connections with a voltmeter. An input showed nothing meaningful, while an output showed RS232 level which is about +-12V.


                                  Avoiding strictly connecting two inputs or two outputs together I usually got my peripherals to work. Only few of those used the controls RTS-CTS and DTR, so I enabled them only when really neede.





                                  • 14. Re: UART Tx example program not working

                                    Since your PC is a DTE, and a 1.1 cable works, the Cypress kit is a DCE. (Using a 1:1 cable is the normal use-case, a cross-over cable is normally only needed when connecting two PCs together).