Hello folks!
Today's community project hightlights a very useful utility on the PSoC 4 Pioneer Kit. Often times, I like to spit out some data over UART, then read that data on my computer using a hyperterminal program - great for some quick and dirty debugging. This pioneer kit has a built-in USB-to-UART utility programmed on the PSoC 5LP device (the onboard debugger for the target PSoC 4) that allows you to do just that, over the USB port.
This project demonstrates UART communication over the kit USB-UART Bridge. The project uses the Serial Communication Block (SCB) based UART component which sends the string "CY8CKIT-042 USB-UART" and also loops back the data sent over the COM terminal software.
Project Schematic:
(Actual PSoC Creator Schematic "TopDesign.cysch")
(PSoC Creator UART Component Configuration)
Software Setup:
See Steps 1-6 from the main post.
The main.c firmware in this project is very simple, it simply sends character data over the UART whenever the TX buffer is filled.
(PSoC Creator main.c firmware)
Hardware Connections:
You will need to wire the UART TX and RX pins between the PSoC 4 and the PSoC 5LP on the pioneer kit (See picture below).
PSoC 4 UART RX P0[4] --> PSoC 5LP P12 [7] (on J8)
PSoC 4 UART TX P0[5] --> PSoC 5LP P12 [6] (on J8)
Once programmed with this project, your PSoC 4 Pioneer Kit is setup to send data over USB-UART. The board enumerates as a COM Interface, the number of which can be seen in Windows Device Manager. In my case, it enumerated as COM8. You will need this COM# to allow a program like Putty or HyperTerm to communicate with your board.
(The PSoC 4 Pioneer Kit enumerates as a COM device - COM8 in my case, your COM number may be different)
You can use any hyperterminal software you'd like. The example below shows how to setup Putty (freeware).
(Putty Configuration - Setting up Serial Session, Selecting COM port, Forcing 'Local Echo' to "On")
Once the board is running and connected to Putty, pressing the reset button will display the string "CY8CKIT-042 USB-UART" in Putty's terminal window.
Typing any character will be echoed-back. You can see the "HHEELLOO AA BB CC...." text below as an example of what I typed in and was echoed-back by the PSoC 4.
(Putty in action - displays the kit name string, also echos-back any characters typed)
I hope this example can help you out in your design.
Best,
Matt