AnalogReference()

From Microduino Wiki
Revision as of 06:05, 12 August 2016 by Fengfeng (talk) (Created page with "<pre style="color:green"> void analogReference (uint8_t type) </pre> Configure the reference voltage <br> Configure the reference voltage of the mode pin. 函数 analogRead,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
void analogReference (uint8_t type)

Configure the reference voltage

Configure the reference voltage of the mode pin. 函数 analogRead, after reading the analog value, will transform it to one during [0,1023], according to the reference voltage. There are the following types:


DEFAULT : 5V by default. INTERNAL: low consumption mode. ATmega168 and ATmega8 is corresponding to 1.1V to 2.56V. EXTERNAL: Expansion mode. Get reference voltage through AREF pin.

  • Parameters:

type reference type(DEFAULT/INTERNAL/EXTERNAL)

[Return to Arduino Syntax Manual]