Page 1 of 1

18F4520 first time use

Posted: Sat May 11, 2013 7:29 pm
by Frank607
Hi,

This the first time that I play with a 18F4520. I have it mounted on a breadboard with ICSP. To test my setup I have made a simple flowchart. LED on and off. I use a crystal 19.66.. MHz

The LED is constant turned on, it will not go on and off.

I know I do something wrong, but I don’t know what. The hardware is very simple, so it has to do something with the flowchart (config)

For a 18F4520 there are so many options…… Please can someone take a look to my flowchart? I want this PIC to work :-)

Thanks

Frank

Re: 18F4520 first time use

Posted: Sat May 11, 2013 8:18 pm
by medelec35
Hi Frank,
You will need to disable watchdog timer which is causing you hardware to keep resetting.

Can you also disable both low voltage programming and Extended CPU.
As they will cause different issues.

Martin

Re: 18F4520 first time use

Posted: Sat May 11, 2013 9:30 pm
by dazz
Hi Frank
Another to watch out for is the PortB A/D Enable If you use an Lcd you will need to set it to digital ( I spent the best part of 4 days trying to work out why an Lcd would not run a few months ago :lol: , now its the first config setting i got to)

Regards
Dazz

Re: 18F4520 first time use

Posted: Sun May 12, 2013 9:17 am
by Frank607
Hi,

It was indeed the watchdog timer, thanks, all is working now.

The setting PortB A/D is standard to digital. I will keep this setting in mind.

Thanks and regards,

Frank

Re: 18F4520 first time use

Posted: Sun May 12, 2013 10:56 am
by medelec35
Your welcome Frank.
We are all just glad your up and running.

Martin