Forum Replies Created
-
AuthorPosts
-
bstienstMemberAh yes. The one I borrowed is a Rev 1 with no holes thats why it needed 21. That all makes sense now.
bstienstMemberWell I got another Rasberry Pi from a friend, and I get the same results.
I tested each the pins with a MultiMeter using this script to toggle the output:
#!/usr/bin/env python
import time
import os
import RPi.GPIO as GPIO
import atexit
# GPIO PIN DEFINES
pin_sr_clk = 4
pin_sr_noe = 17
pin_sr_dat = 21 # NOTE: if you have a RPi rev.2, need to change this to 27
pin_sr_lat = 22
def run():
GPIO.cleanup()
# setup GPIO pins to interface with shift register
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_sr_clk, GPIO.OUT)
GPIO.setup(pin_sr_noe, GPIO.OUT)
GPIO.setup(pin_sr_dat, GPIO.OUT)
GPIO.setup(pin_sr_lat, GPIO.OUT)
# TEST NOE = PIN 17
# while True:
# print "NOE(17) set to 0"
# GPIO.output(pin_sr_noe, False)
# time.sleep(2)
# print "NOE(17) set to 1"
# GPIO.output(pin_sr_noe, True)
# time.sleep(2)
# TEST CLK = PIN 4
# while True:
# print "CLK(4) set to 0"
# GPIO.output(pin_sr_clk, False)
# time.sleep(2)
# print "CLK(4) set to 1"
# GPIO.output(pin_sr_clk, True)
# time.sleep(2)
# TEST DAT = PIN 21
while True:
print "DAT(21) set to 0"
GPIO.output(pin_sr_dat, False)
time.sleep(2)
print "DAT(21) set to 1"
GPIO.output(pin_sr_dat, True)
time.sleep(2)
# TEST LAT = PIN 22
# while True:
# print "LAT(22) set to 0"
# GPIO.output(pin_sr_lat, False)
# time.sleep(2)
# print "LAT(22) set to 1"
# GPIO.output(pin_sr_lat, True)
# time.sleep(2)
def progexit():
GPIO.cleanup()
if __name__ == '__main__':
atexit.register(progexit)
run()
by uncommenting approriate section to see if the pin changes from 1 -> 0 ->1 and they all work as expected. I know its a bit crud, but effective.
I did not have to use 27 but I had to use 21 to get the DAT pin to work. I’m pretty sure I have a rev B board, so I’m a bit confused about that.
bstienstMemberBefore I return it, I’m going to verify all the Pins on the Raspberry are doing what they are suppose to. Give me a few days to do this.
You have given me enough information on what should be happening and where to monitor the pins.
I appreciate the assistance.
I’ll let you know the outcome.
bstienstMemberNo oscilloscope. I’m a software guy with just a multimeter. I don’t think I have any LEDs.
Your forum only takes files smaller that 256k. I missed that error message before. Here are the images as “high” res as I’m allowed.
[attachment=1:j5sn8hx4]Alltogether.jpg[/attachment:j5sn8hx4]
[attachment=0:j5sn8hx4]Seperated.jpg[/attachment:j5sn8hx4]
bstienstMemberIt must be the as you described. There seems to be some difficulty getting the signal to latch in the shift register. Is there an easy place to monitor this process? My hands are not that steady to monitor the surface mounted chips.
I have been able to get an output to 24VAC, but its usually not the expected one and I usually cannot get it to turn off when I do get it turned on. So that seems to add to your theory about signal difficulties.
On a positive note, I did get the RTC clock working reliably:
$ sudo hwclock -r
Sun 14 Apr 2013 18:58:44 UTC -0.425368 secondsso at least the I2C bus is working correctly.
I attached 2 pictures. One with it all together and one with them separated. I turned it off when separating them.
bstienstMemberI tried the self test program and I could not get any outputs to change.
FYI I changed the python scripts as shown, but I’m not able to get any of the programs to cause an output change.
-
AuthorPosts