Menu

what is wrong here?

Help
2009-08-13
2013-05-30
  • Nobody/Anonymous

    #chip 10f200, 4 'mhz 
    #config  MCLRE=off, WDT=off

    start: 
    set gpio.0 on
    set gpio.1 on
    set gpio.3 on
    goto start

    But nothing happens why? it compiles and programs fine

     
    • Nobody/Anonymous

      Don't you have to do "DIR GPIO.x OUT" to set it up as an output?

      Joe

       
    • kent_twt4

      kent_twt4 - 2009-08-14

      It's like that, but with the baseline devices the TRIS or direction has to be set all at once.  Also suspect the config for the internal osc needs to be set.  Here's the setup for blinky leds:

      #chip 10f200, 4
      #config INTRC_OSC   

      #define LED1 GPIO.0
      #define LED2 GPIO.1
      #define LED3 GPIO.2
      dir GPIO b'001000'

       

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.