12f509 Dice problem.

Discussion in 'Embedded Systems and Microcontrollers' started by Libration, Jul 10, 2009.

  1. Libration

    Thread Starter New Member

    Jul 10, 2009
    3
    0
    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.
     
  2. walid el masry

    Active Member

    Mar 31, 2009
    132
    0
    Last edited: Jul 10, 2009
  3. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,675
    899
    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
     
  4. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
    AAC respects the rights of copyright owners so please refrain from posting links to free books that should be pay-for - refer to the Item 5 in the ToS. Thank you.

    Dave
     
  5. walid el masry

    Active Member

    Mar 31, 2009
    132
    0


    iam sorry i miss it
     
  6. Libration

    Thread Starter New Member

    Jul 10, 2009
    3
    0
    Walid, Thank you for the info on both devices, am studying for difference between.

    WL.
     
  7. Libration

    Thread Starter New Member

    Jul 10, 2009
    3
    0
    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.
     
Loading...