Shop OBEX P1 Docs P2 Docs Learn Events
Expanding Propeller Outputs — Parallax Forums

Expanding Propeller Outputs

PhilldapillPhilldapill Posts: 1,283
edited 2008-09-04 17:25 in Propeller 1
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?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-06 13:49
    This looks like a nice choice for I/O Expansion. Other choices include a variety of I2C I/O Expanders and the 74HC595 or TPIC6595 for output and 74HC165 for input (and others I'm sure). The one you showed requires a minimum of 1 I/O pin for up to 8 devices. The I2C devices require two I/O pins. The other devices use SPI and need four I/O pins for a cascadable series of devices.

    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.
  • LeonLeon Posts: 7,620
    edited 2008-08-06 14:16
    CPLDs are ideal for that sort of thing. A small Altera MAX II device will give you 40 or so I/Os. Speeds are much greater than you will need.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-06 17:12
    Nice chip looks like a standard serial port will drive it.
    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.
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-11 02:10
    I dug out a 595 out of my junk box today and tried it and yes you can clock 595's·at 10Mhz. You can clock up to 4 at 211K times/sec and upto 8 at 114K times/sec. I only have a couple of 595s so I can't try more outputs but up to 4 shouldn't be a problem and more than 32 may need the clock sync checking when it goes from 32 to 33 bits. How quickly you can actually change outputs will depend on how quickly you can set the bits from spin.
  • Capn_DaveCapn_Dave Posts: 20
    edited 2008-08-11 04:30
    Maxim's (MAXIM-IC.COM) MAX6957 and MAXMAX7301 has 28 outputs, and can be clocked at 26MBits/sec.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Caught in the PropWash
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-11 05:02
    Nice chips, though the clock speed doesn't help but these chip would probably gives you a high PCB density. The real output speed will be slower since you have to output 16bits to set 8 output bits with these chips.
    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
  • Paul MPaul M Posts: 95
    edited 2008-08-11 13:18
    Just for info, I recently used a Micrel MIC59P60 as I needed more current drive for a series of solenoids. (50V @~500mA)

    The device is like a 74HC595 + ULN280xA all in one -·very useful for saving board space

    ·
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-08-18 21:42
    My favorite for low bandwidth expansion is the I2C i/o expanders, widely availible in 8 bit and 16 bit configurations and limited availiblity in other sizes (4, 5, 6, 40). The chips are cheap, ranging from $1-$3, and some even include some eeporm in them as well. The reason I like them is that they can be configured pin by pin for input or output, just like the Propeller can, and since it's I2C it can be hung off the same I2C pins used for the eeprom so it takes no additional pins on your setup, and since they are I2C you can hang multiple units on the same bus when using the device addressing scheme. The one drawback is that the majority of the chips are availible in surface mount packaging only (though SOIC is not hard to solder). Some example DIP parts: PCF8574APN, PCA9554N, PCA9555N, PCA9674N, MCP23017-E/SP, and MCP23S08-E/P.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • clcorbinclcorbin Posts: 14
    edited 2008-09-03 01:12
    Paul,

    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 BakerPaul Baker Posts: 6,351
    edited 2008-09-03 01:34
    I don't have one, but digikey supplies the YN and YVM variants. For the BV you'll have to contact Micrel.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-03 15:33
    I've used the PCA9555 with the Propeller on the uOLED-IOC expansion board. This is the only I/O expansion IC that I have really used and I like that I can configure each line for input or output.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • PyrotomPyrotom Posts: 84
    edited 2008-09-04 16:28
    I have two projects under way - a pyrotechnic firing system that requires 144 relays, and a pipe organ control system that will eventually be able to drive over 600 electrically controlled valves. For both projects I am using 74HC595 chips to let 3 Prop I/O pins control a large number of outputs. The 74HC595 chips drive ULN2803 Darlington arrays to drive the high currents needed for the relays and valves. All of these chips are mounted on custom PCB's that can drive 48, 49, or 50 outputs. The boards can be daisy chained, with each additional board driving another 48 outputs.

    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.
    640 x 107 - 48K
  • dMajodMajo Posts: 855
    edited 2008-09-04 17:25
    I like very much PCA9672/73/74(also dip16)/75. More or less the reasons are the same as Paul. I appreciate a lot the interrupt feature so I don't need continuous polling for input change. I2C is up to 1 MHz.

    For the one of you that produces/assembles PCB·professionally there is also PCA9698: 40 IO but TSSOP56 package

Sign In or Register to comment.