Would this be the proper way to solve a problem? Could this work
Guido
Posts: 195
I have a Stamp Controlling a Pan and Tilt Camera Motor with a feed back circuit using LTC1298. It basically works off a Clock and moves to a different location every 5 minutes...The problem I have is·the camera is located in a rural area, and power failures happen about once a month. When Power comes on again the Tilt·Up Stamp output goes on·will run·until it reaches the Tilt's limit switch..(which means I have to go Up there and reset it).Seems as if the LTC feedback needs time to stablalize, hence the tilt motor is fast. Would this be a proper way to protect it. Where as LTC=Pan and LTC1=Tilt. The Clock Maintains it Memory by means of a super cap. What I am trying to do here is run this in the main loop while reading the LTC, since the only time the Outputs should be on is when it has reached a certain time and needs to move the camera to the next set point...Basically I have no Idea why the stamp on start up is making the Tilt Output High unless I have a wacky signal from the LTC
IF LTC=<2500 XOR LTC=>500 XOR LTC1=<2500 XOR LTC1=>500 THEN STOP
STOP:
·LOW Up
·LOW DWN
·LOW Right
·LOW Left
·RETURN
IF LTC=<2500 XOR LTC=>500 XOR LTC1=<2500 XOR LTC1=>500 THEN STOP
STOP:
·LOW Up
·LOW DWN
·LOW Right
·LOW Left
·RETURN
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I usually defend against this by having the FIRST thing in my BS2 program be an unconditional setting of a 'default' value for every I/O pin I'm using. So on reset I'm guaranteed to know whether my pins are input or output, and if output I have a guaranteed value set for that pin.
Were I you I'd put a 10 Kohm resistor between the BS2 TILT_UP pin and ground, to guarantee even when the BS2 is OFF, that pin will be LOW.
Oh, and having googled it, the LTC1298 is an AtoD converter.· I assume you're using it to determine the camera position?· As such, I don't think it has anything to do with the TILT_UP pin going 'crazy' -- it's much more likely the missing pull-down resistor, or the missing initialization code for the BS2.
Post Edited (allanlane5) : 2/8/2006 2:51:38 PM GMT