ccs eccp
Tom2 said:
Is any one who know how to built 4 channel PWM (ECCP) with pic184550
Basically, the PIC18F4550 only has 2 real modulated PWM channels simultaneously (same period, different duty).
Its ECCP PWM P1[A..D] only 1 can be generated out modulated waveform whatever you set it at Single/Half/Full Birdge mode.
If you'd have 4 real modulated PWM channels, you have to find another device which its CCP+ECCP are over 4.
alec82 said:
hi
i cant use eccp for 4 chanel pwm with ccs library.but u can write manual code in to the register's of eccp module .you can declare your register as variable in your code such as
address byte of register in the datasheet of micro in section function register map
and you can write direct in to the your register
for example:
This ECCP1CON settings are not correct for PIC18F4550's ECCP1.
The PIC18F4550's ECCP1CON is located on 0xFBD, not 0xFBA (it is CCP2CON).
And the CCP1M[3..0] must be 11xx (not 1010) for ECCP working in PWM mode.
All of them could be confirmed by
datasheet and/or header file of MPLAB ASM and/or C18 suite.
Tom2 said:
Do you Know any link which give exaxmples code for this?
I suggest you check the PWM library source code by
Microchip MPLAB C18.
You can download free Student Edition after registered or try these:
**broken link removed** or
**broken link removed**
BTW, the alec82's recommedation:
PICmicro CCP and ECCP Tips'n Tricks is good to understand how to apply about PIC's CCP/ECCP modules.
And you can also visit Microchip's official forum especially in CCP, ECCP and PWM section.
FYR