Best method to communicate commands from PC to PSoC5?

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

cross mob
DaRe_2236336
Level 3
Level 3
First like given

This is a pretty noob question, I apologize now for my ignorance, I have been searching around and haven't found much on the subject. I am designing my first board that incorporates a PSoC device (CY8C5287AXI-LP095). The board is basically just a MUX board, where the majority of the GPIO pins will be used to control the MUXs on the boards. There will be some I2C communication to other devices.

My intentions were to send commands from a PC to the PSoC which would then turn on and off the GPIO pins as requested or run certain functions when told to do so. What would be the best communication protocol or method be to accomplish this?

I guess I'm a bit hazy on UART vs USB. I have a CY8CKIT-059 that I was able to setup UART on. The example I used basically turns on and off the LED and checks the condition of the switch with PuTTY commands, great it worked on the kit, this would be perfect. The kit was plugged into the USB on the side of the computer, but I used a UART component on my TopDesign. The UART example I used communicated through the kitprog -> target board, so this made things even more confusing since I set pins as RX/TX then connected nothing to them.

If I want to use UART what other hardware do I need since I wont be using a kitprog or miniprog permanently connected to my design? Do I just wire said hardware to the SIO pins like the ones I "used" in my example?

Thank you

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

DaRe,

The KitProg had UART-USB bridge, emulating COM port, and pins P12[6], P12[7] on the KIT-059 were connected to the KitProg by PCB traces. Without the KitProg, any other USB-UART dongle or 'smart cable' will do, like this USB-UART dongle by FTDI

TTL-232R-5V-PCB FTDI, Future Technology Devices International Ltd | Computer Equipment | DigiKey

This is the cheapest I could find:

CP2104 USB UART6PIN module serial converter STC PRGMR replace CP21022.0 for TTL | eBay

When selecting the dongle, make sure it is uses RS232 protocol and set to 5V operation (if your PSoC runs on +5Vdd).

Since the KitProg is no longer used, you don't have to stick with P12[6/7] and can assign any other pins for  Tx and Rx and connect dongle wires to them.

/odissey1

View solution in original post

5 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

DaRe,

The KitProg had UART-USB bridge, emulating COM port, and pins P12[6], P12[7] on the KIT-059 were connected to the KitProg by PCB traces. Without the KitProg, any other USB-UART dongle or 'smart cable' will do, like this USB-UART dongle by FTDI

TTL-232R-5V-PCB FTDI, Future Technology Devices International Ltd | Computer Equipment | DigiKey

This is the cheapest I could find:

CP2104 USB UART6PIN module serial converter STC PRGMR replace CP21022.0 for TTL | eBay

When selecting the dongle, make sure it is uses RS232 protocol and set to 5V operation (if your PSoC runs on +5Vdd).

Since the KitProg is no longer used, you don't have to stick with P12[6/7] and can assign any other pins for  Tx and Rx and connect dongle wires to them.

/odissey1

I like your response BoTa, I just found this post and was coming to update, 8-bit UART with PSoC 5lp , I can also put a MAX232 chip on my board to get the communication to work I think? Anyone have any advice on this?

0 Likes

I'm gonna go with this cable, thanks BoTa_264741

0 Likes

I use this cable frequently (at work), but for home projects is quite expense. You may find $1.5 parts on eBay or AliExpress.

/odissey1

0 Likes

DaRe,

MAX232 is 12V RS232 converter, but PSoC needs 5V TTL level only. So MAX232 is not going to work

/odissey1

0 Likes