Carnage
Joined: 21 Aug 2016 Posts: 1
|
About ICD2 and Clock speed |
Posted: Sun Aug 21, 2016 6:55 am |
|
|
Hi,
I use a 18f4455 and two crystals (4mhz and 20mhz) to do some tests and understanding all about quartz clocking and internal clocking.
I would like to know if Mplab, CCS Compiler or my ICD2 will detect if I make a mistake in choosing my clock speed ?
And how to know if my quartz is broken ?
Thank you. |
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Sun Aug 21, 2016 8:15 am |
|
|
Well if the xtal is broken, PIC won't operate ! Unless it has a 'backup internal RC oscillator (failsafe). Since I don't use that PIC I don't know without looking at the specsheet...
NO, if you code for a 4MHz xtal and use a 20, nothing KNOWS that but you !!
If coded for 4 and a 20 is in use, an LED will flash 5x faster though.
Now you could get 'clever' and code some 'autoconfig' code, though that's beyond most students I've seen post here, more of an ASM thing...
Jay |
|