- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good Morning, How i do my first communication UART to PC?, I need read 4 bytes, and the pc send me these in a buffer.
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what clock divitions are you using in the program? You need a Clock input near 76800 to generate 9600
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello saulo, you can look for the datasheet in PSoC designer you found functions and a example.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was trying to use the UART, configure the UART Clock to 9615 but when I want to read LED lights that never was "0" port
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
char CRX;
BYTE Status;
void main(void)
{
UART_CmdReset(); // Inicializando el buffer cmd y el UART
//E2PROM_Start();
PRT0DR = 0x00;
//RX8_IntCntl(RX8_ENABLE_RX_INT); // Enable RX interrupts
UART_Start(UART_PARITY_NONE);
M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
while (TRUE)
{
//while(!RX8_bReadRxStatus()){;;}
//PRT0DR = 0x80;
CRX = UART_cGetChar();
if (CRX == '7'){PRT0DR = 0x80;}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To connect an UART to your PC you will need a level-shifter on the PSoC side to get a +- 12V signal as required for RS232. When you are using a Cypress Development Kit there will be a driver on the board already.
When having problems like yours best will always be to upload the complete projeczt here. Use the "Archive"-function of Designer and upload the resulting program using ie (chrome still does not work correctly)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, i used a Bluetooth module, i have configured mi port 2 with Tx and Rx, before worked in PIC and mi Software its already and test in other projects, but is my firs time en PSoC and this code doesnt work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
have you checked your inputs clocks from the uart module? wich is your baudrate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, the UART´s baudrate i belivie is a 9600 but i´ll check my module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what clock divitions are you using in the program? You need a Clock input near 76800 to generate 9600
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oooooo.. ok i had no idea it was x 8, (Y), already running thanks.