8051 aula 02 n.
Download
Skip this Video
Download Presentation
8051 Aula 02

Loading in 2 Seconds...

play fullscreen
1 / 8

8051 Aula 02 - PowerPoint PPT Presentation


  • 150 Views
  • Uploaded on

8051 Aula 02. Prof Afonso Ferreira Miguel. Microcontrolador 8051 (MCS-51). Timers do MCS51 Two 16-bit Counter/Timers: Up counters, can interrupt on overflow. Counts: CPU cycles (crystal/12). External input (max. half CPU rate). Four Operation Modes. Microcontrolador 8051 (MCS-51).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '8051 Aula 02' - farrah-pennington


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
8051 aula 02

8051Aula 02

Prof Afonso Ferreira Miguel

microcontrolador 8051 mcs 51
Microcontrolador 8051 (MCS-51)
  • Timers do MCS51
    • Two 16-bit Counter/Timers:

Up counters, can interrupt on overflow.

    • Counts:

CPU cycles (crystal/12).

External input (max. half CPU rate).

    • Four Operation Modes.
microcontrolador 8051 mcs 511
Microcontrolador 8051 (MCS-51)
  • Timers do MCS51
    • Timer Mode 0 :

Emulates 8048 counter/timer (13-bits).

8-bit counter (TL0 or TL1).

5-bit prescaler (TH0 or TH1).

    • Timer Mode 1 :

Simple 16-bit counter.

    • Timer Mode 2 :

8-bit auto-reload.

Counter in TL0 or TL1.

Reload value in TH0 or TH1.

Provides a periodic flag or interrupt.

microcontrolador 8051 mcs 512
Microcontrolador 8051 (MCS-51)
  • Timers do MCS51
    • Timer Mode 3 :
      • Splits timer 0 into two 8-bit counter/timers.
      • First counter (TLO) acts like mode 0,
      • without prescaler.
      • Second counter (TH0):
        • Counts CPU cycles.
        • Uses TR1 (timer 1 run bit) as enable.
        • Uses TF1 (timer 1 overflow bit) as flag.
        • Uses Timer 1 interrupt.
      • Timer 1 (when timer 0 is in mode 3 ):
        • Counter stopped if in mode 3.
        • Running in mode 0, 1, or 2.
        • Has gate (INT1) and external input (T1), but no flag or interrupt.
        • May be used as a baud rate generator.
microcontrolador 8051 mcs 513

C/T=0

C/T=1

Microcontrolador 8051 (MCS-51)
  • Timers do MCS51 – MODO 1

Osc.

Osc.

÷12

Interrupt

TL1

TH1

TF1

8-bits

8-bits

T1 (Pin)

Control

TR1

Gate

INT1 (Pin)

The Gate input controls whether the Counter runs while gated by

the interrupt signal or not.

microcontrolador 8051 mcs 514

C/T=0

TH1

C/T=1

8-bits

Microcontrolador 8051 (MCS-51)
  • Timers do MCS51 – MODO 2

Osc.

Osc.

÷12

Interrupt

TL1

TF1

8-bits

T1 (Pin)

Control

TR1

Gate

INT1 (Pin)

The Gate input controls whether the Counter runs while gated by

the interrupt signal or not.

microcontrolador 8051 mcs 515
Microcontrolador 8051 (MCS-51)
  • Timers do MCS51 – TMOD
microcontrolador 8051 mcs 516
Microcontrolador 8051 (MCS-51)
  • Timers do MCS51 – TCON