Shop OBEX P1 Docs P2 Docs Learn Events
74hc595 — Parallax Forums

74hc595

hmlittle59hmlittle59 Posts: 404
edited 2009-02-11 19:49 in General Discussion
Hello All,

Two(2) things. Bread Boarded(daughter board) the 75HC595 chip and got my LEDs (RED/GREEN) turning on and off but when the RED Led turns on the Green Led starts to flicker. My thinking is that the bits are being "SHIFTed" thru the the registers causing this to happen. I maybe able to can fix it in software to go thru that routine only once per entry, but is there something else I need to learn about this chip to stop this? (Maybe set latch 'HIGH' after turning LED on or off). I've moved the routines out of the loop routines but no luck. thanks

1) LEDs are flickering ON & OFF when one should be on and the other off
and
2) My Bit count for either LED seems to be ONE(1) off compared to the StampWorks page 130 Drawing.
(00000001) Does NOT work for Pin 1
(00000010) Does work for Pin 1...How am I suppose to count pins (0 -6,15) or (1 -7,15)

'FORGOT TO ADD SAMPLE CODE.........OOOOPPPPPSS.
'This is the Code that deals with the 75HC595
  OffLed             CON     %00000000        ' Turn Both LEDs OFF
  RedLed             CON     %00000010        ' Turn Red   Led ON
  GrnLed             CON     %10000000        ' Turn Green Led ON
  ExtAlm             CON     %00000100        ' FUTURE:::TURN External Alarm ON


gosub RedLedOn

' CODE

gosub GrnLedOn

' CODE

gosub LedOff

'CODE


end

' ================================================================================
'            -------     [noparse][[/noparse]   Turn ON/OFF 74HC595 BITs   ]        ---------
' ================================================================================
'
OffLeds:
     work = Offled                      ' "%00000000"
     GOSUB Out_595
     PAUSE 100
RETURN
' ================================================================================
'
GrnLedOn:
     work = GrnLed                      ' "%10000000"
     GOSUB Out_595
     PAUSE 100
RETURN
' ================================================================================
'
RedLedOn:
     work = Redled                      ' "%00000001"
     GOSUB Out_595
     PAUSE 100
RETURN
' ================================================================================
'
ExtAlam:
     work = ExtAlm                      ' "%00000100"
     GOSUB Out_595
     PAUSE 100
RETURN
'
' ================================================================================
'            -------     [noparse][[/noparse]   Turn ON/OFF 74HC595 BITs   ]        ---------
' ================================================================================
'
Out_595:                                '
   SHIFTOUT DTA,CLK,MSBFIRST, [noparse][[/noparse]Work]
   PULSOUT Latch , 5
RETURN



thanks again if you know this chip

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

hmlittle59

Post Edited (hmlittle59) : 2/11/2009 12:23:44 AM GMT

Comments

  • hmlittle59hmlittle59 Posts: 404
    edited 2009-02-11 04:44
    Found First problem,

    Low voltage on daughter board caused the 74HC595 to act erratic. Lights now turn on and off like they should. The pin match up to the Bit pattern still has me confused.


    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

    hmlittle59
  • kelvin jameskelvin james Posts: 531
    edited 2009-02-11 06:54
    OUTPUTS

    QA - QH (Pins 15, 1, 2, 3, 4, 5, 6, 7)

    **
  • hmlittle59hmlittle59 Posts: 404
    edited 2009-02-11 19:49
    Thanks Kelvin J,

    Some what strange, but OK. I'll ck it with my meter to make sure my brain absorbs it this way!!! AND IT DID GREAT...

    so I'm clear..

    (Pins 15, 01, 02, 03, 04, 05, 06, 07)...
    equals (Bits 00, 01, 02, 03, 04, 05, 06, 07)...

    Thanks again

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

    hmlittle59
Sign In or Register to comment.