Connect with us

8051 internal adc

Discussion in 'Microcontrollers, Programming and IoT' started by burassu, Feb 19, 2012.

Scroll to continue with content
  1. burassu

    burassu

    36
    0
    Jul 1, 2011
    Hi I am using th internal adc of the 8051 mcu . I need to use all the pins of port 1 as adc. But for a specific function I need to use pin 1.1 , for another function ,pin 1.2 ......

    Is there any code to initialize each pin as an internal adc ??

    Tnks
     
  2. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Hi,

    The 8051 don't have any ADC. You maybe use an improved µC based on 8051 core. Please specify the exact IC reference.

    Olivier
     
  3. burassu

    burassu

    36
    0
    Jul 1, 2011
    89c51ac2
     
  4. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    According to the uC data sheet here under (page 87) "The channel select bit in ADCF register define which ADC channel/port1 pin will be used as ADCIN. The remaining ADC channels/port1 pins can be used as general purpose I/O"

    http://www.keil.com/dd/docs/datashts/atmel/t89c51ac2.pdf

    You you maybe have a look on the ADCF register value generated by your code.

    Olivier
     
  5. burassu

    burassu

    36
    0
    Jul 1, 2011
    ADCF

    Therfore if I write ADCF = 0x01; means that I am using pin1.0?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-