Expanding Propeller Outputs
Philldapill
Posts: 1,283
I know there are many times when the 32 I/O pins aren't enough, or it's just a huge cost in pins to use a parallel device that uses 8 pins or more. I've got a simple application where I need as many outputs as possible and with a fair amount of speed(able to change all outputs @ 100kHz). What is the best way to do it? I ordered some serial to parallel chips to play with, and they have a 3 bit addressing system on them so that I can add up to eight of these chips and get 64 outputs for the price of 2 propeller I/O's. These chips are SN74LV8153.
Are there any better ways of accomplishing more output control? I mean, theoretically, you could cascade these things, right?
Are there any better ways of accomplishing more output control? I mean, theoretically, you could cascade these things, right?
Comments
The device you showed can't handle the data rate you want. The datasheet talks about a serial rate of about 24KHz. The I2C devices are also too slow. The 74HC595 and TPIC6595 can be clocked pretty much as fast as the Propeller can handle. In assembly, that's at least 4MHz. You could easily update a 4 device (32 bit) cascaded chain at a 100KHz rate. If you use the video generator as a shift register, I'm sure you could run faster.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
I use mcp32016 for most io expansion I do but its not fast enough for 100kbps. 74hc595 would be an obvious choice. If you write the driver is asm and use counters for the clock you should be able to clock out at 10Mhz for 32bits (see spisram 1 bit driver for 1 way this can work), for more bits this slows to an average of just over 8Mbps so you could send 80bits out 100K/s. For more bits you can run multiple serial lines in parallel either using multiple cogs or from 1 cog. Using 1 cog the clock rate slows but the overall bit rate is higher.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Caught in the PropWash
I could clock the 595 at 20Mhz but it will not increase the average throughput. To clock at 20Mhz you have to first setup the correct instructions which will take 2 instructions per bit to setup + 1 instruction per bit to output giving a total of 3 instructions per bit, instead I take 2 instructions per bit to output but I dont need to setup the correct instructions.
If you have a fixed bit pattern to output (known at compile) then the faster clock speed is possible.
Strictly, I was using a 12MHz SCK since I was using a system with a 6MHz crystal and 16x pll with the counter set to divide by 8
Post Edited (Timmoore) : 8/11/2008 6:14:23 AM GMT
The device is like a 74HC595 + ULN280xA all in one -·very useful for saving board space
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Where did you get your hands on the MIC59P60? I need a few of them for a project I am working on and am having NO luck finding them. Especially the MIC59P60BV variant.
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
www.sxmicro.com - a blog·exploring the SX micro
www.tdswieter.com
I did have some trouble driving long chains of the 74HC595 chips until I started using a 74HC245 bus driver chip to interface between the Prop and the data, clock, and latch lines of the 595's.
I've attached a (fairly bad - it was very dusty in my shop when I took the picture) picture of one of the fully populated boards. I designed the board to hold low power LED's for debugging purposes, and this board also has those populated.
For the one of you that produces/assembles PCB·professionally there is also PCA9698: 40 IO but TSSOP56 package