Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | driving me mad - can't run @ 20mhz

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.

driving me mad - can't run @ 20mhz - swmillar - Sep 18 10:48:00 2003


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





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: driving me mad - can't run @ 20mhz - amg amg - Sep 19 12:21:00 2003

Did you actually change the osc, or just the code?
 
On Thu, 18 Sep 2003 15:48:18 -0000 "swmillar" <S...@aol.com> 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.





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: driving me mad - can't run @ 20mhz - swmillar - Sep 19 12:27:00 2003

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.





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: driving me mad - can't run @ 20mhz - Kevin Terry - Sep 20 12:55:00 2003

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.

__________________________________






(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: driving me mad - can't run @ 20mhz - swmillar - Sep 21 7:21:00 2003

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.
> >
> > __________________________________





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: driving me mad - can't run @ 20mhz - Kevin Terry - Sep 23 10:01:00 2003

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.
> > >
> > >
> >
> >
> > __________________________________
>

__________________________________





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )