Embedded Programming: Lab 2. Bit Manipulation
Embedded Programming: Lab 2. Bit Manipulation
2017i/MoH
Lab 2.
Use the Code Composer development environment for solving and testing the following
labs.
A)
INT16U var1 = 0xXXXX; // X don’t cares
Clear bit 6 and 5 in the variable “var1”, without affecting the other bits in the variable.
Try to make the code as compact as possible.
B)
INT16U var2 = 0xXXXX; // X don’t cares
Set bit[10-5] in the variable “var2” to [011110], without affecting the other bits in the
variable. Try to make the code as compact as possible.
C)
Play around with the Code Composer debugger.
Morten Hansen
Side 1 [email protected]