Changeset df91872 in avrstuff for blinkled/main.c


Ignore:
Timestamp:
Apr 30, 2011, 9:37:02 AM (13 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
13b28d3
Parents:
de0f65f
Message:
  • Blinkdel for attiny2313 (and easier to adapt)
  • Ramcard schematic update

git-svn-id: svn://pulkomandy.tk/avrstuff@36 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • blinkled/main.c

    rde0f65f rdf91872  
    1111        wdt_enable(WDTO_2S);
    1212    // 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;
    1415
    1516        //debug LED - output
    16         DDRB |= 255;
     17        DDRD |= 255;
    1718
    18         PORTB = 0xAA;
     19        PORTD = 0xAA;
    1920
    2021        while(1) {
     
    2526                if (TIFR & (1 << TOV0)) {
    2627                        TIFR = (1 << TOV0); // reset flag
    27                         PORTB++;
     28                        PORTD++;
    2829                }
    2930        }
Note: See TracChangeset for help on using the changeset viewer.