Overclocking PICs

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
What are your experiences overclocking PICs?

Out of curiosity I changed the crystal for PIC 18f24j10 to 12.28 MHz (4x PLL = 49.12 MHz). Specification is 40 MHz max.

It causes a considerable increase in display refresh speed, especially using fonts including to set all the background pixels.

There are other means to improve speed:

-To write the text again in the background color
-To store pixel values in a points list, and restore later (mind the small RAM on some PICs).
-To prepare bitmap in memory then use optimized code to write it to LCD as bitmap
 

MrChips

Joined Oct 2, 2009
30,706
Going from 10MHz to 12.28MHz is a 23% increase in speed.
I doubt that this a "considerable increase".

All MCUs will have a margin of safety and will tolerate some overclocking. How much? That depends on the particular MCU and where that specific individual chip sits on the bell curve.

I was able to increase a DSP56F807 clock from 80MHz to 120MHz (a 50% increase).

Be mindful that things such as SPI and SCI rates will also change.
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
Going from 10MHz to 12.28MHz is a 23% increase in speed.
I doubt that this a "considerable increase".

All MCUs will have a margin of safety and will tolerate some overclocking. How much? That depends on the particular MCU and where that specific individual chip sits on the bell curve.

I was able to increase a DSP56F807 clock from 80MHz to 120MHz (a 50% increase).

Be mindful that things such as SPI and SCI rates will also change.
Well I have some HEX numbers displaying currently, and they are updated in a cyclic manner. The increase in display refresh speed is noticeable, and more than welcome. I would not bother to get extra crystals for 16 MHz etc. to try pushing it further, but these 12.28 MHz crystals I have around, and it seems to be working fine.

Maybe problems can arise at lower voltages, or using some pheripherals.

In general I would be interested how much PIC clock can become increased, until real problems arise. But it's not that important to test this myself. As well considerable overclocking is of course out of specification.

If a 23% increase in clock speed can be used regularily, above the rating in the datasheet, I would say yes no problem, but for commercial PCB, don't use if possible. Means use a chip with larger RAM, and solve it by different code.

Same like operating PICs from 6v they won't burst into flames immediately, but there is some voltage point where they will heat up and fail.
 

ErnieM

Joined Apr 24, 2011
8,377
As I have never considered overclocking I have no experience. You could get a 3200% increase in speed without overclocking anything by going to a PIC32.

That also helps with your ROM space problem.
 

Sensacell

Joined Jun 19, 2012
3,432
Overclocking falls into a hobby / fetish zone for me, sure it might work, but isn't it hard enough to get things to work right when you stay WITHIN the manufacturers recommended parameters? Why open yourself up to situations where your designs could fail in some fiendishly subtle way?
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
As I have never considered overclocking I have no experience. You could get a 3200% increase in speed without overclocking anything by going to a PIC32.

That also helps with your ROM space problem.
It is not exactly a problem, since only small bitmaps are needed. One 32K EEPROM is perfectly enough. Also I have ordered some 4mbit serial flash chips which I will get later today. Together with some 24F PICs.

Since it is a serial TFT, refresh speed is limited.

I would use PIC32 for larger LCD for instance 320x200 (color). 18F would clearly not be powerful or even appreciate at all for this.

Or is it there is not really a large cost saving anymore, if you compare PIC32 to smaller PICs? Exept some very simply applications for which small 8bit PICs are enough.

I am sometimes considering this. At least I won't be using 16F anymore, except for instance 16f1503. It's clearly cheaper/smaller than PIC32.

But I don't think overclocking them is the right way to go (1503 = 16MHz, nearly identical 1824 = 32 MHz).

Stretching it a bit for instance 23% might be OK but I want to read some opinions about that.
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
Overclocking falls into a hobby / fetish zone for me, sure it might work, but isn't it hard enough to get things to work right when you stay WITHIN the manufacturers recommended parameters? Why open yourself up to situations where your designs could fail in some fiendishly subtle way?
Yes I think so too, and will only consider some marginal stretching. Also 12.28 MHz crystals I have many around here, the others are 8 MHz only.

I saw some years ago a webpage reporting 100% overclocking, means double speed, for a 16F PIC. But that's no longer just stretching it a bit.

The 18f24j10 is also weird, there are sometimes problems that the device is not recognized, sometimes can't be programmed. Repeating the process, and it works! In the manual, programming cycles guaranteed = 100, and typically, 1000. That's a bit low.

I bought some of these maybe 3 years ago, but then never used them...

External EEPROM is easier for me to use, I can take the BMP file, load it into GAL programmer and put it at some address into the EEPROM. Using MPLAB, there is no such facility to put a binary at a specified address, or does it exist? The only way I know would be to use DB or DW in assembler, or use a constant array in C.
 

Sensacell

Joined Jun 19, 2012
3,432
Ha!

It is a bitch to get tables into PIC code!

What I do is import data (or generate it with equations) in Excel, then write a little Excel code to add the "DB" or "DW" and requisite tabs, then cut and paste the mess into my source files under MPLAB. Ugly, stupid, but it works.

Anyone know of a more elegant solution?
 
Top