Menu

Symbol CCP1M3 has to be defined

Help
hellron
2015-09-29
2015-10-14
  • hellron

    hellron - 2015-09-29

    Im new to GCB and i wanted to use HPWM on a 10F322 but i get the error

    Error: GCASM: Symbol CCP1M3 has not been defined
    Error: GCASM: Symbol CCP1M2 has not been defined
    Error: GCASM: Symbol CCP1M1 has not been defined
    Error: GCASM: Symbol CCP1M0 has not been defined

    when i try to compile the code, I have a simple understanding of the problem but i cant find the solution, Ive been through the manual and ive googled i promise, any help would be much appreciated.

    thanks

     
  • hellron

    hellron - 2015-09-29

    sorry, i stuck

    ccp1M0 = 1

    into the codce and its compiles is that the solution?

     
  • Anobium

    Anobium - 2015-09-29

    Welcōme, we have updated the driver file for HPWM.

    What version are you using? This will help us, hopefully, fix the issue.

     
  • Anobium

    Anobium - 2015-09-29

    Please also post your code.

     
  • hellron

    hellron - 2015-09-29

    Thanks, i was using the version which was in the bundle from the GCB site, ill get the latest release and see if that works and post my code, but it will be in the morning(UK time)

     
  • Anobium

    Anobium - 2015-09-29

    Please download the latest Hot Release. This may not fix your issue. Cãn you wait a few days until we release the next version?

     
  • William Roth

    William Roth - 2015-10-14

    Hi helron and welcome to the world of Grest Cow Basic !

    Please and pretty please ... when asking for help on certain issues such as this, it is almost imperative for the helpers to see your code and to know the version of GCB thst you are using. .

    We have done extensive work on the PWM library. I have spent many hours on it myself making improvements and adding functionality. .

    So if you will please take the time and do us the courtesy of posting your GCB code, it will help us tremendoulsy in identifying the root cause of the problem and in offering the best posible solution in the shortest amount of time.

    William

     

    Last edit: William Roth 2015-10-14
  • mmotte

    mmotte - 2015-10-14

    HPWM on the 10F322

    Two channels of PWM with 10 bit accuracy
    PWM1 output is IO RA0 on pin5 (8pin dip)
    PWM2 output is IO RA1 on pin4

    Has no CCP(capture/compare/pwm) modules.... does not have CCP bits
    Uses timer2 for PWM

    PWM period is set with PR2 register of Timer2
    PWM duty is set with 8 bits of PWMxDCH and 2 bits of PWMxDCL

    9 registers that control the 2 channels

    timer2
    TMR2 Value
    TM2CON Post,ON,Pre
    PR2 Period

    pwm1
    PWM1CON EN,OE,OUT,POL
    PWM1DCH
    PWM1DCL

    pwm2
    PWM2CON
    PWM2DCH
    PWM2DCL

    What this means is you have to use the registers directly not throught the GCB PWM command.

    GL
    Mike

     
    • Anobium

      Anobium - 2015-10-14

      Do you have a working example? We could integrate into Great Cow Basic.

       

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.