Changeset df91872 in avrstuff for blinkled/main.c
- Timestamp:
- Apr 30, 2011, 9:37:02 AM (13 years ago)
- Branches:
- main
- Children:
- 13b28d3
- Parents:
- de0f65f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
blinkled/main.c
rde0f65f rdf91872 11 11 wdt_enable(WDTO_2S); 12 12 // configure timer 0 for a rate of 16M/(256 * 256) = ~244Hz 13 TCCR0 = 4; // timer 0 prescaler: 256 13 TCCR0A = 0; // timer 0 prescaler: 256 14 TCCR0B = 4; 14 15 15 16 //debug LED - output 16 DDR B|= 255;17 DDRD |= 255; 17 18 18 PORT B= 0xAA;19 PORTD = 0xAA; 19 20 20 21 while(1) { … … 25 26 if (TIFR & (1 << TOV0)) { 26 27 TIFR = (1 << TOV0); // reset flag 27 PORT B++;28 PORTD++; 28 29 } 29 30 }
Note:
See TracChangeset
for help on using the changeset viewer.