I'm trying to use SHIFTOUT and PULSOUT. When I use pins 0 - 7 for output everything works fine. But when I try to use pins 8 - 15 nothing comes out. What gives?
Well, you didn't included your programming, so I'll guess that you aren't setting up pins 8-15 as outputs beforehand.· I'm figuring that using SHIFTOUT andPULSOUT aren't the same as OUTPUT (which makes the pin associated an output regardless.)· Maybe you're declaing P0-7 as outputs, but not P8-15.
How do you know it's not working? Have you looked at the output with a 'scope. BTW, there is no need to use OUTPUT ahead of PULSOUT, but you will want to use LOW or HIGH -- PULSOUT inverts the state of the selected pin for the duration. If you want a high-going pulse on one of the pins, initialize that pin with LOW.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
How is the BS2 mounted? I.e., is it on one of the Parallax development boards, or in a custom circuit? Anything attached to the pin? How about if you use simple HIGH and LOW commands?
Your code yields alternating 1's and 0's on the Debug screen. Still nothing on the output. I've also tried using an alternate connector but get the same results.
Try placing the 'scope probe directly on the pin on the 24-pin Stamp module. That is physical pin 20, logical pin p15. The fact that you are getting alternating 0s and ones indicates that the BS2 is working, but maybe there is an open circuit somewhere else.
There are some problems with the BS2p. On pin 20 I had a pulse with normal rise time and a RC decay for the return to low. I measure an open ciruit between pin 20 on the chip and pin 20 on the board (bs2p demo board) I removed the bs2p but couldn't see any obvious problems. Looks like a bad board/and/or bs2p. When I put the bs2p back in I lost all on one of the connectors. Even pin 1 looks lousy. I guess I'll have to return it.
If you have the 'scope probe on p15 while running the program that goes HIGH 15 : INPUT 15 : LOW 15, you will in fact see an RC decay from high to low, as the small capacitance of the pin discharges through the input resistance of the 'scope.
If you're using a BS2p24 on the BS2p24/40 demo board then the P8..P15 pins are actually connected to the A8..A15 sockets -- there's a note about this on the last page of the documentation.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
' {$STAMP BS2P}
' {$PBASIC 2.5}
Main:
PULSOUT 15, 10
PAUSE 20
GOTO Main
It works as long as the first argument of PULSOUT is <= 7.
I've tried setting the pin to OUTPUT but it doesn't do any good.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
' {$STAMP BS2P}
' {$PBASIC 2.5}
DO
HIGH 15
INPUT 15 : DEBUG BIN1 IN15
LOW 15
INPUT 15 : DEBUG BIN1 IN15
LOOP
What do you see on the 'scope, and what do you see on the debug screen (without the 'scope probe attached)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Your code yields alternating 1's and 0's on the Debug screen. Still nothing on the output. I've also tried using an alternate connector but get the same results.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Docs: http://www.parallax.com/dl/docs/prod/boards/BS2p2440DBrd.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax