ECET 340 – Microprocessor Interfacing
Homework Assignment #1
Name __ __________________________
IMPORTANT: Please paste your answer directly into this Microsoft Word document and then submit to your student DropBox. Do Not save it as a PDF document and then submit as I write your point values directly to the submitted document. DO NOT REMOVE THE MAXIMUM POINT VALUES FOR EACH PROBLEM IN “RED” AS I USE THIS TO HELP ME GRADE!
1. Give three examples each of internal and external peripheral devices as referenced to the HCS12 microcontroller and not an entire PC. (2 points)
The internal peripherals consist of a 16-bit central processing unit, a 128 KB of flash EEPROM, and a 4 KB of RAM.
The external peripherals can consist of a keyboard, monitor, and a matrix keypad.
2. Given “the requirements of each signal’s destination must match the capabilities of the signal’s source,” name some of the electrical signal parameters that must be considered when designing an interface between two different hardware components. (2 points)
Both components must operate at the same voltage levels, they must be synchronized at the same clock speeds, and they must be able to access the same memory space as dictated by the I/O and memory device.
3. Write down the instructions needed to program PORT A for pins PA7, PA4-PA0 as inputs and PA6-PA5 as outputs. Answer should be a valid C language statement. (2 points)
DDRA = 0x60;
4. Write an instruction sequence to output the value $35 to PORT P. Use the C language only when writing your answer; - no assembly language. (2 points)
DDRP = 0xFF;
5. Write an instruction sequence to configure Port H for input, read in the current signal levels on the Port H pins, and store the value to a C variable called data1. Use the C language only when writing your answer, no assembly language. Also make sure to set the data direction register appropriately in your answer. (2...