CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC 18F67j60 and PWM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Requan



Joined: 11 May 2008
Posts: 74

View user's profile Send private message

PIC 18F67j60 and PWM
PostPosted: Tue Jul 03, 2012 6:57 am     Reply with quote

Hi,
I tried to make PWM on Pin E4 (PIC 18F67j60 , 25MHz):

Code:

set_tris_e(0x00);
setup_ccp3(CCP_PWM);
setup_timer_2(T2_DIV_BY_16, 194, 1); //2kHz
set_pwm3_duty(80);


I think i made everything but it doesn't work.
Do you have any hints for me?
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Tue Jul 03, 2012 7:23 am     Reply with quote

CCP3, in compatiblity mode, on a 67J60, comes out on D1.


Best Wishes
Requan



Joined: 11 May 2008
Posts: 74

View user's profile Send private message

PostPosted: Wed Jul 04, 2012 9:33 am     Reply with quote

Thanks for help again.
Could You also explain me why when i use hardware pin for I2C it worked but when i use pins: E2 and E3 it doesn't work.
Should I turn off something?
Requan



Joined: 11 May 2008
Posts: 74

View user's profile Send private message

PostPosted: Thu Jul 12, 2012 2:18 am     Reply with quote

I solved this problem:
On the beginning i put SDA and SCL in High state.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group