C8051F581-IMR Silicon Labs, C8051F581-IMR Datasheet - Page 307
C8051F581-IMR
Manufacturer Part Number
C8051F581-IMR
Description
8-bit Microcontrollers - MCU 50MIPS 128kB 8kB SPI
Manufacturer
Silicon Labs
Datasheet
1.C8051F585-IQR.pdf
(356 pages)
Specifications of C8051F581-IMR
Rohs
yes
Core
8051
Processor Series
C8051
Data Bus Width
8 bit
- Current page: 307 of 356
- Download datasheet (3Mb)
27.4.4. Toggle Output Mode
Timers 4 and 5 have the capability to toggle the state of their respective output port pins (T4 or T5) to pro-
duce a 50% duty cycle waveform output. The port pin state will change upon the overflow or underflow of
the respective timer (depending on whether the timer is counting up or down ). The toggle frequency is
determined by the clock source of the timer and the values loaded into TMRnCAPH and TMRnCAPL.
When counting down, the auto-reload value for the timer is 0xFFFF, and underflow will occur when the
value in the timer matches the value stored in TMRnCAPH:TMRCAPL. When counting up, the auto-reload
value for the timer is TMRnCAPH:TMRCAPL, and overflow will occur when the value in the timer transi-
tions from 0xFFFF to the reload value.
To output a square wave, the timer is placed in reload mode (the Capture/Reload Select Bit in TMRnCN
and the Timer/Counter Select Bit in TMRnCN are cleared to 0). The timer output is enabled by setting the
Timer Output Enable Bit in TMRnCF to 1. The timer should be configured via the timer clock source and
reload/underflow values such that the timer overflow/underflows at 1/2 the desired output frequency. The
port pin assigned by the crossbar as the timer’s output pin should be configured as a digital output (see
Section “20. Port Input/Output” on page 186
of the pin. A Read/Write of the Timer’s Toggle Output State Bit (TMRnCF.2) is used to read the state of the
toggle output, or to force a value of the output. This is useful when it is desired to start the toggle of a pin in
a known state, or to force the pin into a desired state when the toggle mode is halted.
External Clock
SYSCLK
(XTAL1)
Tn
Figure 27.11. Timer 4 and 5 Auto Reload and Toggle Mode Block Diagram
TnE
X
Crossbar
8
2
12
Crossbar
EXENn
TRn
Equation 27.1. Square Wave Frequency
F
sq
0
1
=
--------------------------------------------------------------- -
2
TMRnCF
M
T
n
1
T
M
n
0
65536 TMRnCAP
). Setting the timer’s Run Bit (TRn) to 1 will start the toggle
O
G
T
n
Reload
O
Rev. 1.2
T
n
E
TCLK
D
E
C
E
n
F
TMRnCAPL TMRnCAPH
TCLK
–
TMRnL
0xFF
TMRnH
0xFF
Toggle Logic
C8051F58x/F59x
OVF
CP/RLn
EXENn
EXFn
C/Tn
TRn
TFn
0
1
Interrupt
(Port Pin)
Tn
307
Related parts for C8051F581-IMR
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
KIT EVALUATION FOR CP2102
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
KIT EVAL FOR CP2103 USB TO UART
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
KIT EVAL FOR CP2201 ETH CTRLR
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DAUGHTER CARD CAP TOUCH SENSE
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
KIT STARTER CAP TOUCH SENSE
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT FOR C8051F320/F321
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEVKIT-F120/21/22/23/24/25/26/27
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT FOR C8051F310/F311
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT F220/221/226/230/231/236
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT F300/301/302/303/304/305
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT FOR C8051F330/F331
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT FOR F005/006/007
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
DEV KIT FOR F020/F021/F022/F023
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
KIT DEV FOR C8051F34X
Manufacturer:
Silicon Laboratories Inc
Datasheet:
Part Number:
Description:
KIT DEV FOR C8051F41X
Manufacturer:
Silicon Laboratories Inc
Datasheet: