12F509 doesn't do anything


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    5

    Default 12F509 doesn't do anything

    Hello!

    I already had this problem once, but didn't solve it back then but it kept my mind busy so I decided to return to this and solve it, but with no luck.

    I cannot make a 12F509 chip to work with internal oscillator (to be honest - I haven't tried external oscillator or another 509) - something goes wrong. I program the chip with Pickit2 incircuit programmer (I use an adapter so its clean) but it doesn't do anything. I can program the same recompiled file into the 12F675 and it works lika a charm. I have tried both - Melabs Assambler and MicroChip's assambler - same thing - nothing. I suspect that during write, programmator changes the config word or something. Maybe the problem is trivial, but I am not an experienced person so I don't know what I am doing wrong. Please turn me to the right direction!

    So the code is extremely simple - blinking led (don't laugh - I want to start the chip running at first).
    Code:
    @ __config _IntRC_OSC & _WDT_ON & _MCLRE_OFF & _CP_OFF 
     
     DEFINE OSC 4
     Pause 500
     
     Start:
        High GPIO.2
            Pause 1000
        LOW GPIO.2
            Pause 200
        High GPIO.2
            Pause 200
        Low GPIO.2
            Pause 300
        Goto Start
     EnD
    It compiles with no errors (I told that it runs smoothly on 675)

    Thank you!

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Try adding ...
    Code:
    OPTION_REG.5 = 0  ; T0CS internal
    Which gives you back the TRIS bit so you can change GP2 to output.
    DT

  3. #3
    Join Date
    Nov 2008
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Nothing changed but thanks anyway!

    Update:
    Sorry for this silly bothering - I managed to get it running. Seems that the problem was caused by forgetting to comment out config line in the picbabsic include file. But still I am not sure if that was the real problem, because I also initially modified the default include file to use internal RC and to convert MCLR to input but it didn't work. This stays a mystery.
    Last edited by madphys; - 31st January 2010 at 09:07.

Similar Threads

  1. 12F509 / 609 IR and speed control
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th October 2009, 01:51
  2. PIC 12F509 begins to heat at power up
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 25th July 2009, 12:11
  3. Timer and 12F509
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd November 2008, 14:51
  4. 12F509 vs 12C509
    By DavidK in forum Off Topic
    Replies: 4
    Last Post: - 5th June 2007, 03:23
  5. how to use 12F509
    By marad73 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th April 2006, 21:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts