0% found this document useful (0 votes)
36 views

Embedded Programming: Lab 2. Bit Manipulation

This document provides instructions for Lab 2 on bit manipulation. Students are asked to clear specific bits in a variable using compact code, set a bit range to a pattern without affecting other bits, and explore the Code Composer debugger. The lab focuses on bitwise operations and debugging tools in an embedded programming course.

Uploaded by

Cristian Ceruţa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Embedded Programming: Lab 2. Bit Manipulation

This document provides instructions for Lab 2 on bit manipulation. Students are asked to clear specific bits in a variable using compact code, set a bit range to a pattern without affecting other bits, and explore the Code Composer debugger. The lab focuses on bitwise operations and debugging tools in an embedded programming course.

Uploaded by

Cristian Ceruţa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

EMbedded Programming

2017i/MoH
Lab 2.

LAB 2. Bit manipulation.

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]

You might also like