Menu

PIC12F675

Help
2009-07-19
2013-05-30
  • Nobody/Anonymous

    Hi
    I'm a beginner in the PIC world. I have a problem with running my program

    Source Code
    #chip 12F675, 4

    dir gpio.0 out

    'Main routine
    Start:

    'Turn one LED on, the other off
    SET gpio.0 OFF

    wait 1 sec

    'Now toggle the LEDs
    SET gpio.0 ON

    wait 1 sec

    'Jump back to the start of the program
    goto Start

    Problem
    It compiles with no error, It load to the PIC with Micorchip PICKit 1 with out and error, but does nothing when it's powered up

     
    • Hugh Considine

      Hugh Considine - 2009-07-19

      What oscillator are you using? By default, GCBASIC assumes you're using an external crystal. If there's no crystal attached and you intend to use the chip's internal oscillator, add this line:

      #config osc = int

       
    • Nobody/Anonymous

      also turn off the wdt

       

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.