A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
hi all, trying to run a 16F676 @ 20mhz instead of 4mhz. simply changing the code to say define osc 20 doesn't work (just blinks the led 5 times slower - i.e. the code is generated to run @ 20mhz but the chip is still running @ 4mhz. i see i need to tell the chip to use the HS oscillator (it's all wired up correctly). i have downloaded hex code and run it and it use the oscillator okay, but using picbasic i need to set a register (config) to tell it to use the external xtal. however, picbasic can't change this value and pickit usb programmer doesn't have any option. perhaps i can do this in asm? need to change the location 2007h to value decimal value 12690. anyone know anything about this? thanks steven |
|
|
|
Did you actually change the osc, or just the code?
On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" <S...@aol.com> writes:
|
|
|
|
Yeah, as I was using the internal 4mhz clock I added a 20mhz crystal across the OSC1/OSC2 (clkin/clkout) ports and grounded each port using a 22pF capacitor. It doesn't care if I remove the crystal but sample hex code on voli? uses it as if I remove the crystal the led stops blinking. --- In , amg amg <controlsdude2000@j...> wrote: > Did you actually change the osc, or just the code? > > On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" <SWMillar@a...> writes: > hi all, > > trying to run a 16F676 @ 20mhz instead of 4mhz. simply changing the > code to say > > define osc 20 doesn't work (just blinks the led 5 times slower - i.e. > the code is generated to run @ 20mhz but the chip is still running @ > 4mhz. |
|
|
|
What are you using to write to the PIC? If it is MPLAB do you have the _HS_OSC directive enabled in you __config line? --- swmillar <> wrote: > Yeah, as I was using the internal 4mhz clock I added > a 20mhz crystal > across the OSC1/OSC2 (clkin/clkout) ports and > grounded each port > using a 22pF capacitor. It doesn't care if I remove > the crystal but > sample hex code on voli? uses it as if I remove the > crystal the led > stops blinking. > > --- In , amg amg > <controlsdude2000@j...> wrote: > > Did you actually change the osc, or just the code? > > > > On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" > <SWMillar@a...> > writes: > > hi all, > > > > trying to run a 16F676 @ 20mhz instead of 4mhz. > simply changing the > > code to say > > > > define osc 20 doesn't work (just blinks the led 5 > times slower - > i.e. > > the code is generated to run @ 20mhz but the chip > is still running > @ > > 4mhz. __________________________________ |
|
|
|
Hi I'm using Microchips Pickit 1 Flash starter kit. There is no option for any speed (except 2.5khz osc?) --- In , Kevin Terry <kevinterry@y...> wrote: > What are you using to write to the PIC? If it is MPLAB > do you have the _HS_OSC directive enabled in you > __config line? > --- swmillar <SWMillar@a...> wrote: > > Yeah, as I was using the internal 4mhz clock I added > > a 20mhz crystal > > across the OSC1/OSC2 (clkin/clkout) ports and > > grounded each port > > using a 22pF capacitor. It doesn't care if I remove > > the crystal but > > sample hex code on voli? uses it as if I remove the > > crystal the led > > stops blinking. > > > > --- In , amg amg > > <controlsdude2000@j...> wrote: > > > Did you actually change the osc, or just the code? > > > > > > On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" > > <SWMillar@a...> > > writes: > > > hi all, > > > > > > trying to run a 16F676 @ 20mhz instead of 4mhz. > > simply changing the > > > code to say > > > > > > define osc 20 doesn't work (just blinks the led 5 > > times slower - > > i.e. > > > the code is generated to run @ 20mhz but the chip > > is still running > > @ > > > 4mhz. > > > > __________________________________ |
|
|
|
Check page 52 of this pdf for starters. http://www.microchip.com/download/tools/picmicro/demo/pickit/40051c.pdf --- swmillar <> wrote: > Hi > > I'm using Microchips Pickit 1 Flash starter kit. > There is no option > for any speed (except 2.5khz osc?) > > --- In , Kevin Terry > <kevinterry@y...> wrote: > > What are you using to write to the PIC? If it is > MPLAB > > do you have the _HS_OSC directive enabled in you > > __config line? > > --- swmillar <SWMillar@a...> wrote: > > > Yeah, as I was using the internal 4mhz clock I > added > > > a 20mhz crystal > > > across the OSC1/OSC2 (clkin/clkout) ports and > > > grounded each port > > > using a 22pF capacitor. It doesn't care if I > remove > > > the crystal but > > > sample hex code on voli? uses it as if I remove > the > > > crystal the led > > > stops blinking. > > > > > > --- In , amg amg > > > <controlsdude2000@j...> wrote: > > > > Did you actually change the osc, or just the > code? > > > > > > > > On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" > > > <SWMillar@a...> > > > writes: > > > > hi all, > > > > > > > > trying to run a 16F676 @ 20mhz instead of > 4mhz. > > > simply changing the > > > > code to say > > > > > > > > define osc 20 doesn't work (just blinks the > led 5 > > > times slower - > > > i.e. > > > > the code is generated to run @ 20mhz but the > chip > > > is still running > > > @ > > > > 4mhz. > > > > > > > > > > > > __________________________________ > __________________________________ |