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

General terms for cache-microprocessor, General terms for Cache : Cac...

General terms for Cache : Cache Hits : When the cache consisted the information requested, the transaction is said to be a cache hit. Cache Miss : When the cache does n

Control transfer or branching instruction-microprocessor, Control Transfer ...

Control Transfer or Branching Instruction Control transfer instructions transfer the flow of execution of the program to a new address specified in the instruction indirectly o

Write a mips assembly language program, Write a MIPS/SPIM assembly language...

Write a MIPS/SPIM assembly language program that prints the smallest and largest values found in a non-empty table of N word-sized integers. The address of the first entry in your

Declare a constant in assembly language, Declare 1 constant. This can be do...

Declare 1 constant. This can be done just below the prototype section. Put the following divider above the constant section. ;************************ Constants ****************

Read architecture:look aside cache-microprocessor, Read Architecture : Look...

Read Architecture : Look Aside Cache In "look aside" cache architecture the main memory is located conflictingthe system interface. Both the cache main memory sees a bus cycle

Program, Write an application that does the following: (1) fill an array wi...

Write an application that does the following: (1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

Program to find the largest number in an array, Write a MC68H12 assembly la...

Write a MC68H12 assembly language program to find the largest number in an array of ten 8-bit numbers. The array is stored in memory locations starting at address $1100. Use branch

Shell script, write shell to calculate basic salary from given .

write shell to calculate basic salary from given .

Conditional branch instruction-microprocessor, Conditional branch Instructi...

Conditional branch Instruction When these type of instructions are executed, they transfer control of execution to the address mention relatively in the instruction, provided t

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