PDA

View Full Version : MIBAM and 40Mhz (10Mhz x 4 PLL) 18F452 - Chip does not work



sayzer
- 4th May 2011, 13:28
Hi there,

I am using DT's MIBAM routine with 20 port/LEDs.
With 18F452, set to 4x10Mhz PLL clock, chip does not work.

It works with 20Mhz HSOSC with no problem.

Any ideas why it does not work with 40MHz?
I will use 24 ports with 40MHz.

Thank you.

Darrel Taylor
- 5th May 2011, 03:38
Hi Sayzer,

Does it do anything at all? Or is it just dead at that point?

sayzer
- 5th May 2011, 04:02
The circuit has a digit to show the animation mode number. At 40MHz, sometimes( ! ) the digit comes and goes. But port pins used for MIBAM never works.

Thank you Darrel.

Demon
- 5th May 2011, 05:01
Can you confirm that the PIC does indeed work at 40MHz? Maybe you are having a hardware problem with the oscillator (I had something similar once using a breadboard).

Can you add a simple test, maybe blink an LED at a fixed interval?

Darrel Taylor
- 6th May 2011, 20:55
Sayzer,

After checking the program, going through the math, compiling for an 18F @ 40mhz and not finding anything wrong ... I put together a breadboard with an 18F4620 running at 40Mhz with a 10Mhz crystal and 24 LED's.

It works fine.

BAM_INFO says ...
Message[301]: MESSAGE: ('BAM_INFO' - MinPeriod= 173 inst, Cycle= 22774 inst, Pins= 24, FREQ= 219 Hz)

sayzer
- 7th May 2011, 07:20
Thank you very much Darrel.

I also went through the hardware, and found nothing wrong.
10Mhz xtall, 15pf caps, HSPLL (DEF. OSC 40) does not work.
20Mhz xtall, 15pf caps, HS_OSC (DEF. OSC 20) works.

Testing it with 40Mhz using a test code (without MIBAM) is ok.

Demon
- 7th May 2011, 15:44
...
I put together a breadboard with an 18F4620 running at 40Mhz with a 10Mhz crystal and 24 LED's.

It works fine.
...


Sayzer was using an 18F452, not an 18F4620, maybe it's a problem with a particular chipset and not the 18F family?

One thought, Sayzer, did you try with another 18F452? That would rule out a defective unit.

And if you want to rule out the breadboard, try it on another one. I've had only one breadboard so far with a defective track in it.

And a really dumb question, did you confirm that power to the circuit was good? Forgetting to readjust the voltage or current on a variable power supply like the one I use could make for freaky results; not saying that I ever did that noob mistake. :D