Edward King wrote: > I need to run a bargraph display from a PIC (exact type to be decided, but I > have a range of 16F and a couple of 18F devices lying around). > The trouble is that due to space constraints, Im not really able to squeeze > a 40 pin device in to the assembly and I dont have many GPIO lines left > over... > > So my intention was to use a serial to parallel shift register to give me > the required outs from a couple of pins. Trouble is that it seems only 8 bit > SRs are common now (and the level meters / bargraph displays are all 10 > part) so I was wondering how other people have done this. Why can you not just cascade 2x 8 bit registers? 74HC595 is nice http://focus.ti.com/docs/prod/folders/print/sn74hc595.html in that most of the output pins come out sequentially on one side of the device, making routing easy. And it's rated to 70mA total current so you could do 9 mA per segment and be within spec. And don't forget the obvious. 1 shift register and drive the other 2 LEDs with spare pins (that could also be multiplexed with the shift register control pins if you can live with the small amount of 'ghosting' that happens during the S/R load cycle. e.g. SRCLK and SER. Any 'garbage' shifted in is irrelevant until RCLK is toggled. And why not just use a commercially made bargraph display and drive it with 1 PIC pin and an R/C low pass filter to make a cheap D/A (PWM of 1 pin). Robert -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist