Panasonic MN103S User Manual page 446

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 14
A/D Converter
(4) Set the AD0: Set the AN0CTR0 register
Set the operation mode
AN0CTR0(0x0000A400)
bp1-0: AN0MD1-0=01
Set the conversion clock
AN0CTR0(0x0000A400)
bp4-2: AN0CK2-0=010
Set the external trigger A conversion start
enabled
AN0CTR0(0x0000A400)
bp5: AN0TRG=1
Set the conversion channel (trigger factor
A)
AN0CTR0(0x0000A400)
bp10-8: AN0CH2-0=000
Set the power-down mode
AN0CTR0(0x0000A400)
bp6: AN0OFF=1
Set the external trigger B conversion start
enabled
AN0CTR1(0x0000A404)
bp6: AN0TRGB=1
Set the conversion channel (trigger factor
B)
AN0CTR1(0x0000A404)
bp10-8: AN0CH0B2-0=001
Set the sample/hold cycle
AN0CTR1(0x0000A404)
bp5-4: AN0SHC1-0=10
(5) Set the AD0: Set the ADST0 register
Select the external trigger factor A
ADST0(0x0000A408)
bp2-0: AD0AST2-0=000
Select the external trigger factor B
ADST0(0x0000A408)
bp6-4: AD0BST2-0=100
(6) Set the AD0: Set the AD0CTREGB register
AD0CTREGB(0x0000A40D)
bp7-4: AD0BCNT3I-0I=0001
bp3-0: AD0BCNT3-0=0001
XIV - 40
Operation
Setup Procedure
(4) Set the AN0MD1-0 flags of the AN0CTR0 register to "00"
to set "any channels/one-time conversion for each" to
operation mode.
Set the AN0CK2-0 flags of the AN0CTR0 register to
"010I" to set 3 dividing of IOCLK to the conversion
clock.
Set the AN0TRG flag of the AN0CTR0 register to "1" to
enable the external trigger factor A starting.
Set the AN0CH2-0 flags of the AN0CTR0 register to
"000" to set "channel 0" to the conversion channel of
the external trigger factor A.
Set the AN0OFF flag of the AN0CTR0 register to "1" to
set operation mode to the power-down mode flag.
*After shifted to operation mode, more than 100nsec
wait time is necessary until A/D conversion stars.
Set the AN0TRGB flag of the AN0CTR1 register to "1"
to enable the external trigger factor B starting.
Set the AN0CH0B2-0 flags of the AN0CTR1 register to
"001" to set "channel 1" to the conversion channel of
the external trigger factor B.
(5) Set the AD0AST2-0 flags of the A/D0 start trigger
selection register (ADST0) to "000" to set the PWM0
underflow to start factor A.
Set the AD0BST2-0 flags of the A/D0 start trigger
selection register (ADST0) to "000" to set the PWM1
over to start factor B.
(6) Set the AN0BCT3I-0I flags to "0001" to start AD
conversion after the first time the trigger factor B is
counted.
Set the AN0BCT3-0 flags to "0001" to start AD
conversion every two times the trigger factor B is
generated.
Description

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents