TMP91xy40FG Toshiba, TMP91xy40FG Datasheet - Page 164

no-image

TMP91xy40FG

Manufacturer Part Number
TMP91xy40FG
Description
Manufacturer
Toshiba
Datasheet

Specifications of TMP91xy40FG

Package
LQFP100
Rom Types(m=mask,p=otp, F=flash,e=eeprom)
M/F
Rom Combinations
128
Ram Combinations
4
Architecture
16-bit CISC
Usb/spi Channels
-
Uart/sio Channels
4
I2c/sio Bus Channels
-
(s)dram Controller
-
Adc 10-bit Channel
4
Da Converter
-
Timer 8-bit Channel
4
Timer 16-bit Channel
3
Pwm 8-bit Channels
-
Pwm 16-bit Channels
-
Cs/wait Controller
-
Dual Clock
Y
Number Of I/o Ports
61
Power Supply Voltage(v)
2.2 to 3.6
3.13.3
3.13.3.1 Melody Generator
Operational Description
clock waveforms at frequencies from 4 Hz to 5461 Hz on the
connecting an external speaker, the melody output function can easily be
implemented.
(How to use the melody generator)
(How to calculate the melody output frequency)
(Programming example)
(Basic scale setting table)
Based on the low-frequency clock (32.768 kHz), the melody generator can generate
output on the
bits of the MELFH and MELFL registers. Finally, setting the MELFH<MELON>
bit to 1 starts the counter and melody waveform generation.
shown below.
First, set the MELALMC<MELALM> bit to 1 so that melody waveforms can be
How to calculate the melody output frequency and a programming example are
Melody output frequency:
Melody setting value:
not allowed.)
Generating the scale “A” (440 Hz)
(The value N should be a natural number from 1 to 4095 (001H to FFFH); 0 is
Scale
C
D
G
C
E
F
A
B
LD
LD
LD
Frequency [Hz]
(MELALMC),−−XXXXX1B
(MELFL), 23H
(MELFH), 80H
264
297
330
352
396
440
495
528
MLDALM
91CW40-162
pin. Then, set the desired melody output frequency in 12
Register Value: N
03CH
02DH
01DH
035H
030H
027H
023H
01FH
f
N = (16384/f
MLD
[Hz] = 32768/(2 × N + 4)
; Select melody waveforms
; N = 16384/440 − 2 = 35.2 = 023H
; Start waveform generation
MLD
) − 2
at fs = 32.768 [kHz]
MLDALM
TMP91CW40
2008-09-19
pin. By

Related parts for TMP91xy40FG