Documente Academic
Documente Profesional
Documente Cultură
Advanced Microprocessor 1
I/O Interface
Advanced Microprocessor 2
I/O Interface
• the address inputs used to select any of the internal register for
programming, reading, or writing to a counter
Advanced Microprocessor 3
I/O Interface
Advanced Microprocessor 4
I/O Interface
Advanced Microprocessor 5
I/O Interface
Each counter is individually programmed by writing a control word,
followed by the initial count.
The control word allows the programmer to select the counter, model
of operation, binary or BCD count and type of operation (read/write).
Advanced Microprocessor 6
I/O Interface
Programming the 8254
Each counter has a program control word used to select the way
the counter operates.
If two bytes are programmed, then the first byte (LSB)
stops the count, and the second byte (MSB) starts the counter with
the new count.
Advanced Microprocessor 7
I/O Interface
Programming the 8254
Modes of operation
Mode 0: An events counter enabled with G.
The output becomes a logic 0 when the control word is written and
remains there until N plus the number of programmed counts.
Advanced Microprocessor 8
I/O Interface
Modes of operation
Mode 2: This is used to generate a pulse equal to the clock period at a given interval. When a count is loaded, the OUT
stays high until the count reaches to 1 and then out goes low for one clock.
Advanced Microprocessor 9
I/O Interface
Programming the 8254
Modes of operation
Mode 4: Software triggered one-shot (G must be 1). In this mode out is
goes to low for one clock period at the end of the count.
10
Trigger with count of 5
I/O Interface
Advanced Microprocessor 11
I/O Interface
Read Operations
Advanced Microprocessor 12
I/O Interface
Advanced Microprocessor 13
I/O Interface
Read-back control command:
Advanced Microprocessor 14
I/O Interface
Status register:
• shows the state of the output pin
• check the counter is in NULL state
(0) or not
• how the the counter is programmed
Advanced Microprocessor 15
I/O Interface
• after the line control register & baud rate divisor are programmed ,
still it is not ready to function
Advanced Microprocessor 16