Anonymous
Not applicable
Jun 22, 2009
05:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 22, 2009
05:09 AM
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)]
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)]
Labels
- Labels:
-
PSoC 1
2 Replies
Jun 22, 2009
06:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 22, 2009
06:12 AM
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.
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.
Anonymous
Not applicable
Jul 04, 2009
01:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 04, 2009
01:30 PM
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
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