Menu

12F675 not running

Help
2011-07-31
2013-05-30
  • Nobody/Anonymous

    Hi,

    I have a PICkit2 with the Low Pincount Board from Microchip. It came with a 16F690 installed. And I
    went through a few hello-world-variations with GCB fine. A great tool!

    My real project is going to use a 12F675 instead, though. And I am having a hard time getting that
    to run. Now the problem may be anything but GCBasic related, I am a real newbie at this, but
    maybe someone can still help me.

    Hardwarewise I added a connection on the Low Pin Count Board from Pin 5 to JP4. I did that to
    have a LED connected to GP2 / PortA.2. Instead of the PortC-Connections that are standard
    on the board.

    The program is very very simple:

    #chip 12F675,4
      Do Forever
        Set PORTA.2 On
        Wait 500 ms
        Set PORTA.2 Off
        Wait 500 ms
    Loop
    

    It compiles fine and gets transferred using the PICkit2. I checked the box "VDD PICkit2" box
    to power the PIC on the Board. But nothing happens.

    I have tried a lot of combinations of the #config and #chip settings but I could not get
    any visible reaction.

    Putting back in the 16F690 and "#chip 16F690,4" in my sample program works fine.

    I have also tried several chips in case I fried one before.

    What else can I try to debug this or even get it working?

    Thanks for reading so far,
    Marian

     
  • Marian Aldenhövel

    Sorry for showing up as "nobody". Have registered now.

    Marian

     
  • Marian Aldenhövel

    Hi,

    Figured it out after more surfing! I am sorry for being so dumb.

    The problem was that there is no PORTA for the 12F675, but it is called GPIO
    instead. I got a hint only after adding a

      DIR PORTA OUT

    to my program and found out that it won't compile :-). When researching that
    problem I finally hit the right google lode.

    Thank you very much for a great product!

    Ciao, MM

     
  • Hugh Considine

    Hugh Considine - 2011-07-31

    On most of the 8 pin PICs, you need to refer to the IO port as GPIO. Try changing "PORTA.2" to "GPIO.2".

    I have confused myself several times with this, especially when taking code from a bigger PIC and putting it on a smaller one!

     
  • Hugh Considine

    Hugh Considine - 2011-07-31

    No problem, it was an easy question to answer. I should probably have the compiler give a warning for that.

    And just to complicate things, on the newer 12F1s like the 12F1822 the port is called PORTA!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.