USB Host Controller to RS232

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
johnsondav
Posts: 188
Joined: Thu Jun 28, 2012 7:29 pm
Location: Durham
Has thanked: 86 times
Been thanked: 186 times
Contact:

USB Host Controller to RS232

Post by johnsondav »

Hi Everyone.

I have been experimenting with USB Keyboards and Magnetic Stripe readers. I would like to share this with you, the USB Host Controller Board V2.4 to RS232. It has the advantage of doing all of the USB stuff outside of the project and allows data to be read using RS232 8bit at 9600 BAUD rate. I was not sure if it would work for a door security system so began this experiment to help realise its potential. It works at treat using those cheap magnetic stripe readers and a PIC18F4550. Here is the result:
USB to RS232 Keyboard copy.jpg
USB to RS232 Keyboard copy.jpg (145.11 KiB) Viewed 4367 times
The project which I used to obtain the data from the card was tricky to get the timing to work. The board has a control line which goes high when data is present and stays high until all data has been transferred. This presents a problem of getting the data from the module - store - go back and get next byte. Any time spent jumping in and out of loops causes problems. I found using a data array as a working solution as shown here:
USB to RS232 Magnetic Stripe reader.fcfx
(19 KiB) Downloaded 244 times
Any suggestions as to improvements would be greatly appreciated.

Dave

Post Reply