Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 7372800UL
- #include <avr/io.h>
- #include <util/delay.h>
- #include <avr/interrupt.h>
- uint16_t data[] = {0, 0, 0, 0};
- int main(void){
- DDRD = 0xff;
- DDRB = 0xf0;
- //PORTA = 0xff;
- PORTB = 0xff;
- TCCR1B = _BV(WGM12) | _BV(CS11);
- OCR1A = 9216;
- TIMSK = _BV(OCIE1A);
- sei();
- ADMUX = _BV(REFS0) | 0;
- ADCSRA = _BV(ADEN) | _BV(ADPS2) | _BV(ADPS0);
- uint16_t values[] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f};
- while(1){
- ADCSRA |= _BV(ADSC);
- while(!(ADCSRA & _BV(ADIF)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement