Professional Documents
Culture Documents
Tutorial 12
Tutorial 12
05/17/2024 2
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Solution 1
Write a program to initialize 8253/8254 in mode 1 to read and load lower 8-
bits only assuming that 8253/8254 is interfaced in memory mapped IO.
Consider that the address of counter 0 is 3FFE8H and DS = 3000H.
Binary counter 0 is selected. Load the lower 8-bits only. It latches the count and
then stores it in register such that it can be read. Let 05H is the lower 8-bit count.
05/17/2024 3
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Solution 1
Program
05/17/2024 4
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Question 2
Design a pulse train generator for a pulse train of frequency
1 kHz and duty cycle of 50% using 8253/8254. Assume the
CWR and Counter 0 addresses are marked as CWR_add
and Counter_0, respectively.
05/17/2024 5
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Solution 2
The operational mode should be mode 3.
Duty cycle 50% means that out of 4 parts of the wave, for 2 parts, the output will
be high, and for the remaining two parts, the output will be low.
We want 1 kHz output frequency and 4 count pulses to get 50% duty cycle so 4
kHz input frequency will be selected.
ALP
05/17/2024 6
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Question 3
Write the initialization required for 8259 to meet the following:
05/17/2024 8