- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friends,
Can I connect directly to external device from Tx and Rx at J13 ? For example I wanna send 0x01 to another device from PSoC 1?
Then send command to Tx with UART_CPutString("My command");
what's the different between UART_CPutString and UART_PutString
thank you
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, in CY3210-PSoC Eval board, you can use J13 header to connect TX and RX lines to any IO pin of PSoC device on the board. Remember to remove JP1 and JP2 jumpers, which when placed, connects specific pins of PSoC to RX and TX.
In UART_CPutString API, the string has to reside in flash, whereas, in UART_PutString API, string has to be in RAM. For more details, please see the user module datasheet of UART.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just to be clear, J13 is the TTL/CMOS side of RS232 physical layer. So if
you connect to another TTL/CMOS device, you are good to go. But if you
are trying to connect to full RS232 signaling spec device, that has to be done
on the DB9 side of the translator.
With respect to the 2 LCD printing f()'s keep in mind either string, ROM or RAM,
must be null terminated with a '\0'. When you enclose a string in ""initiating a
variable, compiler adds the null for you, as in
unsigned char pString [ 20 ] = "This is a test"
but RAM based string you have to specifically add the null character after you
load string, unless you are using some of the string functions in extended library.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So for example I wanna send hexa 01 , I'm going to put the code like this below :
//start UART begin
mov A, UART_PARITY_NONE
lcall UART_1_Start ; Enable UART
mov A, >sRomString3
mov X, <sRomString3
lcall UART_1_CPutString ; Display example string
lcall UART_1_PutCRLF
//UART END
sRomString3:
DS "01"
db 00h
or should I put DB 01 ?
And how can I read from RX ?
Thank you
- 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
Did you consider to write your program in "c" which will make it more readable (fewer overlooked errors) no prolemds with definitions (0x01 will always be the same). The APIs are shown in C as well as in assembly.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I use this one :
-
lcall UART_bReadRxData
mov [bRxData],A How can I define [bRxData] ? and display the character into LCD ? thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
char c;
UART_1_Start(UART_PARITY_NONE); /* Enable UART */
UART_1_CPutString("Read from RX"); // Example string */
UART_1_PutCRLF();
LCD_1_Start(); /* Init the LCD */
LCD_1_InitBG(LCD_1_SOLID_BG);
LCD_1_Position(0,0);
LCD_1_PrCString("PSoC LCD");
c = UART_1_cGetChar();
LCD_1_PrCString(c);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before calling UART_GetChar() you have to check if there is a character already received. Check the Rx-Status first.
Bob