Multiple UARTs may be enabled at same time, but pins 12 and 12 are the only ones, which are physically connected by PCB traces to the USB-UART convertor located on the KitProg. So, once the KitProg connected to a computer, it appears as extra COM port, available for communication with UART on KIT-059.
See this discussion also:
Just for fun, I tried with my CY8CKIT-059 with 4 UARTs.
Note: We can select other pins, so this is just a sample of 1 combination.
CyGlobalIntEnable; /* Enable global interrupts. */
UART_1_PutString("This is UART_1\n\r") ;
UART_2_PutString("This is UART_2\n\r") ;
UART_3_PutString("This is UART_3\n\r") ;
UART_4_PutString("This is UART_4\n\r") ;
As Odissey1-san suggested, I used KitProg's USB-UART for UART_1,
and for other UARTs, I used my discrete USB-SERIAL to probe their output one by one.
1 of 1 people found this helpful
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.
Added Note: Using the USBUART component has some additional advantages over the Kitprog USB-UART.
- 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.
- 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.