O'Scope Question
Fast Micon
Posts: 16
This is the Optascope plot of a led connected to a Stamp 1 pin.· The code that generates this is something like this:
LOW 7
do something
TOGGLE 7
do something
TOGGLE 7
return to main program
Why the voltage goes from 0V to 1V, then goes to 5V, then goes back to 1V before dropping to 0V again?
LOW 7
do something
TOGGLE 7
do something
TOGGLE 7
return to main program
Why the voltage goes from 0V to 1V, then goes to 5V, then goes back to 1V before dropping to 0V again?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
· LOW pREDE···· ······················'Enables LTC1487 receiver
· SERIN pRODI, cBaud, ($AA), vAddress, vCommand, vCounter···'Waits for sync byte, match ID and then reads command
· IF vAddress <> cMyID THEN Main···············'Ignores message if not for the node
· vCounter = vAddress + vCommand - vCounter
· IF vCounter <> 0 THEN Main·················'Loops if checksum is not correct
· IF vCommand = $00 THEN CircuitOff··············'Changes the behaviour of pActivity to signal that circuit is off
· IF vCommand = $01 THEN CircuitOn··············'Changes the behaviour of pActivity to signal thet circuit is on
CircuitOff:
· LOW pActivity
· GOTO StartRead
CircuitOn:
· HIGH pActivity
StartRead:
· GOSUB ReadTemp·······················'Reads the raw temperature parameters
· TOGGLE pActivity
· GOSUB XmitTemp
· PAUSE 40
· TOGGLE pActivity
· GOTO Main
· END
I have a led attached to pActivity (which is I/O 7) with a 470ohm resistor.· The pin is sourcing.
·
Most likely you are setting the pin to an input somewhere, but without the complete program that's just a guess.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
"A problem well defined, is a problem·half solved."
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
The schematic goes here:
The other problem I have is very strange too.· When vCommand is $00 the progam works, with the strange behavior explained before.· When ·vCommand is $01 the Stamp resets.
I really don't understand....
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
"A problem well defined, is a problem·half solved."
·
I finally replaced the BS1 with a new one............and all works perfectly well again. I guess I have an ESD damaged BS1....
Regards,
Fernando