Trail ES Solution
Trail ES Solution
a).
#include <avr/io.h>
#include <util/delay.h>
//From util/delay.h use void _delay_ms ( double __ms) ;
int main(int argc , char const * argv [ ] ) {
DDRD = 0b00000001; // Data Direction Register D:
while(1){
PD3 = 0b00000001;
PD7 = 0b00000000;
_delay_ms(500);
PD3 = 0b00000000;
PD7 = 0b00000001;
_delay_ms(500);
}
return 0;
}
b).
we need output voltage to measure the difference between in/decresment light where
if no light than the resistance has full resistance => the output still the same
c).
// in this example we use the last three digits of our immatriculation number to find the TimerFreq
because with 8 bit we can cover until 11111111 (binary) = 255 (decimal)
d).
(i).
(ii).
// I don't know what he means with remaining hte ADC interrupt and ADC prescaler setting
unchanged !!
(iii).