8254 programmable timer-microprocessor, Assembly Language

Assignment Help:

8254 Programmable Timer

A diagram of Intel's 8254 interval event/timer counter is given in Figure. The 8254 consists of 3 identical counting circuits, per of which has GATE and CLK inputs and an OUT output. Each may be viewed as containing a status and control Register pair, a Counter Register (CR) for receiving the initial count,  a Counter  Element  (CCE)  which  performs  the  counting  but it is not  directly  accessible  from  the processor, and  from an Output Latch (OL) for latching the contents of the CE so that they may be read. The CE, CR, and OL are treated as pairs of 8-bit registers. (Physically, the registers are not accurately as depicted, but to the programmer the figure is conceptually accurate.)

The registers might be accessed according to the table given below:

1183_8254 register.jpg

1783_8254 diagram.jpg

Where zero means low and one means high. All combinations result in the data pins being put into their high-impedance state. When A1 = 1 and A0=1, whether a control register is being written into or a command is depends on the MSBs of the byte being output. For the last 3 combinations, whether an OL or status register is read is determined by a previous command.

There  are 2 types  of  commands, the counter latch command, which causes the CE in the counter indicated by the 2 MSBs of the command to be latched into the corresponding  OL, and the read back command, which might cause a combination of the CEs to be latched or "prepare" a combination  of status registers to be read.  For the purpose to prepare a status register means to cause it to be read the next time a read operation inputs from the counter. When the2 MSBs are 01, 00, or 10 a counter latch command is mention, but if they are 11 a read back is to be performed. In a latch command bits five and four might be zero and the remaining bits are unused. The read back command format is given below:

766_command format.jpg

If  the  COUNT  bit  is  zero,  then  the CEs for all of the counters whose CNT bits are one are latched. If CNTO= 1 &CNT2=1 but CNT1=0, then the CEs in counters zero and two are latched but the CE in counter one is not latched. likewise  STAT=0  causes  the counters' status registers to be prepared  for  input. CEs may be and status and latched registers may be prepared in the similar command.

The formats of the status and command registers are given in Figure. If the 2 MSBs of an output are both one, they denoted that the output is to be a read back command; or else they indicate a counter. If they indicate a counter and bits four and five are both zero, then a latch command is denoted and it is directed to the control register of the counter indicated by the top two bits, but if they are not both zero, then they denote the type of the input from OL or output to CR. The combination 01 denoted that the Read/Write operations are from/to  the  OLL/CRL,  10  denoted  that  they  are  to/from  the OLM/CRM,  and  11 denoted  that  these operations are to occur in pairs, having the first byte coming from/going to OLL/CRL and the second from/to OLM/CRM. A 1-byte write to CR will cause the other byte to be 0. Bits 1, 2, and 3 determine the mode and bit 0 indicate the format of the count.


Related Discussions:- 8254 programmable timer-microprocessor

Read file in 8086, Write a procedure to read a text file and copy its cont...

Write a procedure to read a text file and copy its contents to another text file using 8086 assembly language .

Dma-how dma works-microprocessor, DMA DMA stands for Direct Memory ...

DMA DMA stands for Direct Memory Access It is uses same Address/Data lines on ISA bus It controls the ISA bus instead of the processor ("bus master") Floppy

Generating random number using 8086, I need to generate a random number bby...

I need to generate a random number bby using 8086 assembly language

Introduction to 80 x 86 assembly language, Using the windows32 framework, w...

Using the windows32 framework, write a complete 80x86 program for Programming Exercises 4.3 number 3, on pages 130-131 of the textbook. Follow all coding conventions mentioned in

Code, 1. Assembly code for the flow chart we did in the class about the sim...

1. Assembly code for the flow chart we did in the class about the simple I/O interface driver 2. Enhanced driver (flow chart and its assembly code) to cater for interruptions in th

Risc characteristics-microprocessor, RISC Characteristics : The  concep...

RISC Characteristics : The  concept  of  RISC  architecture  include  an  attempt  to  reduce  execution  time  by make  simple  the instruction set of the computer. The main c

Arithmrtic operation exercise assempley HELP!, Open notepad and enter the c...

Open notepad and enter the code for a program that calculates the following arithmetic expression: x = a + b + c - d - e + f The operands a, b, c, d, e, f, and x should be declared

Into-jmp-unconditional branch instruction-microprocessor, INTO : Interrupt...

INTO : Interrupt on Overflow:- It is executed, when the overflow flag OF is set. The new contents of IP and CS register are taken from the address 0000:0000 as described in INT

Lods-stos-string manipulating instruction-microprocessor, LODS : Load Stri...

LODS : Load String Byte or String Word:- The LODS instruction loads AL/AX register by the content of a string pointed to by DS:SI register pair. The SI is automatically modifie

Formulate the linear programming model , Print Media Advertising (PMA) has ...

Print Media Advertising (PMA) has been providing a contract to market Buzz Cola via newspaper ads in a main southern newspaper. Full-page ads in the weekday editions (Monday throug

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd