Hallo,
arbeite mit MPLAB IDE 8.2 und PICC Lite 9.6.
Nun möchte ich den Timer 1 mit einem ext.RC Glied takten.
Leider gelingt es mir nicht, über Stimulus einen Clock an OSC1 anzulegen und den Timer zum Zählen zu bewegen.
__CONFIG(WDTDIS & PWRTEN & UNPROTECT & UNPROTECT);
//WPU = 0x00;
CMCON = 0x07;
ADCON0 = 0; // Turn off Comparators
ANSEL = 0; // Turn off ADC
// set up direction of I/O pins
TRISA = 0xff; // 0 = out, 1 = In
TRISC = 0b00111; // 0 = out, 1 = In
// initialize timer 0;
OPTION = 0b0111; // prescale by 256
T0CS = 0; // select internal clock
T0IE = 1; // enable timer interrupt
// initialize timer 1;
T1CKPS1 = 0; // Prescaler T1 = 1
T1CKPS0 = 0; // Prescaler T1 = 1
TMR1CS = 1; // select ext. clock
T1SYNC = 1 ; // no sysnc with int. Clock
TMR1GE = 0;
TMR1ON = 1;
TMR1IE = 1; // enable Timer1 interrupt
T1OSCEN = 1; // LPOsc
Die Config Bits sind auf RC und Output eingestellt.
Danke für Eure Hilfe.
Carlo
Edit: Bitte Code-Tags verwenden !