04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 30 BCD CORRECTION CIRCUIT<br />

30.1 BCD Correction Circuit Function<br />

CHAPTER 30 BCD CORRECTION CIRCUIT<br />

The result of addition/subtraction of the BCD (binary-coded decimal) code and BCD code can be obtained as BCD<br />

code with this circuit.<br />

The decimal correction operation result is obtained by performing addition/subtraction having the A register as the<br />

operand and then adding/ subtracting the BCD correction result register (BCDADJ).<br />

30.2 Registers Used by BCD Correction Circuit<br />

The BCD correction circuit uses the following registers.<br />

BCD correction result register (BCDADJ)<br />

(1) BCD correction result register (BCDADJ)<br />

The BCDADJ register stores correction values for obtaining the add/subtract result as BCD code through<br />

add/subtract instructions using the A register as the operand.<br />

The value read from the BCDADJ register varies depending on the value of the A register when it is read and those<br />

of the CY and AC flags.<br />

The BCDADJ register is read by an 8-bit memory manipulation instruction.<br />

Reset input sets this register to undefined.<br />

Address: F00FEH After reset: undefined R<br />

Figure 30-1. Format of BCD Correction Result Register (BCDADJ)<br />

Symbol 7 6 5 4 3 2 1 0<br />

BCDADJ<br />

R01UH0317EJ0004 Rev. 0.04 1186<br />

Feb. 22, 2013

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!