12f509 Dice problem.

Thread Starter

Libration

Joined Jul 10, 2009
3
I have just taken on learning about PIC's to upgrade the manufacture of some timer/sequencers that I produce in small quantities now made with 'discreet' CMOS and EPROMS etc.
My problem is not about that but in my reading of 'The PIC microcontroller' which I purchased (by John Morton) there is a project for a twin Dice with its .asm printed in the back for buyers use.
I have typed it out as I could not find a download of it anywhere and after getting rid of the typo's I can assemble it to .hex and burn it to a 12f509 however on running it it's function is best described as erratic, it functions but puts up invalid leds, speed is jumpy and throws a lot of 2's.
The code is for a 12f508 so have changed the 'list' and 'include'.

What I am after is a known good copy of the .asm (or .hex) as a file, as using typed copy of programms is always fraught with peril.

Maybe it is the fact that I am using the 12f509 that is the problem, if so I hope that someone can clear this up for me. I hope to make a few of these in SMD for Xmas etc giveaways.

Thank you for taking the time to read this.

Your help will be much appreciated.
 

jpanhalt

Joined Jan 18, 2008
11,087
Erratic? An obvious question is whether MCLR (pin 4) is tied high. Microchip recommends a resistor (e.g., 10 to 20 K) to high and a small capacitor (e.g., .01 uF) to ground.

Otherwise, please post your circuit and code.

John
 

Thread Starter

Libration

Joined Jul 10, 2009
3
Jpanhalt, Thanks for the reply, Pin 4 is tied high via 10k. Have used same PCB with a different program in the 12f509 and it works but this second program is very basic. This second program was for the 12f509.

I will obtain some 12f508's and try with original listing.

Many thanks.
WL.
 
Top