Menu

Syntax problem

Help
2008-09-18
2013-05-30
  • Nobody/Anonymous

    When I try to compile the program with this in, I get a syntax error for lines 10 through 14. Is the syntax invalid? I have had similar problems with the GPIO pins in other basics, too.

    1  #chip 12f629,4
    2  #config MCLRE = ON, INTRC_OSC_NOCLKOUT
    3
    4  #define STRT GPIO.0
    5  #define UP GPIO.1
    6  #define DN GPIO.2
    7  #define DIR GPIO.4
    8  #define MOT GPIO.5
    9
    10  dir GPIO.0 in
    11  dir GPIO.1 in
    12  dir GPIO.2 in
    13  dir GPIO.4 out
    14  dir GPIO.5 out

     
    • kent_twt4

      kent_twt4 - 2008-09-18

      Ouch! bad choice of a constant, #define DIR GPIO.4.  Try something else besides DIR.  You could also use 'dir GPIO b'110000' if you care to.

       
    • Nobody/Anonymous

      Thanks that cured the problem!!

       

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.