Maker Pro
Maker Pro

Controlling shift register via USB

Hi, I have a shift register circuit which I'd like to control from my PC. The circuit takes three inputs: data (serial binary sequence), clock, and latch.

My first thought was to use three pins of the parallel port - it looks fairy easy to get started with sending data over these. But with parallel ports gradually becoming less common, I'm thinking it would make more sense to use USB.

Breakout boards are an option, but ideally I'd like to do it myself: I've been looking at the FT* and MCP2200 chips. The FT230X looks ideal ('full speed USB to basic UART'), but presumably this only gives me one channel of output data. How do I send the clock and latch signals too?

I notice the MCP2200 has 8 'general purpose IO pins'. Could I use these for the clock and latch signals?

Or should I be looking at some sort of USB to parallel solution? Any guidance very much appreciated.
 

Harald Kapp

Moderator
Moderator
These USB chips often have a "bit banging mode" of operation. This is just fine for controlling a shift register. See the documentation of the chip of your choice.
 

Fish4Fun

So long, and Thanks for all the Fish!
Hey Kermit, welcome to the forum!

The biggest problem with Serial/Parallel Port control of timing critical devices is not your PC, but you OS. If you are using Windows it is very difficult to get "precise timing". It **might** be better to simply use something like an Arduino "in the middle". In this scenario the Arduino would connect to your PC via USB and the Arduino would interface with your circuit. While even the UNO is likely 10k times more processing power than you need, they are dirt cheap, have a ton of support and will give you extremely tight timing (native clock speed is 16Mhz giving you 62.5nS resolution.)

Good Luck!

Fish
 
Thanks for the suggestions guys. Yes, using Arduino would be an option - I've used cheap Arduino clones from eBay in the past with good results (for different projects), but I think I'll give an FT* chip a go first (I like making life hard for myself).

FT232RL does bit banging, but it seems that the FT230X does too ... and it's half the price, so I'll give that a go (the MCP2200 gets mixed reviews, and doesn't have a built in oscillator, so think I'll stick to FT*).

I guess the timing issues would relate to process scheduling in the OS kernel? I'd actually be developing under Linux, but I'll certainly keep that in mind (and may well fall back on Arduino if it proves to be a big problem)
 

KrisBlueNZ

Sadly passed away in 2015
I think you should be able to use the parallel FT device. You just need to send bytes to it in the right order, to make sure that the signal you use for shift register data is in the desired state before you assert the signal that's used for shift register clock.
 
Top