Shop OBEX P1 Docs P2 Docs Learn Events
Shift Register Problem with BS1 Rev. B — Parallax Forums

Shift Register Problem with BS1 Rev. B

akudaikonakudaikon Posts: 10
edited 2006-06-30 19:01 in BASIC Stamp
I'm having the hardest time getting my basic stamp to interface with a shift register correctly. I am using the following code to shiftout bytes:

SYMBOL Clock      = 5                    
SYMBOL Data       = PIN3               
SYMBOL Latch      = 1                    

SYMBOL OutData    = B0             
SYMBOL OutMSB     = BIT7




ShiftOut:
  FOR ForCount = 1 TO 8
    Data = OutMSB
    PULSOUT Clock, 10
    OutData = OutData * 2
  NEXT
  PULSOUT Latch, 10
RETURN




When I run my program on the stamp, none of the outputs on the shift register get set the way that they should be. Using an oscilloscope, it seems like the reason it isn't working is because the data output from the basic stamp isn't reaching a high enough voltage for the shift register to recognize (it only reaches around less than 1v). However, the clock and latch pulses are reaching their full ~5v.

I don't know what to do. It seems like everything should work right code-wise, but it's not. Does anyone have any suggestions on what is wrong or what I could do?

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-06-30 19:01
    PULSOUT sets the specified pin to be an output. Are you initializing PIN3 to be an output? A simple LOW PIN3 will do.
Sign In or Register to comment.