13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

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.

Advanced Function <strong>Instruction</strong>FUN55 D PB→GBINARY-CODE TO GRAY-CODE CONVERSIONFUN55 D PB→GOperation controlENLadder symbol55DP.B GS :D :S :Starting of sourceD :Starting address of destinationS,D operand can combine V、Z、P0~P9 forindex addressingOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D40950~FFFFH0~FFFFFFFFHP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○* ○ ○V、Z●When operation control "EN"=1 or "EN↑"( P instruction) changes from 0→1, it will perform the codeconversion; where S is the source (Binary code), and D is the destination (Gray code) for storing the result.●The conversion method shown as belowXOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR1 0 0 1 1 0 0 0 1 1 1 0 1 1 0 11 1 0 1 0 1 0 0 1 0 0 1 1 0 1 1Example 1: When M0 changes from 0→1, it will perform the 16-bit code conversionM055P.B GEN S :D :R0R100˙Converting the 16-bit Binary-code in R0 intoGray-code, and then storing the result into R100.R0= 1001010101010011B R100= 1101111111111010B7-30

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

Saved successfully!

Ooh no, something went wrong!