Setting Address via ADC


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    12

    Default Setting Address via ADC

    Hi,

    Just wondering if anyone has any experience or thoughts on setting the ID of a PIC by using the ADC and a resistor network, and mapping the value to an ID on startup. I would like to be able to use an 8-pin chip in a project where I have about 30 devices on a common serial line, but will only have a single free pin. I am aware that the maximum impedance recommended by the datasheet is 10 kOhm and the ADC is 10-bit. I believe the 1% tolerance resistors come in frequent values, hence my thought was something along the lines of a 1k pull up resistor, and using values spaced from 0 to 9k between the pin and ground, thus producing a range of voltages between 0 and 4.5V (5V supply).. Naturally the ADC value will not be exact (nor will resistor voltages), but if I aimed for 50 devices, by my calculations that would leave me +/- 9 ADC values before reading the wrong ID. Is this too small? This is also assuming I can find a perfectly spaced range of resistor values. Space and cost are crucial, hence the choice of small and cheap resistors. Doable?

    Daniel

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Definitely doable, but not necessarily a workable idea. The fact that your IDs are located across 50 devices, brings into play Vcc considerations too. If the VCC across devices varies, you will have ID overlaps. So, it may not work.

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


    Did you find this post helpful? Yes | No

    Default

    breesy, As long as you have the reference for the A/D selected as VDD and VSS as well as the same source used for the resistor divider then it wil work perfectly. The A/D is then ratiometric as far as the source voltage. I would use 1% resistors with the same temperature coefficient.

    Dave Purola,
    N8NTA

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 23:14
  2. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 15:01
  3. Setting up ADC....
    By robertmark68 in forum General
    Replies: 1
    Last Post: - 11th August 2006, 19:08
  4. Setting Up Adc Ports
    By GEEZER in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd August 2005, 04:04
  5. 18f452 internal eprom help
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 13th July 2004, 16:50

Members who have read this thread : 1

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