Hi again,
It does appear to be simpler when you know what you are doing! What is happening in the ccp1con=12|((PW&3)<<4) statement? Thanks again.
Hi again,
It does appear to be simpler when you know what you are doing! What is happening in the ccp1con=12|((PW&3)<<4) statement? Thanks again.
Hello,
Another one...in your example (PIC12F1822) with the LATA and LATA.0 references, is there a way that I can implement the same function, still using the PIC16F722A device, uisng the B port instead?
1. it keeps only the first two bits (Bit 0 and Bit 1) of the PW. Rest bits are set to 0Code:ccp1con=12|((PW&3)<<4)
2. shifts left by 4 positions
3. Makes a Bitwise OR with the number 12 (binary 00001100) so to keep te bits 2 and 3 if they are set)
4. Places the result in ccp1con
Ioannis
Bookmarks