Try
OSCCON = %01111000
OSCTUNE = %01000000
DEFINE OSC 32
I use "INTIO2" but your setting should make no difference if you don't use osc pins as digital in/out.
Cheers
Al.
Try
OSCCON = %01111000
OSCTUNE = %01000000
DEFINE OSC 32
I use "INTIO2" but your setting should make no difference if you don't use osc pins as digital in/out.
Cheers
Al.
All progress began with an idea
I'm not the best at reading the manual for this chip but from what I read on the data sheet OSCTUNE = %01000000 bit 6(PLLEN) can only be used with a 4 or 8 MHz oscillator.
OSCCON = %01111000 defines a 8 MHz internal oscillator. I think the first part should be of OSCCON should be OSCCON = %011111xx that defines an internal stable oscillator. I don't understand what the last two bits do so that would take some more exploration. It looks like you've got a plethora of options that depend on your specific situation.
In smaller chips the port usually needs to be set to digital for LEDs to light. I couldn't figure out how to do that for this chip.
Also, if the LED takes 2.2 volts of the 5 volts applied that leaves 2.8 volts for the 1k resistor. That's only 2.8 milliamps if the chip doesn't drop any voltage. I think that's low and am surprised it will light with 5 volts applied.
I hope it helps.
He is using high brightness LEDs. They might consume less than the average 20mA used by common LEDs (might be very high efficiency LEDs).
Robert
Bookmarks