Shift Register Problem with BS1 Rev. B
akudaikon
Posts: 10
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:
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!
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