tyassin
Advanced Member level 1
Hi
I am new to PICs and MikroC. I think I have a really easy question.
Here it goes:
Lets say you have a variable of the type int with a value of variable=0b0000000011111111 and you assign this to a SFR which is 8-bit.
As an example:
What happens now? Will the CCP1CON register contain all zeroes og ones ie. the MSBs or the LSBs of the variable.
Another case is when something like this is written:
Is it the LSB in the variable that is wirtten to the 5-bit in the CCP1CON register?
A last question is what is the difference between:
CCP1CON.F4 and CCP1CON.B4
Thank you
I am new to PICs and MikroC. I think I have a really easy question.
Here it goes:
Lets say you have a variable of the type int with a value of variable=0b0000000011111111 and you assign this to a SFR which is 8-bit.
As an example:
Code:
CCP1CON =variable
What happens now? Will the CCP1CON register contain all zeroes og ones ie. the MSBs or the LSBs of the variable.
Another case is when something like this is written:
Code:
CCP1CON.F4=variable
Is it the LSB in the variable that is wirtten to the 5-bit in the CCP1CON register?
A last question is what is the difference between:
CCP1CON.F4 and CCP1CON.B4
Thank you