tmp89fm82 TOSHIBA Semiconductor CORPORATION, tmp89fm82 Datasheet - Page 134

no-image

tmp89fm82

Manufacturer Part Number
tmp89fm82
Description
8 Bit Microcontroller Tlcs-870/c1 Series
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
8.3
I/O Port Registers
RA000
Example :Set P87 as an output port and output "1"
8.3.6
; Enable PMD opreration.
; Operate PLL and provide clock to PMD circuit.
loop:
; Enable PMD opreration.
; Disable EMG protection circuit operation.
; Disable PMD circuit operation
; Stop clock to PMD circuit and stop PLL operation.
; Set as a general I/O port
as the devider output, motor control input/output.
by this pin. Therefore, even in case P87 is used as an general purpose I/O port, it must be needed to pull up P87
to High Level. In order to set P87 as an general I/O port, Port function with keeping High level must be changed
as follows.
Port P8 (P87 to P80)
Port P8 is a 8-bit input/output port that can be set to input or output for each bit individually, and it is also used
After Reset is released, P87 is available as an EMG1 input and Port output is ihhibited if low level is detected
Table 8-13 Port P8
1. Start PLL and provide fpll(fx) clock to PMD circuit.
2. Set POFFCR4<PMDEN1>="1" and enable PMD circuit operation.
3. Disable EMG protection circuit function.
4. Disable PMD circuit operation by setting POFFCR4<PMDEN1>="0"
5. Stop PLL after stopping supply of fpll(fx) clock to PMD circuit.
6. Set the function for an general I/O operation.
Secondary
function
LD
LD
LD
AND A, 0xC0
CMP A, 0xC0
JP
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
(PLLCR0), 0x06
(PLLCR1), 0x80
A, (PLLCR1)
NZ, loop
(PLLCR0), 0x07
(POFFCR4), 0x10 ; Set <PMD1EN>="1" and enable PMD operation.
(EMGREL), 0x5A
(EMGREL), 0xA5
(EMGCRA), 0x00
(POFFCR4), 0x00 ; Set <PMD1EN>="0" and disable PMD operation.
(PLLCR0), 0x06
(PLLCR1), 0x00
(P8DR), 0x00
(P8CR), 0x80
EMG1
P87
P86
U1
; Set the rockup count to 2
; Operate clock and rockup counter circuit.
; Read PLLCR1.
; PLLCR1<LUPFG> = 1 ?
; Polling until rockup finish.
; Provide clock to PMD circuit.
; EMG protection inhibit code (1)
; EMG protection inhibit code (2)
; Set <EMGEN>="0" and disable PMD operation.
; Stop clock to PMD circuit.
; Stop clock.
; Set P87 output data to Low level.
; Output Low level from P87.
P85
V1
Page 118
P84
W1
10
.
P83
X1
P82
Y1
P81
Z1
DBOUT1
DVO
P80
TMP89FM82

Related parts for tmp89fm82