13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Advanced Function <strong>Instruction</strong>FUN 59 P→7SG7-SEGMENT CONVERSIONFUN 59 P→7SGS : Source data to be convertedN : The nibble number within S for conversionD : Register storing 7-segment resultS, N, D may combine with V, Z,P0~P9 to serveindirect address applicationOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D409516-bit+/-numberP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○N ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 0~3 ○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○V、Z● When conversion control "EN" = 1 or "EN↑" ( P instruction) has a transition from 0 to 1, will convert N+1number of nibbles (A nibble is comprised by 4 successive bits, so B0~B3 of S form nibble 0, B4~B7 formnibble 1, etc...)within S to 7-segment code, and store the code into a low byte of D (High bytes does notchange). The 7 segment within D are put in sequence, with "a" segment placed at B6, "b" segment atB5, .... ,"g" segment at B0. B7 is not used and is fixed as 0. For details please refer the "7-segment codeand display pattern table" shown in page 9-31.●Because this instruction is limited to 16 bits, and S only has 4 nibbles (NB0~NB3), the effective range of Nis 0~3. Beyond this range, will set the N value flag error "ERR" to 1, and does not carry out this instruction.●Care should be taken on total nibbles to be converted is N+1. N=0 means one digit to convert, N=1 meanstwo digits to convert etc…●When using the FATEK 7-segment expansion module(FBs-7SG) and the FUN84 (7SEG) handy instructionfor mixing decoding and non-decoding application, FUN59 and FUN84 can be combined to simplify theprogram design.(Please refer the example in chapter 16)7-37

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

Saved successfully!

Ooh no, something went wrong!