ADE7518
UART SERIAL INTERFACE
The ADE7518 UART can be configured in one of four modes.
Both the serial port receive and transmit registers are accessed
?
?
?
?
Shift register with baud rate fixed at f CORE /12
8-bit UART with variable baud rate
9-bit UART with baud rate fixed at f CORE /64 or f CORE /32
9-bit UART with variable baud rate
through the Serial Port Buffer SFR (SBUF, 0x99). Writing to
SBUF loads the transmit register, and reading SBUF accesses a
physically separate receive register.
An enhanced UART mode is offered by using the UART timer
and by providing enhanced frame error, break error, and overwrite
Variable baud rates are defined by using an internal timer to
generate any rate between 300 baud/sec and 115,200 baud/sec.
The UART serial interface provided in the ADE7518 is a full-
duplex serial interface. It is also receive-buffered by storing the
first received byte in a receive buffer until the reception of the
second byte is complete. The physical interface to the UART is
provided via the RxD (P1.0) and TxD (P1.1) pins, whereas the
firmware interface is through the SFRs presented in Table 120.
UART REGISTERS
Table 120. Serial Port SFRs
error detection. This mode is enabled by setting the EXTEN bit
in the Configuration SFR (CFG, 0xAF) (see the UART Additional
Features section). The Enhanced Serial Baud Rate Control SFR
(SBAUDT, 0x9E) and UART Timer Fractional Divider SFR
(SBAUDF, 0x9D) are used to configure the UART timer and to
indicate the enhanced UART errors.
SFR
SCON
SBUF
SBAUDT
SBAUDF
Address
0x98
0x99
0x9E
0x9D
Bit Addressable
Yes
No
No
No
Description
Serial Communications Control Register (see Table 121).
Serial Port Buffer (see Table 122).
Enhanced Serial Baud Rate Control (see Table 123).
UART Timer Fractional Divider (see Table 124).
Table 121. Serial Communications Control Register SFR (SCON, 0x98)
Bit
7 to 6
Address
0x9F, 0x9E
Mnemonic
SM0, SM1
Default
00
Description
UART Serial Mode Select Bits. These bits select the serial port operating mode.
SM[1:0] Result (Selected Operating Mode)
00 Mode 0, shift register, fixed baud rate at f CORE /12.
01 Mode 1, 8-bit UART, variable baud rate.
10 Mode 2, 9-bit UART, fixed baud rate at f CORE /32 or f CORE /16.
11 Mode 3, 9-bit UART, variable baud rate.
5
0x9D
SM2
0
Multiprocessor Communication Enable Bit. Enables multiprocessor communication in
Mode 2 and Mode 3, and framing error detection in Mode 1.
In Mode 0, SM2 should be cleared.
In Mode 1, if SM2 is set, RI is not activated if a valid stop bit was not received.
If SM2 is cleared, RI is set as soon as the byte of data is received.
In Mode 2 or Mode 3, if SM2 is set, RI is not activated if the received ninth data bit in RB8 is 0. If
SM2 is cleared, RI is set as soon as the byte of data is received.
4
0x9C
REN
0
Serial Port Receive Enable Bit. Set by user software to enable serial port reception.
Cleared by user software to disable serial port reception.
3
0x9B
TB8
0
Serial Port Transmit Bit 9. The data loaded into TB8 is the ninth data bit transmitted in
Mode 2 and Mode 3.
2
0x9A
RB8
0
Serial Port Receiver Bit 9. The ninth data bit received in Mode 2 and Mode 3 is latched
into RB8. For Mode 1, the stop bit is latched into RB8.
1
0x99
TI
0
Serial Port Transmit Interrupt Flag. Set by hardware at the end of the eighth bit in Mode 0 or
at the beginning of the stop bit in Mode 1, Mode 2, and Mode 3.
TI must be cleared by user software.
0
0x98
RI
0
Serial Port Receive Interrupt Flag. Set by hardware at the end of the eighth bit in Mode 0 or
halfway through the stop bit in Mode 1, Mode 2, and Mode 3.
RI must be cleared by user software.
Rev. 0 | Page 105 of 128
相关PDF资料
ADE7569ASTZF16 IC ENERGY METER MCU 16K 64LQFP
ADE7752BARWZ-RL IC ENERGY METERING 3PHASE 24SOIC
ADE7755ARSZ IC ENERGY METERING 1PHASE 24SSOP
ADE7757ARNZRL IC ENERGY METERING 1PHASE 16SOIC
ADE7758ARWZRL IC ENERGY METERING 3PHASE 24SOIC
ADE7761AARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7761BARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7768ARZ-RL IC ENERGY METERING 1PHASE 16SOIC
相关代理商/技术参数
ADE7566 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF161 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF162 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL1 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF16-RL12 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF8 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver