![NyQuest Innovation Labs NY6 Series Скачать руководство пользователя страница 35](http://html1.mh-extra.com/html/nyquest-innovation-labs/ny6-series/ny6-series_user-manuel_1722361035.webp)
NY6 User Manual
Ver 1.3 2019/03/28
35
3.6 ONOFF ($05)
The ONOFF register is used to enable the block functions for timer counter(TM), PH counter(PHC), SPI
and Comparator. The ONOFF[0] bit is to control Timer counter, disable the timer will stop counting. The
ONOFF[1] bit is to set PH counter of channel-1 as an application for counting time, but the channel-1 won’t
be able to play voice simultaneously. The ONOFF[2] bit is to switch on SPI function and turns PB0~3 into
SPI corresponding ports, PB0 to CSb, PB1 to SCK, PB2 to MOSI, PB3 to MISO. The PB0~3 will be normal
ports (GPIO) if the SPI function is disable. The ONOFF[3] bit is to switch on comparator functionality and
turns PA0 and PA1 into input VIP and input VIN. In addition, the wake-up function of PA0 and PA1 will be
disabled once they are set for comparator inputs
.
3.7 LVD ($0A)
The LVD register sets four kinds of voltage level and provide a flag for reading to monitor the voltage level
of VDD. The LVD[0] bit is to enable/disable voltage detection functionality, its default is disable. The
LVD[2:1] bits are used to select four voltage levels, 2.4V, 2.7V, 3.6V, 4.1V for multiple applications.
Usually, for 2-battery usage, it is recommended to choose 2.4V and 2.7V; for 3-battery, 3.6V and 4.1V are
suggested. The LVD[3] is the flag which is shown out the VDD status. The flag will go to high if VDD is
higher than selected voltage level. The precision of level at 4.1V will be controlled in +/-5% and other levels
less than 5%.
3.8 TMCS ($0B)
The TMCS register is used to select timer clock source and define timer value (RTMx) applied for timer
counter or comparator application. The TMCS[2:0] bits are used to select 8 kinds of clock sources for timer
counter, such as 4MHz, 2MHzm 500KHz, 250KHz, 125KHz, 62.5KHz and flag of comparator. The TMCS[3]
bit is used to select timer value (RTMx) controlled by timer counter or comparator application. For general
timer application, there is the specified procedure to set. First, set timer clock source, and load desired
timer data to RTMx. Then, turn the timer counter on, the timer value will start counting from loaded timer
data up to 0xFF. The flag will be launched due to the timer overflow and the timer value will be reloaded by
the data of RTMx. For comparator application, user can set TMCS[3] to high and apply for an external RC
circuit to PA0(VIP) and a reference voltage to PA1(VIN). While VIP is charged and higher than the level of
VIN, the flag of comparator will be high and capture the current timer data to timer value (RTMx).
3.9 RTMx ($0C/$0D)
The RTMx registers are used to store 8-bit timer counter value or reload data. Writing RTML/RTMH is four
bit register for timer reload data, once overflow occurs it will reload automatically. For reading those
registers, users have to read RTMH first and system will save LSB 4-bit data of timer counter value into
RTML at same time. Due to the time for reading RTML will spend two system cycles (~1us) at least after