APPLICATION NOTE
R01AN0780EJ0100 Rev. 1.00 Page 1 of 57
Dec 7, 2011
V850 Microcontrollers
V850ES/Jx3-L
UART Communication Using UARTA
Summary
This application note describes how to perform UART communication with another device by using asynchronous
serial interface A (UARTA) incorporated in V850ES/Jx3-L Series microcontrollers.
In the processing described in this application note, ASCII characters sent from another device are analyzed and a
response is returned.
Target devices
V850ES/JC3-L
V850ES/JE3-L
V850ES/JF3-L
V850ES/JG3-L
When this application note is applied to other microcontrollers, make the necessary changes according to the
specifications of the microcontroller and verify them thoroughly.
R01AN0780EJ0100
Rev. 1.00
Dec 7, 2011
V850ES/Jx3-L UART Communication Using UARTA
R01AN0780EJ0100 Rev. 1.00 Page 2 of 57
Dec 7, 2011
CONTENTS
1. SPECIFICATIONS ............................................................................................................................... 3
2. OPERATION-VERIFIED CONDITIONS .............................................................................................. 6
3. RELATED APPLICATION NOTE........................................................................................................ 6
4. HARDWARE DESCRIPTION .............................................................................................................. 7
4.1 List of Pins Used ...................................................................................................................... 7
4.2 Hardware Configuration Example .......................................................................................... 8
5. SOFTWARE DESCRIPTION ............................................................................................................... 9
5.1 Operation Overview ................................................................................................................. 9
5.2 Option Byte Settings.............................................................................................................. 10
5.3 Constants................................................................................................................................ 10
5.4 Variables ................................................................................................................................. 11
5.5 Functions ................................................................................................................................ 11
5.6 Function Specifications ........................................................................................................ 12
5.7 State Transition Diagram ...................................................................................................... 13
5.8 Flow Charts............................................................................................................................. 14
5.8.1 Main processing.......................................................................................................... 14
5.8.2 Interrupt processing .................................................................................................... 15
5.8.3 Communication control processing ............................................................................ 17
5.9 UARTA Settings ..................................................................................................................... 19
5.9.1 UARTA1 control register 0 (UA1CTL0) ...................................................................... 19
5.9.2 UARTA1 control register 1 (UA1CTL1) ...................................................................... 20
5.9.3 UARTA1 control register 2 (UA1CTL2) ...................................................................... 21
5.9.4 UARTA1 status register (UA1STR) ............................................................................ 22
5.9.5 UARTA1 receive data register (UA1RX) .................................................................... 23
5.9.6 UARTA1 transmit data register (UA1TX).................................................................... 23
5.9.7 UARTA1 pin settings .................................................................................................. 24
6. SAMPLE CODE ................................................................................................................................. 25
7. REFERENCE DOCUMENTS ............................................................................................................. 54