Help required regarding UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hi   
   
I am trying an extremely simple code to test serial communication using the UART user module of the CY8C29466-24PVXI. The objective of the code is to print some characters on to HyperTerminal of Win XP. I use PSoC Designer 5.0 SP4.5.   
   
My required baud rate is 9600.   
   
Kindly excuse me if you find this trivial, I'm only a beginner.   
   
Code:   
   
#include <m8c.h> // part specific constants and macros   
#include "PSoCAPI.h" // PSoC API definitions for all User Modules   
void main()   
{   
char ch = 0;   
M8C_EnableGInt;   
uart_Start(uart_PARITY_NONE); //Start UART   
while(1)   
{   
uart_SendData(ch);   
if(ch > 0x7f)   
ch=0;   
ch++;   
}   
}   
   
Note:   
   
The Clock to the UART is given by VC3 and the dividers are given so that VC3 is approx = 76800 [24Mhz/(3*8*13)]   
0 Likes
2 Replies
MR_41
Employee
Employee
First like received
        Though the code looks fine, there could be other problems in device configuration. Here are some points to check.   
   
1. Check if the TX signal is routed from the UART_TX to a pin through the proper Row output and Global nets.   
2. Check if the TX pin of the PSoC is configured as Strong drive   
3. Check if the ClockSync parameter of the UART is set to SyncToSysClk. If this is accidentally set to UseSysClkDirect, then the UART will not work at the desired baud rate.   
4. Check if the TX pin goes through a UART level transmitter and is properly connected to PC. You may also want to check the signal on TX pin using an oscilloscope.   
0 Likes
Anonymous
Not applicable
        Hi,   
   
Are you receiving any data on hyper terminal?   
   
If you are trying this on cy3210, take care of jumper settings, look into schematic.   
   
Cheers,   
Brijesh   
0 Likes