EE454 TEST 3 Take Home (Independent)

STARDATE STARFLEET CAPTAIN

042409 ______

1. Design a single bit output port using a “D” transparent latch and any combinational logic.

The port should be designed so that the statement XBYTE[0xB000] = value: will cause a “0” to be written to the port if value is “0” and it will cause a ”1” to be written to the latch if value is “1”. You may use only the upper four address bits for the decoding. Show all 8051 signals needed to interface the port to an 8051.

2. Given the scanned matrix LED display partially shown to the right. Design a typical row driver and a typical column driver that will input signals from an 89c51 port pin and drive the LED with 100 ma of current. Use only the components shown below and any resistors.RememberLEDs need resistors. The 89c51 can sink 1.6 ma at .4 volts and source 60 ua at 3.5 volts.

Transistor Type

/ Current gain,  / Vce(sat) / Vbe(on) / Ic(max)
PNP Q1 / 50 / .1 v / .5 v / 500 ma.
NPN Q2 / 50 / .1 v / .5 v / 500 ma.

Type

/ Description / VOL @ IOL = 30 ma. and Vcc = 5 v / VOH Max voltage at output

USn7406

/ Open Collector Inverter / .4 v / 30 v

3. A single seven segment digit of a liquid crystal display has seg a through seg g connected to P1.0 through P1.6 respectively on an 89c51. The back plane BP is connected to P1.7. There are no logic gates. Explain in words and possibly with a waveform sketch how you would create a software driver that would output the necessary drive signals. Remember you must insure that there is no static direct voltage producing a static electric field in the liquid crystal. You do not have to write the software just explain how the software should function.

4.A small servo motor (like the ones used in class) has its signal wire connected to an 89c51AC3 port pin P1.5. The 89c51rd2 is running with a 20 MHz crystal.

a) Write the initialize routine needed to drive the servo with an 8-bit PWM signal using the PCA that has an approximate 10ms time period.

b) Assume the high time of the PWM signal ranges from approximately .5ms to 1.5ms. What is the range of the numbers when written to the capture register will cause the range of the high time to be as specified?

5. Answer the following:

a) Which control method will work the best for project three, bang bang or PD (position derivative)? Explain!

b) Sometimes the discrete time derivative of the position (velocity) in a functioning controller is numerically very small even though the velocity is not. Why? Explain how you were able to solve this problem in your project.

c) Explain how you could test to see if your integral error (I in PID) is working properly in your project.

6. A pwm pulse train is input to an RC low pass filter. The pulse train has a peak amplitude Vp, a period T, and a 25% duty cycle.

a) What is the DC value of the voltage coming out of the filter?

b) What is the peak amplitude of the fundamental radian frequency ω0 coming into the RC filter?

c) What is the peak amplitude of the fundamental radian frequency coming out of the RC filter?

By 12:00 high noon you must:

Turn in your servo’s, motors, photo transistors and displays!

Turn in your project documentation and demonstrate your project.

Turn in a paragraph or two on the use of microcontrollers in systems of current technology.