EEL4742C: Scheduling Periodic - 3-pin SPI Configuration - Graphics Software Stack in Embedded Systems - IT/Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task :

QUESTION 1.  
Part a)
Channel 1 is scheduling periodic interrupts every 15K cycles (K=1024). Show how the interrupts are scheduled and demonstrate that the operation is still correct when a rollback to zero occurs on
TACCR1. Show enough cases that span two rollbacks to zero.
Part b) Channel 2 is scheduling periodic interrupts every 25K cycles (K=1024). Show how the interrupts are scheduled and demonstrate that the operation is still correct when a rollback to zero occurs on
TACCR2. Show enough cases that span two rollbacks to zero.

QUESTION 2.  
Part a)
The timer is running in the up mode with a period of 800 cycles. Channel 1 engages the output mode (Set/Reset) and sets its register TACCR1 = 600. Explain what happens. Draw a timeline.

Part b) Repeat the previous part based on the (Reset/Set) mode.

 

QUESTION 3.  
Each time an event occurs (e.g. button push), the program needs to time a duration of 0.25 seconds (using ACLK=32 KHz) and raise an interrupt when this duration elapses. Note that this interval is timed only when the event occurs, not repeatedly back-to-back.
Part a) Can we set this up using the up mode? If yes, explain how.
Part b) Can we set this up using the continuous mode? If yes, explain how.
Part c) If both modes are possible, explain the preferable mode.
Part d) If the timer is used intermittently, is it possible to turn the timer on/off throughout the program? How is this done?
Part e) Timer_A is running in the continuous mode and none of its interrupts is enabled. TAR has cycled the full range (0 to 64 K) a few times and the program didn’t interact with the timer’s bit fields or registers. At this point, what is the value of each of the flags: TAIFG, CCIFG flags of Channels 0, 1, 2?
Part f) In our program, when an interrupt event occurs, it’s disabled for a little while (e.g. 10 seconds) and then it’s re-enabled. When is the best time to clear the interrupt’s flag: when it disabled or when it’s reenabled?

QUESTION 4.  
Part a) Draw the configuration where an SPI master is connected to two devices that are individually selected.
Part b) Draw the configuration where an SPI master is connected to two devices in a daisy chain.
Part c) What is the 3-pin SPI configuration? What’s the difference between 3-pin SPI and 3-wire serial?

QUESTION 5. 
The analog-to-digital converter (ADC) module uses a clock signal that varies in the range [20 -40] Hz due to the operating conditions and error. The sample-and-hold time of the signal we’re converting is 2.5 seconds. The ADC allows selecting a number of cycles from the list below.
Number of cycles: 10, 40, 80, 110, 150, 200, 250, 300
Part a) Show the analysis for choosing the suitable number of cycles.
Part b) The conversion takes 20 cycles. What is the total operation time (that includes the sample-andhold time and the conversion)?

Note: the numeric values in this question are chosen to simplify the computations; an ADC usually uses a much higher clock frequency and the sample-and-hold time is usually in the micro-seconds range.

 

QUESTION 6.  
An SAR ADC has a 3-bit resolution (result). The reference voltages are Vr-=0 and Vr+=Vr. The signal we’re converting is: Vin = 6.2/8 Vr+. Show all the voltage comparisons that are done by the ADC and show the conversion’s binary result.

QUESTION 7. 
Part a)
Describe the graphics software stack in embedded systems.
Part b) What services does the display driver provide? To what party does it provide these services? Comment on the compatibility of a driver with multiple displays.
Part c) What services does the graphics library provide? To what party are these services provided? Comment on the compatibility of a graphics library with multiple displays.
Part d) What is a graphics context?
Part e) What is the clipping region of a graphics context?

QUESTION 8. 
Part a)
There are multiple levels of programming microcontrollers that are shown in the list below. Which level did we use in this course?
• Assembly level
• Register level
• Library level
• Operating system level
 

Part b) The Arduino line of microcontrollers is very popular thanks to the programming library known as the Wiring API. This API provides simple functions that can be used by the programmer. These functions are implemented for all the Arduino microcontrollers. Therefore, the user can use the same (portable) code for any Arduino device chosen. The Wiring API has been implemented for MSP430 microcontrollers in the Energia IDE.
To give you an idea of how an API is implemented, let’s write a function that’s similar in style to the Wiring API. The function finds the first available channel of Timer_A. A channel is considered available if its CCIE bit is disabled. This is the header of the function. It returns the first available channel out of
Channels 0, 1, 2, in this order. If all the channels are used, the function returns -1. Write the code

 

QUESTION 9.  
ARM 32-bit microcontrollers have a 32-bit CPU and a 32-bit memory address. The 32-bit address can reference 2^32 = 4 GB of memory, which is far more memory than a microcontroller usually has.
Therefore, there is an abundance of unused addresses, which has inspired the bit-banding technique. Modifying a single bit in the memory takes three assembly instructions, e.g. (load-OR-store to set a bit).
There is interest in making this type of operation faster since it’s used frequently. The bit-banding technique takes unused addresses and maps them to bits of a variable. As shown below, the variable Data is at address 100. Accessing address 100 references the whole 8 bits in Data. The bit-banding technique takes the non-used addresses in the 2000 range and maps them to individual bits of Data. That is, address 2000 maps to bit #0 of Data, address 2001 maps to bit #1 of Data, etc. With this technique, the load-ORstore operation to modify a bit can be reduced to a store operation. Writing 1 to address 2000 results in writing 1 to bit #0 of Data, leaving the other bits unchanged
Part a) Write a piece of code that reads bit #4 of Data (into the variable temp) using the bit-banding technique.
Part b) Write a piece of code that sets bit #5 of Data using the bit-banding technique.
Part c) Write a piece of code that counts how many bits in Data are equal to 1, using the bit-banding technique.


PRACTICE 1.
Write a code that turns on the LED (P1.0, active high) for 3 seconds when the button (P1.3 active low) is pushed. The interval is non-renewing, i.e., the button is ignored if it’s pushed again during the three second interval. Configure the button via interrupt. Time the 3-second interval using Timer_A with interrupt (preferred mode: continuous mode with the timer running all the time). Use ACLK at 32 KHz.

PRACTICE 2.
Write a code that debounces the push button (P1.3, active low). When the first button edge is detected, wait for the maximum bounce duration (15 ms) and, if the button is still pushed, take the action, which is toggling the LED (P1.0, active high). Configure the button via interrupt. Time the duration using Timer_A with interrupt (preferred mode: continuous with the timer running all the time). Use ACLK at 32 KHz.

PRACTICE 3.
Write a C code that flashes three LEDs using three channels of Timer_A based on interrupts. The timer should use ACLK which is based on a 32 KHz crystal.
• LED1 mapped to P1.0 is toggled every 0.25s using Channel 0
• LED2 mapped to P1.1 is toggled every 0.5s using Channel 1
• LED3 mapped to P1.2 is toggled every 0.75s using Channel 2

.

This EEL 4742C - IT/Computer Science Assignment has been solved by our IT/Computer Science 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.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.