Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC18F Strange PWM Problem

Status
Not open for further replies.

Sobakava

Full Member level 6
Joined
Mar 27, 2002
Messages
350
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
3,342
pwm - pic18f

I'm trying to produce %50 duty cycle pwm output from RC1/CCP2 on PIC18F8720 and I can do it, I can see with oscilloscope.

but,

when I do that

setup_ccp2(CCP_PWM);

I see my LCD connected to PORTB becomes crazy. I think there is something wrong with RB3/CCP2. I already assigned CCP2 to RC1 usign CONFIG3 register but I see some strange signal (low freq. pulses) on RB3 which is connected to LCD_RS... If I turn off the PΨM, it becomes normal....


any idea about what is wrong?

regards
 

pic18f pwm

The only thing that comes to my mind is are you sure you have used the correct bit (Bit0) in Config3H (CONFIGURATION REGISTER 3 HIGH BYTE ADDRESS 300005h) as these registers are organized as 16 bit registers?

I also saw your question posted in the CCS forum, a very good idea.

best regards
 

pwm pic18f

my 8720 is in mcu mode and CONFIG3 register is 0x0183..
 

pic18f1320 when does pwm begin

Sobakava said:
my 8720 is in mcu mode and CONFIG3 register is 0x0183..

Maybe you should try 0x383 as the datasheet says T1OSCMX is not implemented and shall be 1 if I interpret it correctly ...

I also do not understand why you have a promblem on RB3 as the datasheet says that in MCU mode you can switch between RE7 and RC1 only in the other modes between RB3 and RC1?

So I would again check if CONFIG3 is really set correctly, might also be a bug with your programmer ...

best regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top