Highlights
Question 2:
Write an embedded C function to set up and start Timer0 to generate a 50kHz square- wave (with a 25% High/ 75% low) on P1.6. Assume the following: ELE3DEC
• The timer should use UP Mode
• The source clock (SMCLK) is 1MHz
• Output mode should be set to “Set/Reset”.
Question 3:
Write an embedded C function to initialise the ADC to sample data as follows: ELE3DEC
• ADC measurement should be on A4
• The ADC should work in polled mode
• VREF+ and VSS used as the references
• The pin should be enabled in the ADC10AE0 register
• SMCLK with a clock divider of 8 should be
Question 4:
For each of the following write a single line of C Code to solve each of the problems: ELE3DEC
• Set the top bit to ‘1’ in P1OUT
• Clear the bottom bit in P2OUT
• Flip (invert) bits 3 and 5 in the variable ‘a’
• Set bit 2 and clear bit 3 in the variable ‘b’
Question 5:
• The following items are connected to an MSP430 Microcontroller (operating from 3.6V): ELE3DEC
LED (1.7V, 20mA) on P2.1
LED (1.7V, 20mA) on P1.5
Button on P1.2 (using an external pull-up resistor)
Speaker on P2.5
Button on P1.3 (using an external pull-up resistor)
Draw a circuit which fits the description above and calculate values of resistors where appropriate.
• Write two lines of code to set-up P1DIR and P2DIR for the circuit in question 1. Any unused pins should be set as outputs.
Question 6:
Write an embedded C function to implement the following truth table: ELE3DEC
• A button is connected to P1.0 and an LED is connected to P2.0. Write code with PWM so that if the button is pressed the LED is on 60%, but if the button is not pressed the LED is on 10%.
• For each of the following bit bashing operations state what the final result will be in the variable `r’ (an unsigned char):
a) r = 0x6B | 0xA1;
b) r = 0x22 ^ 0xC4;
c) r = 0xB1 & ~0x27;
d) r = 0xA1 >> 3;
e) r = 0x1E & 0xF7;
• Explain the concept of switch bounce and under what circumstances debouncing may be required. ELE3DEC
This ELE3DEC Engineering Assessment has been solved by our Engineering experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.