Menu

Timer0

2008-01-31
2013-05-30
  • Nobody/Anonymous

    It is better not to use the PS_1/2 - PS_1/256 constant because the compiler makes the / simbols to divide process. I use 0-7 number instead of constant. The code seems simplier.

     
    • Nobody/Anonymous

      GCBASIC is pretty lenient about constant names - only these things are banned:
      - ;
      - '
      - :
      - "
      - spaces

      Any other symbol is treated as part of the constant name. Here is an example of how GCBASIC compiles an InitTimer1 command on an 18F4620:

      ;InitTimer1 Osc, PS1_1/8
          movlw    1
          movwf    TMR1SOURCE,BANKED
          movlw    48
          movwf    TMR1PRES,BANKED
          call    INITTIMER1

       

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.