uart in psoc5lp (cy8ckit-059)

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

cross mob
RaSh_3782726
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

HI all,

In 059 kit have only one uart?

12.6 and 12.7 ?

Is there any another pin is assigned for Rx Tx ?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

RathangShah,

Moto and \odissey1 are correct.  With the PSoC you can have multiple UARTs assigned internally to the IC.  The trick as Moto pointed out is that on the 059 kit the UART used with the KitProg USB-UART use dedicated pins 12.7 [Tx] and 12.6 [Rx] on the target PSoC.  Any other use of UARTs need physical interface circuits external to the PSoC and assigned pins once these circuits are hooked up.  Moto's example of multiple UART ports is a good starting point.

On the 059 kit, there is one exception.  You can configure the USBUART component to provide another serial comm port without having to rewire the 059 kit.  I have included a modification of Moto's program to add the USBUART component.  Therefore the modified application now has UART_1 and USBUART as native serial comm ports using USB as the physical interface.  No rewiring necessary!

Note:  Once you compile the modified project I've attached, you will need to use "USBUART_cdc.inf" included in the root directory to allow the USBUART device to be seen by your PC.  This file loads the correct drivers for the VID and PID of the USBUART device.

Len

Added Note:  Using the USBUART component has some additional advantages over the Kitprog USB-UART.

  1. If you breakaway the KitProg portion of the 059-Kit, the USBUART can act as your comm interface to the PC.  The KitProg board can still be used to program the Target portion of the 059-Kit.  You'll notice a 5-pin connector on both the Target and Kitprog portions of the board (SWDIO, SWCLK, RST, GND, VTrag).  Placing 5-pin interface connectors on both boards will allow you to reconnect the programming capability of the 059-Kit.  Sadly, breaking off KitProg disables the use of USB-UART since the pins 12.7 and 12.6 are extra traces routed between the PCB portions but has no connector points in the 5-pins.
  2. The implementation run-time speed of the USBUART is not limited by the baudrate selected as the UART communication.  For example, if 115Kbps is the UART comm speed, it takes 8.7ms to transfer 100 bytes using the UART component on the PSoC.  However, using the USBUART component, the transfer speed can easily be 10 times faster.  This is because the USBUART uses the USB CDC interface that transfers data to and from the PSoC at the maximum speed allowed by the USB interface.  The UART comm baudrate is buffered on the PC-side where there is a spooling function implemented in the USB-serial drivers.
Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

3 Replies