Hello all, I have decided to switch over to a 16F690 because it has more pins.=20 In MpSim I can see the pins switching but in real live it isn't=20 happening. The reset pin is on RC1, pin 15. The Gate is on RC0, pin 16.=20 DP1 is on RC3, pin 7. Help! Please! I'm not worried about the proper=20 timing at this point. I just want to get those three pins working. Thanks, rich! Here is the listing: // Crystal Freq =3D 16MHz // Global variables int count =3D 0; // number of interrupts counter int main(void) { PORTA =3D 0b00000000; // Turn PortA off TRISA =3D 0b11111111; // Set PortA as all Inputs PORTB =3D 0b00000000; TRISB =3D 0b11111111; PORTC =3D 0b00001000; // Set RC3 to high TRISC =3D 0b11000100; // Start with DP1 on CM1CON0 =3D 0b00000111; // Turn off Comparators ANSEL =3D 0b00000100; // Set RA2/AN2 as analog InitTimer1(); // Set up the timer // Define commands // PORTC xx543210 5=3DReset, 4=3DGate, 1=3DDP1 int DP =3D 0b00001000; // The decimal points are=20 counted from 1 int Reset =3D 0b00000010 + DP; // Turn on RC1 int GateOn =3D 0b00000001 + DP; // Turn on RC0 int GateOff =3D DP; // Leave only the DP on int GateTime =3D 1000; // The gate time =3D 1 Second int DisplayTime =3D 5000; // The display time =3D 5 seco= nds int TwentyMS =3D 20; // Holds the value for a=20 20mS delay while (1 =3D=3D 1) // Loop forever { PORTC =3D Reset; // Clear the Display PORTC =3D GateOn; // Start counting delay(GateTime); // Count the frequency for one second =3D HZ PORTC =3D GateOff; delay(DisplayTime); // Display the frequency for 5 seconds ReadButton(); } } // End NewControlCode.c void delay(int time) { int limit =3D time; TMR1ON =3D 0; // Turn the timer off TMR1IE =3D 0; // Disable timer interrupts count =3D 0; // Reset the timer interrupt counter TMR1IE =3D 1; // Enable the timer interrupts TMR1ON =3D 1; // Turn the timer on while(count < limit) { } return; } void ReadButton(void) { int Button =3D 0; DebounceButton(Button); } void DebounceButton(int Button) { } void resettimer(void) { //TMR1H =3D 0xCF; // Reset the timer to roll over //TMR1L =3D 0x48; //at 100mS TMR1H =3D 0xFB; // Reset the timer to roll over TMR1L =3D 0x24; //at 1mS } //Timer1 //Prescaler 1:8; TMR1 Preload =3D 3036; Actual Interrupt Time : 100 ms //Place/Copy this part in declaration section void InitTimer1(void){ T1CON =3D 0x31; TMR1IF =3D 0; TMR1IE =3D 1; INTCON =3D 0xC0; } void interrupt MyISR(void){ if (TMR1IF){ TMR1IF =3D 0; resettimer(); count++; } } /*void interrupt tc_int(void) { if (TMR0IE && TMR0IF) { TMR0IF=3D0; count++; return; } } --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .