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>FUN101 D PT→RTABLE TO REGISTER MOVEFUN101 D PT→RTs : Source table starting registerL : Length of source tablePr : Pointer registerRd : Destination registerTs, Rd may combine with V, Z, P0~P9 toserve indirect 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/32bit+/-numberP0~P9Ts ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○L ○ ○* ○ ○Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ 2~2048Rd ○ ○ ○ ○ ○ ○ ○ ○* ○* ○V、Z• When move control "EN" = 1 or "EN↑" ( P instruction) transition from 0 to 1, the value of the register Tsprspecified by pointer Pr within source table Ts (length is L) will be written into the destination register Rd. Beforeexecuting, this instruction will first check the input signal of pointer clear "CLR". If "CLR" is 1, it will first clear Prand then carry out the move operation. After completing the move operation, it will then check the value of Pr.If the Pr value has already reached L-1 (point to the last register in the table), then it sets the move-to-end flagto 1, and finishes executing of this instruction. If Pr is less than L-1, it check the status of "INC". If "INC" is 1,then it will increase Pr and finish the execution of this instruction. Besides, pointer clear "CLR" can executeindependently and is not influenced by other inputs.• The effective range of the pointer is 0 to L-1. Beyond this range the pointer error "ERR" will be set to 1 and thisinstruction will not be carried out.X0101P.T REN TS : R 0L : 9INC Pr : R 19Rd : R 20CLRENDERR• In the example at left, at the very beginning Pr = 7 and Tsand Rd are as shown at left in the diagram below. When X0have a transition from 0→1 twice, the results are shown atright in the diagram below.• At the second time execution, the pointer has alreadyreached to the end so there will be no increment.Ts Pr Pr PrR0(T0) 1111 7 R19 8 R19 8 R19R1(T1) 2222R2(T2) 3333X0=X0=R3(T3) 4444 Rd (first) Rd (second) RdR4(T4) 5555 0000 R20 8888 R20 9999 R20R5(T5) 6666R6(T6) 7777 END END ENDR7(T7) 8888 001R8(T8) 9999Before execution First time execution Second time execution7-85

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

Saved successfully!

Ooh no, something went wrong!