How to built 4 channel PWM (ECCP) with pic184550?

Status
Not open for further replies.

Tom2

Full Member level 5
Joined
Nov 11, 2006
Messages
318
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
3,457
Is any one who know how to built 4 channel PWM (ECCP) with pic184550
 

pwm eccp source code

which compiler u used?
 

    Tom2

    Points: 2
    Helpful Answer Positive Rating
mplab c18 c compiler pwm

i used CCS C Compiler PCH
 

pic eccp

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
Code:
#byte ECCP1CON=0xfba;
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:
Code:
ECCP1CON=0xfa;
 

source code pwm in ccs

Do you Know any link which give exaxmples code for this?
 

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.
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
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…