How to disable C2OUT when using half bridge mode pic 16f684
Posted: Thu Jan 18, 2018 10:32 pm
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!
Joined: 06 Sep 2003 Posts: 20715
Posted: Fri Jan 19, 2018 12:46 am
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:
C2OUT = 0;
The 16F684.h file has the #byte statement for C2OUT in it. So that line
of code will compile OK.
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