ACON0 and ANSEL register

Discussion in 'Embedded Systems and Microcontrollers' started by chassler53852, Jan 28, 2013.

  1. chassler53852

    Thread Starter New Member

    Jan 22, 2013
    10
    0
    so Im working with a pic kit2 demo board with a pic16f690 chip

    I have a program that reads the potinter and lights the leds
    when its turned.
    if (t>60)
    rc0=1
    and so on...
    now I want to read input port ra1 using a temp sensor and pluging it into
    the hole in the serial port on the board that corresponds to ra1

    well its not reading the temp sensor
    do I need to change ANSEL -1; line to something else
    I have changed the ADCON0 to read port RA1 in my loop program.
    and it didnt work. what do I need to do?
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    In the data sheet for the device look for "EXAMPLE 9-1: A/D CONVERSION." It's in assembly, but it tells you all the registers you need change to make that reading.

    Don't just copy the settings. Check each one to see if it suits your needs.

    BTW, what PICkit demo board uses the PIC16F690? What part number?
     
  3. chassler53852

    Thread Starter New Member

    Jan 22, 2013
    10
    0
    its says pic kit 2. from microchip.com came with imab lab and export hex program
     
Loading...