diff options
author | Leo C | 2014-10-14 12:53:48 +0200 |
---|---|---|
committer | Leo C | 2014-10-14 12:53:48 +0200 |
commit | 41d36f28612cb6c49cf0260236f3b834549883be (patch) | |
tree | a9c8c4e81d1cff76a8473498d2a9a71c76216450 /avr/main.c | |
parent | 04a63b0d5660f1c0c0b7e8123e4f56d188e52a5d (diff) | |
download | z180-stamp-41d36f28612cb6c49cf0260236f3b834549883be.zip |
pin command, add user configurable i/o pins
Diffstat (limited to 'avr/main.c')
-rw-r--r-- | avr/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -95,11 +95,10 @@ void setup_avr(void) CLKPR = 0; /* Timer */ - PRR0 &= ~_BV(PRTIM2); - OCR2A = F_CPU / 256 / 1000 - 1; /* Timer2: 1000Hz interval (OC2A) */ - TCCR2A = (0b10 << WGM20); /* CTC Mode */ - TCCR2B = (0b110 << CS20); /* Prescaler 256 */ - TIMSK2 = _BV(OCIE2A); /* Enable TC2.oca interrupt */ + PRR1 &= ~_BV(PRTIM3); + OCR3A = F_CPU / 1000 - 1; /* Timer3: 1000Hz interval (OC3A) */ + TCCR3B = (0b01<<WGM32)|(0b001<<CS30); /* CTC Mode, Prescaler 1 */ + TIMSK3 = _BV(OCIE3A); /* Enable TC2.oca interrupt */ } static |