Gast
#689970
Hallo,
Ich benutze ein 8MHz crystal mit zwei 22pF condensoren.
Aber mein program funktioniert nicht.
Es funktioniert gut mit dem 16 MHz external clock:
CKSEL 3...0: 0000
SUT1...0:00
#define FOSC 16000000
Ich benutze auch ein internal Timer. Die program muss e
TCCR1B|=(1<<CS12); //Prescaling: /256
TCCR1B|=(1<<WGM12); //Mode of operation CTC: Top OCR1A
#if (FOSC==16000000)
OCR1A=62500; //So many increments for 1 second
// 16uS (microSeconds) for 1bit increment: When TCNT1
//reaches this value it is reset to 0.
// when F_OSC = 16MHz --> 1 round = 0.0000000625 s
#elif (FOSC==8000000)
OCR1A=31250; //So many increments for 1 second
//32uS (microSeconds) for 1bit increment: When TCNT1
//reaches this value it is reset to 0.
// when F_OSC = 8MHz --> 1 round = 0.000000125 s
#endif
Bitte helfen
Karthik