pixelsnpings
New Member
Hey.
Im using a PIC16F819 with the timer interrupt and prescaler to send a 40kHz square wave out PORTB (just simply inverting the entire register 80000 times a second.)
I set the prescaler to 128, and put a pre-start value of 27 in the TMR0 register.
But when I actually test the chip in my circuit the LED only blinks 1-2x per second. (used red LED for Test)
can anyone tell me why this might be happening? I've looked over the datasheet for this PIC and I thaught the PIC might be factory calibrated for 31kHz clock speed.
I tryed setting the clock peed myself and still had no success.

Im using a PIC16F819 with the timer interrupt and prescaler to send a 40kHz square wave out PORTB (just simply inverting the entire register 80000 times a second.)
I set the prescaler to 128, and put a pre-start value of 27 in the TMR0 register.
But when I actually test the chip in my circuit the LED only blinks 1-2x per second. (used red LED for Test)
can anyone tell me why this might be happening? I've looked over the datasheet for this PIC and I thaught the PIC might be factory calibrated for 31kHz clock speed.
I tryed setting the clock peed myself and still had no success.