Menu

gcbasic and 16F767

Help
2009-07-07
2013-05-30
  • alejandro1957

    alejandro1957 - 2009-07-07

    hello, I am alejandro.
    I have a small problem, I am converting a code in mikrobasic for 16f767( three PWM) in code gcbasic.
    I have the problem of configuring ccp2 in # define.
    someone to an example of configuring a 16f767?

       
    sorry my English

     
    • kent_twt4

      kent_twt4 - 2009-07-08

      Huh, did not realize that any of the 16f'''s had three PWM channels, learned something new, very nice.  Just got a 18f1330, to do just that also.

      To use the hardware PWM in GCBasic, look to the command reference/ HPWM in the GCBasic folder/Help file.  There you will find an example on how to use the HPWM sub.  In the include/lowlevel folder there is the pwm.h file that shows how GCBasic sets up to three CCPxCON registers.  Have fun.

       
    • alejandro1957

      alejandro1957 - 2009-07-12

      resolved.
      GCBasic uses default RC.1 as CCP2.
      thanks.

       
    • kent_twt4

      kent_twt4 - 2009-07-12

      Perhaps a bit of confusion on my part, see now that the 16f767 CCP2 pin can be mapped to RB3 pin by the config register.  So presumably #config CPP2_RB3 worked, if that's what the goal was.

       
    • alejandro1957

      alejandro1957 - 2009-07-12

      thanks for the reply.
      even if it does not work, by mistake.
      however the default setting CCP2 as RC.1 engines work very well

      If configured with the register CCPMultiplex

       

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.