![FTDI FT51A Скачать руководство пользователя страница 122](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158122.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
121
Copyright © 2015 Future Technology Devices International Limited
2.13.15
Use Cases
The table below presents normal operation of FTDI timers along with pre-scaler and watchdog.
FTDI timers
Prescaler
Watchdog
Select the timer to initialise by writing
timer_sel
field in the
TIMER_SELECT
register.
Write initial/final value into the
TIMER_WRITE_MS
and
TIMER_WRITE_LS
registers.
Write an initial value
into the
TIMER_PRESC_LS
and
TIMER_PRESC_MS
registers.
Write an initial value
into the
TIMER_WDG
register to initialise one
of the 32 bits of the
timer.
Write into
TIMER_CTRL_3
register
direction
field to select up/down counting.
N/A
N/A
Write into
TIMER_CTRL_3
register
mode
field
to select mode.
N/A
N/A
Write bit for selected timer to
TIMER_CTRL_4
register to initialise the
timer.
Write
clear
in
TIMER_CTRL_4
register to
initialise the prescaler (if
possible)
Write
clear_wdg
in
TIMER_CTRL_2
register to
clear watchdog.
Write the start bit for selected timer in
TIMER_CTRL_1
register to start the timer.
Write
prescaler_en
bit
in
TIMER_CTRL_2
register
to enable prescaler and
it will automatically start
when the timer/timers
using it starts.
Write
start_wdg
bit in
TIMER_CTRL_2
register to
start watchdog.
Select the timer to read from by writing
the
timer_read_sel
field in the
TIMER_SELECT
register.
Current value can be read from the
TIMER_READ_LS
and
TIMER_READ_MS
registers.
N/A
N/A
Write the stop bit for the selected timer in
the
TIMER_CTRL_1
register to stop the
timer.
N/A
N/A
Table 2.165 Timers Normal Operation