Hey bruce thanks a lot Bielive it or not i learned a lot form that small little part I as wondering if You can read the analog and pulse low on the same pin?
Hey bruce thanks a lot Bielive it or not i learned a lot form that small little part I as wondering if You can read the analog and pulse low on the same pin?
I did a little bit more research on this But its pretty hard what i wanted to do is read a analog voltage off a circiut board andif that reading is true I want it to pulse low through the same pin reading the voltage will this be possible?
edit: bruce can you help me explain what ever line means it will give me a betetr understanding of how to see if i can use the if then statment to flash the led
Last edited by thm ov3rkill; - 23rd February 2009 at 04:39.
Here is the hangup in your question:In English, True / False statements are digital statements, so when you say, "and if that reading is true ". . . we are not sure what you want "true" to represent. Please explain further . . . Does " true" represent a specific voltage, or just any voltage? Are you trying to test for a specific voltage? Bruce gave you the code above to receive the value of the voltage, so what do you want to do with that information?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
well joe thanks for replying what I want to do is... I want to be able to test a analog voltage peroid. And if that analog volatge is in fat true then I want it to pulse low out of the same pin testing that voltage.
edit i dont want to see how much the voltage is i want to see when it read analog
Last edited by thm ov3rkill; - 24th February 2009 at 00:31.
I'm taking a stab at this. I believe when you say "true" you are wanting to say "through", meaning "complete" or "done", is this correct?edit i dont want to see how much the voltage is i want to see when it read analog
And if that is the case, then it can be done but your circuit will have to be made to monitor your analog signal and have an LED at the same pin.
It would be simpler to use one pin for the analog signal input then turn ON an LED on another pin (setup as an output) when the A/D is completed or "through".
Louie
Ok you want to test an analog voltage, what are you testing for? Do you mean any value greater than zero ?So if I understand correctly . . .And if that analog volatge is in fat true then I want it to pulse low out of the same pin testing that voltage.
edit i dont want to see how much the voltage is i want to see when it read analogWhere PortA.0 in this example is your analog input / output portCode:If voltage is > 0 then PortA.0 = 0 'set port latch to low status before enabling tris TRISA.0 = 0 ' Turn input into output enabling port to pull low. else TrisA.0 = 1 ' Keep port in high impedance input status endif
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hey joe Well this is the thing I want to setup a little project . You may remmeber me from the xbox 360 thread. But i didint get a chance on that. So i wanted to seeif i can acually get to read the trigger press and pulse out.
Also I wanted this to be done on a pic 12f683
Well The reason i want it on the same pin because I dont think i can kill 2 birds with one stone meaning as There is only on spot to read and fire of the controller which is called the wiper. I have seen this done before. So lets say i pull the trigger the pic reads the analog then it pulses low.
I did not forget . . . Here is what I am having trouble understanding "i pull the trigger the pic reads the analog then it pulses low" Exactly what do you mean by "the PIC reads the analog", What exactly must it see, to then make the pic pulse low? What state is the pin in when the condition is NOT met ? What state is it in when you want the pic to fire ?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks