TMP89xy60UG/FG Toshiba, TMP89xy60UG/FG Datasheet - Page 360

no-image

TMP89xy60UG/FG

Manufacturer Part Number
TMP89xy60UG/FG
Description
Manufacturer
Toshiba
Datasheet

Specifications of TMP89xy60UG/FG

Package
LQFP64/QFP64
Rom Types (m=mask,p=otp,f=flash)
M/F
Rom Size
32/60
Ram Size
3K
Driver Led
8
Driver Lcd
-
Spi/sio Channels
-
Uart/sio Channels
2
I2c/sio Channels
1
High-speed Serial Output
-
Adc 8-bit Channels
-
Adc 10-bit Channels
16
Da Converter Channels
-
Timer Counter 18-bit Channel
-
Timer Counter 16-bit Channel
2
Timer Counter 8-bit Channel
4
Motor Channels
-
Watchdog Timer
Y
Dual Clock
Y
Clock Gear
Y
Number Of I/o Ports
58
Power Supply (v)
4.3 to 5.5
21.6
API (Application Programming Interface)
RA006
21.6.6
8 bits data (0x80) of UART is captured by 16-bit timer counter which is set to pulse width measurement mode.
In this case, the timer counter input pin should be assigned to RXD pin. And stores the captured value in WA
register. Be sure to select fcgck/2 as the source clock for 16-bit timer counter and capture the length of 8 bits. C
register should be written 0x08.
SEL<TCA0SEL> temporarily. After capturing, be sure to resume the pin to RXD pin.
bits 5, 4 and 3 are suitable value for UARTCR2<RTSEL> and the return value of A register is a suitable data for
UARTDR. The API sets bits 7, 6, 2, 1 and 0 to "0" as return value. Therefore, set the proper value for
UARTCR2<RXDNC, STOPBR>. If the contents of WA register is out of the area 0x0020 to 0x3BFF, the API
returns WA register with 0xFFFF as return value.
support program.
Note 1: If the captured value of WA register is little even though the value is within 0x0020 to 0x3BFF, the proper
Note 1: If general-purpose registers (WA, BC, DE, IX, IY) are used in non-maskable interrupt subroutine, occurring
Note 2: With success of calculation, this API returns "0" into bits 7, 6, 2, 1 and 0 as return value. Therefore, set proper
This API calculates the proper setting for baud rate of UART from the value of C and WA register. Generally,
RXD pin can be used as TCA pin. To capture the value, please select the pin as TCA pin by SER-
The possible value for WA register as argument is from 0x0020 to 0x3BFF. In the return value of WA register,
The following procedure shows example how to calculate the baud rate for UART in MCU mode by using
.BTCalcUART
1. By serial interface selection control register SERSEL<TCA0SEL>, assign TCA pin to RXD pin.
2. Set 16-bit timer counter to pulse width measurement mode. And set falling edge/L level as an external
3. Receive data (0x80) via RXD pin and capture it by 16-bit timer counter. In this case, enabling of UART
4. Write the captured value into WA register. Because general-purpose registers (DE, BC, IX, IY) are
5. Set the interrupt master enable flag to "disable (DI)" (IMF ← "0").
6. Set "0xD5" on FLSCR2<CR1EN> after setting FLSCR1<BAREA> to "1".
7. Set "0x08" to C register as the number of bit.
8. Call address (0x101E).
9. Set bits 5, 4 and 3 of W register into UARTCR2<RTSEL> and set the contents of A register to
10. Set "0xD5" to FLSCR2 after setting FLSCR1<BAREA> to "0".
setting may not be gotten.
trigger and select fcgck/2 as the source clock.
is no need.
rewritten in the support program, the contents of these registers should be saved before calling the
support program.
UARTDR. If the value of WA register is 0xFFFF which indicates an error of calculation, retry the
execution from receiving data (0x80).
of non-maskable interrupt may cause unexpected result.
value for these bits to set UART0CR2<RXDNC> and UART0CR2<STOPBR>.
Page 344
TMP89FS60

Related parts for TMP89xy60UG/FG