PSoC 1 Tx and Rx on J13 ?

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

cross mob
Anonymous
Not applicable

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

0 Likes
8 Replies
Anonymous
Not applicable

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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Here is a project you can consider -

   

 

   

http://www.cypress.com/?id=4&rID=58574

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

How can I use this one :

   

 

   
    
     
lcall  UART_bReadRxData
     
mov   [bRxData],A  How can I define [bRxData] ?  and display the character into LCD ? thanks
    
   
0 Likes
Anonymous
Not applicable

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);

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Before calling UART_GetChar() you have to check if there is a character already received. Check the Rx-Status first.

   

 

   

Bob

0 Likes