Programming a PIC 12F1822 Issues


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Programming a PIC 12F1822 Issues

    I also think you need to look at your CONFIG statement. PBP3 requires an indent and a double underscore to start the CONFIG statement and I don't think you can start a second line as you have done. Though if all you're trying to do is blink a light I'd leave all that stuff off and try it without.

    RA0 is also a comparator input. On the 12F683 you need to turn the comparators off with CMCON = 7 and I think you need to do that with the CMxCON1 register. RA0 is also an input for a few other things and you'd think you wouldn't need to turn them off but you just might. One of the inputs is the ICSPDAT and the diode may be stopping the program loading. Try removing it, programm it, reinstall the LED and see if it works.

    Also, if you didn't notice, wdmagic put the TRIS first and then the GPIO which I'm thinking is the preferred order. But they should come after the ANSEL, CMCON(if needed) and the OSCCON and DEFINE OSC settings.

    If you think you might have the LED connected to a different pin on PORTA turn the whole port on with PORTA = %11111111.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Programming a PIC 12F1822 Issues

    Or maybe try another port just to get it blinking.

    Robert

  3. #3
    Join Date
    Jul 2013
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: Programming a PIC 12F1822 Issues

    Thanks to all.

    I have been successful in compiling, but will try these suggestions. The programming part is what is not working. Based on some more research, it appears that my problem may be the PICKIT2 firmware I am using. I am upgrading now, and will try the stand alone to load in the HEX file. Again, thanks to all.

Similar Threads

  1. 12F1822 troubles
    By Charlie in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2012, 13:53
  2. Replies: 19
    Last Post: - 26th April 2012, 21:23
  3. MIBAM and 12F1822...
    By alesniak in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 17th September 2011, 07:45
  4. Programming Issues
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th July 2009, 20:25
  5. New to PIC Programming
    By Keiou in forum General
    Replies: 3
    Last Post: - 29th October 2003, 20:13

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