correction:
I am really using the HPWM 1 and 2 in my code . I am sorry to have called it pwm1 and pwm2...
I used this lines of code:
HPWM 1,127,15000
HPWM 2,64,15000
but i only have output on hpwm 1 .
Any help please .
Thanks
regards,
Ambrogio
correction:
I am really using the HPWM 1 and 2 in my code . I am sorry to have called it pwm1 and pwm2...
I used this lines of code:
HPWM 1,127,15000
HPWM 2,64,15000
but i only have output on hpwm 1 .
Any help please .
Thanks
regards,
Ambrogio
Hi Ambrogio. Make sure you have HPWM2 enabled in your config's.
thanks Peterdeco1,
could you please jnstruct me to do it?
Do I have to use some defines ? Which ones ?
hope to read from you.
regards,
Ambrogio
I had that problem caused by the configs of tiny bootloader, redirects HPWM2 to another pin on 18F4620...
' __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H ; & _CCP2MX_PORTBE_3H ; NOTE CCP2MX_PORTBE_3H COMMENT OUT
The point is that there is no output on any pin of the PIC18 relevant to the pwm2.
I did check all the pins using the scope.
I have good output for pwm1 only.
I uded the HPWM of the picbasic pbp2.50 as above: so the output should be at the hardware pins c1 and c2 if the spec os correct.
Is there someone that was able to get two PWM's output from the pic18f452 ? ( of course having the same frequency but a different duty cycle ).
Thanks
Ambrogio
DEFINE CCP2_REG PORTC 'Channel-2 port
DEFINE CCP2_BIT 1 'Channel-2 bit
might help
assuming you are using portc.1 for ccp2
could even try trisc.1=0 also
Thanks Richard,
no way for me to get output for both pwm's:
I did try your suggestion too.
Pls: see the attached code.
regards,
Ambrogio
Bookmarks