EE 476: Homework 4
Due At the start of your 4th lab period
- The keypad scanning routine given in Lab 4 uses a scheme where the upper
and lower nibbles of an i/o register are alternately used for input and output.
Figure out a way to scan a 4x4 keypad which drives the vertical wires as 4
output bits and reads the horizontal wires as inputs, with no i/o swapping.
Does either scheme have an advantage?
- Modify the
getfloat()
code on the serial communication page
so that you have one input routine which can return an integer, a string,
or a float depending on an input parameter.
- Discuss how you will implement the required
day:hrs:min
clock.
Note that any scheme which involves reloading timer0 will not be accurate
enough.
Copyright Cornell University Jan 2002