You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tanish25
759597d8f9
|
2 years ago | |
---|---|---|
.. | ||
Makefile | 2 years ago | |
main.c | 2 years ago | |
main.elf | 2 years ago | |
main.hex | 2 years ago | |
main.o | 2 years ago | |
readme.txt | 2 years ago |
readme.txt
Registers involved:
GPIO:
DDRL: Data Direction Register for Port L= 0xFF for output
DDRC: Data Direction Register for Port C= 0xFF for output
ADC:
ADCSRA: ADC Control and Status Register A = 0x87
Bit 7= 1= ADC Enabled
Bit 6= ADSC: ADC Start Conversion Bit- In Single Conversion mode, write this bit to one to start each conversion.
Bit 4= ADIF: ADC Interrupt Flag- This bit is set when an ADC conversion completes and the Data Registers are updated
Bit [2:0] = 111 = Prescaler-128
ADMUX: ADC Multiplexer = 0xC0
Bit [7:6] = 01 = Vref= AVcc = 5V
Bit 5 = 1 = Result(10-bits-wide) is left-justified
Bit [4:0] = 00000 = Input at ADC0
ADCL: ADC Data Register Lower= stores the lower 8 bits of result of conversion
ADCH: ADC Data Register Higher= stores the higher 8 bits of result of conversion