A/D, Pot, Input, A,B So lost now....


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    Wow, skimask, you must _live_ on this forum
    Nope, just passing by every few minutes in-between work benches and/or projects... Keyboard is at waist level. Easy to type...

  2. #2
    Join Date
    Mar 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    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.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Helmutt View Post

    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.
    Hello Helmutt,
    Yes, GPIO is for the PICs that have GPIO like the 12fseries as they only have 1 port. PortA, B, C are assigned to the ports you actually have. I E. a 16F628a has 2 ports, A & B, whereas another PIC might have several more A B C D . . .
    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.

  4. #4
    Join Date
    Mar 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Ah cool, Finally stopped skipping over the 12 pin section and found that out. Thank you.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Helmutt View Post
    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.
    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.

Similar Threads

  1. floating A/D input
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th April 2009, 14:21
  2. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 15:39
  3. Advice on Input circuitry for 0-10v or Pot
    By bcd in forum Schematics
    Replies: 18
    Last Post: - 12th April 2008, 11:47
  4. Question from New member A/D input 16f876
    By mbruno in forum General
    Replies: 2
    Last Post: - 26th January 2008, 15:52
  5. Replies: 4
    Last Post: - 24th January 2007, 23:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts