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

Imul-arithmetic instruction-microprocessor, IMUL: Signed Multiplication: T...

IMUL: Signed Multiplication: This instruction multiplies a signed byte by a signed bit in source operand e in the register AL or signed word in source operand by signed word in th

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

Pointer(ptr)-assemblers directive-microprocessor, PTR : Pointer:- The p...

PTR : Pointer:- The pointer operator which is used to declare the type of a variable, label or memory operand. The operator PTR is prefixed by either WORD or BYTE. If the prefi

Lab Assignment, 1) Write an 80x86 assembly language program in EXE file for...

1) Write an 80x86 assembly language program in EXE file format to do the following tasks: a) Open and read the contents of a file into memory (use at least 1 kB). b) Sort the li

Pin description of 8086-microprocessor,  Pin Description of 8086 The ...

 Pin Description of 8086 The microprocessor 8086 is a 16-bit CPU available in 3 clock rates, for example 5, 8 and 10 MHz, packaged in a40 pin CERDIP or plastic package. The 8

Nonrecursive Factorial, Write a nonrecursive version of the Factorial proce...

Write a nonrecursive version of the Factorial procedure (Section 8.3.2) that uses a loop. (A VideoNote for this exercise is posted on the Web site.) Write a short program that inte

8086 program, program to arrange a given set of numbers in descending order...

program to arrange a given set of numbers in descending order

Assembler directives and operators-microprocessor, Assembler Directives and...

Assembler Directives and Operators The major advantage of machine language programming is directly that the memory control is in the hands of the programmer, so that, he can be

Avr, how to code

how to code

Execution unit and bus interface unit-microprocessor, Execution Unit (EU) a...

Execution Unit (EU) and Bus Interface Unit (BIU) : 8086 consist of two processors called EU and BIU. Two Processors can work parallel. This improves speed of execution. BIU fi

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