Unformatted text preview:

ECE 353Introduction to Microprocessor SystemsAssessment #1 Info2A1 Information• When: Wednesday Oct 13thfrom 7:45am-9:15am.• The material that will be covered on the exam will include the material through (and including) Analog to Digital Converters. See educational objectives.• Closed Notes• You may use a calculator, but no Cell Phones!• It will be an electronic exam• A link to the exam will be available in the Modules area of Canvas starting at 7:40PM.• You will be provided scratch paper that you are required to turn in at the end of the assessment.• After completing your Assessment, there will be completion phrase available in the Modules area of Canvas. You must write this phrase down on your scratch paper before you turn it in.3What to know about C• Basic Syntax▪ if/for/while/switch▪ Functions▪ Pointers▪ Structs▪ extern▪ Volatile▪ macros▪ Header files• Know the syntax for accessing registers on the Launchpad4IO Pins• Input/Output Pins• Commonly used to interface with simple input devices such as switches, buttons, and LEDs.• Act as a parallel data bus into the system▪ Multiple signals that that can be accessed at once• Accessed via predefined locations in the memory map• Configurable as an Input or an Output5What you should know how to do with IO pins• Set the direction of a pin• Enable a pull-up/down resistor• Set the value of a pin configured as an output• Read the value of a pin configured as an input6Basic Components of a Timer• Data Register(s)▪ Contains the current count of the timer• Control Register(s)▪ Determines the mode the timer is running in⬧ Count Up / Down⬧ Free Running / One Shot⬧ Configures clock source⬧ Configures pre-scaler• Match Register(s)▪ Maintains the initial period set by the user. ▪ When the timer rolls over, the match register gets loaded into the data register (in the case of count down)7What to know about timers• General operation of a timer• Common types of timers and their uses• Describe the common building blocks of a timer• Given a frequency/period of a timer, calculate the values to configure the timer8Interrupts – Hardware Implementation• Nested Vectored Interrupt Controller• ARM Cortex-M Interrupt Priority Scheme• Context Switch▪ An application can be removed from the CPU and restored if the context is saved prior to the ISR executing.▪ Upon exit of the ISR, the context is restored, and the foreground process continues at the next instruction9Interrupt Service Routines• Should be written such that they are as sort as possible▪ Any computationally intensive activity should be deferred to a user (non-ISR) process.▪ Set a global variable that indicates to the user process to carry out a task▪ Any shared data between the ISR and a user process should be declared volatile.• Clear the outstanding interrupt10Analog to Digital Conversion• Analog Signals are continuous signals• Signals can be ‘reconstructed’ from their digital representation if sampled 2 times Highest Frequency of Interest• Quantization▪ The more bits of precision we have, the more accurately our digital representation of the signal will match the analog signal▪ The more bits of precision, the more susceptible to noise11Analog Data• Each sample has 12-bits of data.• 12-bits of data allows for 4096 distinct values between 0 and 3.3V• This leads to a resolution of 0.0008V (3.3V/212)• A reading of 0x0000 can be any voltage from 0.0000V to just under 0.0008V• A reading of 0x0001 can be any voltage from 0.0008V to just under 0.0016V• A 12-bit value of 25610can represent any voltage between?▪ Lowest Value = 0.0008*256 = 0.20625▪ Highest Value = 0.0008*257 = 0.2070512HW01 Overview1. Write code for a single peripheral device2. Verify that the peripheral is functioning properly▪ Use the Debugger▪ Set “Informed” breakpoints to verify ISRs and hardware if functioning correctly3. Repeat Steps 1-2 for all peripheral devices. Make sure to re-validate all peripheral devices every time new peripheral initialization code is added.4. Add helper functions that helps to abstract details of the hardware5. Validate helper functions6. Move on to the main algorithms used to solve the problem.13Detecting an Event Has Occurred14Timer32 ISR15ADC14 ISR16ADC14 ISR Cont.17Initialize Peripherals18Check for Input19Detect the Konami Code20Helper Function


View Full Document
Download Assessment #1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Assessment #1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Assessment #1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?