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 support@ccsinfo.com

How to disable C2OUT when using half bridge mode pic 16f684

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



Joined: 18 Jan 2018
Posts: 5
Location: Vietnam

View user's profile Send private message

How to disable C2OUT when using half bridge mode pic 16f684
PostPosted: Thu Jan 18, 2018 10:32 pm     Reply with quote

Hi everyone,

I saw the recommend on 16f684 datasheet and it said:
" Enabling both C2OUT and P1B will cause a conflict on RC4 and create unpredictable results. Therefore, if C2OUT is enabled, the ECCP can not be used in Half-bridge or Full-bridge mode and vice-versa".

Can anyone help me how to enable and disable C2OUT when using HALF BRIDGE MODE.

Thank you and best regards!
PCM programmer



Joined: 06 Sep 2003
Posts: 20268

View user's profile Send private message

PostPosted: Fri Jan 19, 2018 12:46 am     Reply with quote

C2OUT is controlled by a bit in the CMCON0 register. That bit is disabled
upon power-on reset of the 16F684. It is normally disabled. You don't
have to worry about adding code to disable it.

If you did want to put in code to disable it, you could do it this way:
Code:
C2OUT = 0;

The 16F684.h file has the #byte statement for C2OUT in it. So that line
of code will compile OK.

But again, it should not be needed.
phamkien



Joined: 18 Jan 2018
Posts: 5
Location: Vietnam

View user's profile Send private message

PostPosted: Fri Jan 19, 2018 3:23 am     Reply with quote

Thank you very much for your help.

Best regards!
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