fix 8 bit precision in ex00 and ex01

This commit is contained in:
hugogogo
2025-03-15 14:42:03 +01:00
parent 5904f7c5e0
commit e9e3cd09dd
3 changed files with 8 additions and 5 deletions

View File

@@ -16,7 +16,7 @@
volatile uint8_t adc_channel = 0; // Table 14-6 : alternate function for RV1 on PC0 -> ADC0, LDR on PC1 -> ADC1, NTC on PC2 -> ADC2 ...
// read 3 analog values and print them in uart as hexadecimal 2-number : potentiometer RV1 (Variable Resistor), photoresistor LDR (Light Dependent Resistor), thermistor NTC (Negative Temperature Coefficient)
// read 3 analog values at 8 bits and print them in uart as hexadecimal 2-number : potentiometer RV1 (Variable Resistor), photoresistor LDR (Light Dependent Resistor), thermistor NTC (Negative Temperature Coefficient)
int main() {
char buffer[4];
SREG |= ENABLE_GLOBAL_INTERRUPT; // 7.3.1 : Status Register, bit 7 : I Global Interrupt Enable