Hello All - well after a week i still have not been able to get my picaxe talking to a 5940 shift register.
I have seen other posting for other Shift registers but none of the code seams to work on the 5940.
My long term goal is to build an RGB LED cube starting with a 4x4x4. And the 5940 seamed to me to be a good choice (may be not) as it can control the brightness of individual LED with a GS register.
I have the 8 outputs connected to led on the SR pins 1 to 7
I have a resistor 2K on the Iref to ground which should control the current to the LED to 20ma
SIN on the SR connected to pin C.7
SCLK on the SR connected to pin C.0
XLAT on the SR connected to pin C.1
Blank on the Sr connected to pin C.2
VCC to 5V
IREF to GND via 2K Res
GND on SR to GND
and thats it
First thing have i connected the pins correctly and have i connected enough of them?
As for the code i am not sure what i am doing i have used many from this forumn but have not managed to get any of the LED to light
what i would like to be able to do is just to control which of the 10 leds would turn on or a combination of them
I have several books Picaxe projects for the evil genius and one by David Lincoln, but i still cant get my head around the correct connection or code.
I have seen plenty aboout the 74xx595 but could not convert that code
I have seen this code posetd and a friend has said that i should find a way to use it something to do with scratchpad memory ( still searching all about that)
I think this is a way to shift out the binary number head in memory to active the LEDs connect to pins 0 to 7 say of pins 1 to 8 ( well 8 of them)
dsp:
ptr=1
hserout c.7,($F2) '$F2 a command 242 not sure what this is about
for b0=1 to 8
hserout c.7,(@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc) '@ptrinc to do with scratch pad
next b0
return
I feel like throughing my development board out of the window at the moment.
If somebody is able to point me in the right direction that would be great, as its raining out side and i would hate to get my development board wet.
I have two other 5940 which i would like to dasiy chain up once i have learned to walk with this one
Thanks for now
Andy
I have seen other posting for other Shift registers but none of the code seams to work on the 5940.
My long term goal is to build an RGB LED cube starting with a 4x4x4. And the 5940 seamed to me to be a good choice (may be not) as it can control the brightness of individual LED with a GS register.
I have the 8 outputs connected to led on the SR pins 1 to 7
I have a resistor 2K on the Iref to ground which should control the current to the LED to 20ma
SIN on the SR connected to pin C.7
SCLK on the SR connected to pin C.0
XLAT on the SR connected to pin C.1
Blank on the Sr connected to pin C.2
VCC to 5V
IREF to GND via 2K Res
GND on SR to GND
and thats it
First thing have i connected the pins correctly and have i connected enough of them?
As for the code i am not sure what i am doing i have used many from this forumn but have not managed to get any of the LED to light
what i would like to be able to do is just to control which of the 10 leds would turn on or a combination of them
I have several books Picaxe projects for the evil genius and one by David Lincoln, but i still cant get my head around the correct connection or code.
I have seen plenty aboout the 74xx595 but could not convert that code
I have seen this code posetd and a friend has said that i should find a way to use it something to do with scratchpad memory ( still searching all about that)
I think this is a way to shift out the binary number head in memory to active the LEDs connect to pins 0 to 7 say of pins 1 to 8 ( well 8 of them)
dsp:
ptr=1
hserout c.7,($F2) '$F2 a command 242 not sure what this is about
for b0=1 to 8
hserout c.7,(@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc) '@ptrinc to do with scratch pad
next b0
return
I feel like throughing my development board out of the window at the moment.
If somebody is able to point me in the right direction that would be great, as its raining out side and i would hate to get my development board wet.
I have two other 5940 which i would like to dasiy chain up once i have learned to walk with this one
Thanks for now
Andy
Last edited: