Add thermistor adc reading
This commit is contained in:
parent
a9f5c42243
commit
953034cab8
@ -8,17 +8,11 @@ void ADC0_init(void) {
|
||||
PORTD.PIN6CTRL |= PORT_ISC_INPUT_DISABLE_gc; /* Disable */
|
||||
PORTD.PIN6CTRL &= PORT_PULLUPEN_bm;
|
||||
|
||||
/* Voltage reading T2 */
|
||||
PORTD.PIN2CTRL &= ~PORT_ISC_gm;
|
||||
PORTD.PIN2CTRL |= PORT_ISC_INPUT_DISABLE_gc; /* Disable */
|
||||
PORTD.PIN2CTRL &= PORT_PULLUPEN_bm;
|
||||
/* Thermistor */
|
||||
PORTD.PIN3CTRL &= ~PORT_ISC_gm;
|
||||
PORTD.PIN3CTRL |= PORT_ISC_INPUT_DISABLE_gc; /* Disable */
|
||||
PORTD.PIN3CTRL &= PORT_PULLUPEN_bm;
|
||||
|
||||
/* Voltage reading T1 */
|
||||
PORTD.PIN1CTRL &= ~PORT_ISC_gm;
|
||||
PORTD.PIN1CTRL |= PORT_ISC_INPUT_DISABLE_gc; /* Disable */
|
||||
PORTD.PIN1CTRL &= PORT_PULLUPEN_bm;
|
||||
|
||||
|
||||
ADC0.CTRLC = ADC_PRESC_DIV4_gc;
|
||||
VREF.ADC0REF = VREF_REFSEL_VDD_gc; /* Internal reference */
|
||||
ADC0.CTRLA = ADC_ENABLE_bm /* ADC Enable: enabled */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user