View Single Post
  #10   Report Post  
Posted to alt.binaries.schematics.electronic
ian field ian field is offline
external usenet poster
 
Posts: 396
Default PIC clock source.


"oppie" wrote in message
...

"ian field" wrote in message
...

"oppie" wrote in message
...

"ian field" wrote in message
...

"oppie" wrote in message
...
aifk the type of clock is spec'ed in the 'configuration bits' section
of MPLAB. There is a default clock that is initially used and this
depends on the target device (also specified in MPLAB). Past that, the
download is synchronous so the clock is not initially important just
as long as there is one.

Perhaps a better way of phrasing my question - is the PGC clock
supplied by the ICSP interface sufficient on its own during
programming, or does an external clock have to be provided in the
absence of an internal clock generator?

You need some sort of clock running on the micro in order to do
anything - including ICSP.
Default clocks can be anything from an onboard RC oscillator to the
external crystal osc - varies from device to device and families. Check
the datasheet for the chip in question as to start-up oscillator
configurations.
What device are you planning to use?


Most likely 16f84 since that is what I've found the most tutorials for.


The 16F84 should still be available but it's recommended to use the newer
'A' Version
http://www.microchip.com/stellent/id...ame =en010230

The ICSP spec should give you enough information on the basics:
http://ww1.microchip.com/downloads/e...Doc/30277d.pdf
See page 33 for information specific to the 16F8x parts.

Most of my work has been with the 18F series and we just set the
processor up with a 4 mhz crystal and the ICSP header at miinum. Connect
up the ICD2 = you can program and debug through the MPLAB IDE.
===============
I just checked the ICD2 and it does not support your device. Take a look
at the 18F series instead, They're a newer series and better supported.
Should be about the same cost. The ICD is a neat programing/debug tool to
use and I would try to select a part that is supported by it.

The MPLAB ICD 2 currently supports most PIC and dsPIC
Flash microcontrollers. Flash PICmicro MCU's not
supported are PIC16F72/73/74/76/77/83/84A.


IIRC the f84 is supported by the PICKit 2 - which is what I have, there
seems to be little mystery about devices like the 12f675, whether they use
their internal clock during programming or the PGC signal, they don't need
the crystal or CR which would use up GPIO pins.

The question is whether I need to make provision for external CLK on the
programming header board for any of the devices I might experiment with. So
far I've downloaded numerous tutorials and each author seems to have their
own favourite clock frequency for the assignments, so I have built a clock
module that provides all the common frequencies so it isn't necessary to
keep changing crystals & loading capacitors on the experimentation board,
from the answers so far, it looks like it might be a good idea to include a
CLK in connector on the programming header board.

For the programming header board I'm copying part of the Velleman K8048, it
has 4 sockets 8 pin, 14 pin, 18 pin & 28 pin, if anyone can mention examples
of 14 pin PICs I can search for the data sheets and verify the pinouts - the
other types are common enough and easy to find.