Enhanced PWM Full-Bridge Mode
Hello everyone,
I searched all the forum topics on motor control I could find and went through the manual but I am still at a loss for how to use the Enhanced PWM Full-Bridge mode in PBP for a 18F46K80. Does PBP support this mode or do I have to do an assembly routine that gets called from PBP?
Thanks for any help that can be given.
Paul
Re: Enhanced PWM Full-Bridge Mode
Quote:
PBP support this mode or do I have to do an assembly routine that gets called from PBP?
its not supported, no need to resort to asm though
simply set the required sfr registers yourself
eg
Code:
CCP2CON = %10001100 ;enh pwm complementary output
CCPTMRS = CCPTMRS & %11110011 ;tmr2 for ccp2
T2CON = %00000101
PWM2CON = 10 ;dead time
ccpr2l = 128
Re: Enhanced PWM Full-Bridge Mode
Quote:
Originally Posted by
richard
its not supported, no need to resort to asm though
simply set the required sfr registers yourself
eg
Code:
CCP2CON = 001100 ;enh pwm complementary output
CCPTMRS = CCPTMRS & 110011 ;tmr2 for ccp2
T2CON = 000101
PWM2CON = 10 ;dead time
ccpr2l = 128
In looking at the code I think the CCP2CON would have to be 01xx1100 for forward or 11xx1100 for reverse. I think that is what I got from the manual.
Thanks again.