PDA

View Full Version : Shift Register Woes, specifically the STP16DP05



elec_mech
- 11th November 2007, 22:19
Hi all,

I am trying to use a 16-bit shift register to light up some LEDs, eventually in a matrix fashion. I've used the 74HC595 before, so I thought this would be a snap. Unfortunately, I'm stuck. I'm using what I'm learning is a fairly new part, the STP16DP05 from STMicroelectronics. The datasheet gives very little to go on with a couple of timing diagrams and a few sentences about its operation. I'm using the shiftout command and I'm at a point where I'm finally seeing a voltage (with a DMM) on the outputs when I send low bits and I'm seeing low (ground) when I send high bits. This is, of course, opposite to what I should be seeing. When I hook up a cheap red LED to a high output, it doesn't light up. I assume this is due to limited current, which is controlled on the chip through an external resistor, connected to ground as best I can tell. I've changed the resistor from 475 ohms to 100 ohms with no luck - LED still won't light. Can anyone shed some light (pun not intended)?

Here is my main code (not including all the configuration and setup code) - I'm using a PIC18F2525:

pause 500
MAIN:

LOW PORTA.2
SHIFTOUT SPI_SDO, SPI_CLK, 1, [$00FF\16] ' Update the display
HIGH PORTA.2
LOW PORTA.2
end

I've tried commenting out the last low porta.2 with no noticeable difference. The external resistor is 100 ohms and connected to ground and OE-DM2 is connected directly to ground. I'm fairly certain I'm doing something silly, but the datasheet is about as sparse about operation as you can get. I haven't been able to find anything else on the chip, here or Google, other than the datasheet and an application note (also sparse). Any help would be greatly appreciated. Thanks!

mister_e
- 11th November 2007, 22:53
They're called LED sink driver (kinda open-drain output on PICs)... so you must connect between VDD and the I/O.

Refer to Figure 6 (PDF page 9)

elec_mech
- 11th November 2007, 23:22
Steve,

Thank you! In my defense, I've never seen a ground/sink represented as a single bar. On the other hand, I don't know if I'd have caught that anyways. Thanks again!

-Tony