wow, thanks for the reply.
But damn now Im lost.
Can I just read the AD converter value to a byte? Then use that as my pulse out. I think thats what that code above is doing, but also applying some limits and boot up procedures.
I guess where Im getting most lost is how do I define what I am using on that pin? Or Will it just read what ever it wants to? Do I have to write it to a data spot or can I just use it as a variable?
Servo VAR Portc.5
Potin VAR AD.4 ' Can I do that? Or Do I call it something else to call the AD converter inside the pin.
PULSE VAR BYTE
Loop:
READ AD.4, Pulse
PULSOUT Servo, Pulse
Pause 18
Goto Loop
Thanks again, Sorry I am new at this. Im trying.
EDIT: Ok so super noob question, Is there a difference between calling a PIN by GPIO.? versus Porta.? or Pin 5. I get the port/pin references but I can seem to figure out where the GPIO comes from.
Last edited by Helmutt; - 9th March 2008 at 19:57.
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.
Ah cool, Finally stopped skipping over the 12 pin section and found that out. Thank you.
Easy way...if you left justify the results, you can use the high byte of the result and use the upper 8 bits (low 2 bits ignored), if you right justify, you read both high and low byte of ADRES into a word
As far as how to use the A/D converter, read the manual. There's an example in there, and while it doesn't fit all scenarios, it fits many of them.
Bookmarks