ad pot fastest response!


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Alaskanphoenix's Avatar
    Alaskanphoenix Guest

    Default ad pot fastest response!

    HI,
    i must poll 7 pots on a 16f88 and send a message only when the pot is used,i tried to write and read the adval on the on-chip eeprom but it is a very slow process and i need a fast response!
    Any idea or code example?

    Thank you very much

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Alaskanphoenix, Is there some reason you are writing the value to EEPROM?

    Dave Purola,
    N8NTA

  3. #3
    Alaskanphoenix's Avatar
    Alaskanphoenix Guest


    Did you find this post helpful? Yes | No

    Default

    My programming skill is very low, so i write in eeprom only for my laziness!
    But i thing it is not very good!

    Thanks

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    if you plan to do something usefull with those value when the power is removed and then power up.. i'll suggest to detect the when the power is remove and then save your value to the EEPROM.

    I know Melanie already posted something on that with the according circuit... can't find it as now.

    ow if you need for speed, don't use ADCIN but read/write and configure your PIC A/D yourself. not hard, code space saving and much faster. OK for assembly too but... accessing register in PBP could be really fast enough.
    Last edited by mister_e; - 14th April 2006 at 17:20.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    OK got the post of Melanie

    http://www.picbasic.co.uk/forum/show...52&postcount=3

    So now, depending of your current stuff, you may use Interrupts (on PORT change, INT0, INT..., Analog comparator...) or polling the PIN for a low level. quite simple to do.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Alaskanphoenix's Avatar
    Alaskanphoenix Guest


    Did you find this post helpful? Yes | No

    Default

    thank you Mister_e

    i already use the ad configuration registers,but the polling of the 7 pots isn't fast enough!I read instant interrupt post and I think i must use the A/D Converter Interrupt but i don't understand how to configure and use interrupts! Could you post an example or another way to poll the ad pins and send only the one is used?

Similar Threads

  1. Using the Pot command.
    By timseven in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th August 2009, 20:23
  2. A/D, Pot, Input, A,B So lost now....
    By Helmutt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th March 2008, 22:23
  3. "quantizing" AD values
    By dar303 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st February 2007, 21:49
  4. Replies: 4
    Last Post: - 24th January 2007, 22:20
  5. pot controlled pwm -- help
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th January 2006, 12:29

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