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 41 D PBITWRBIT WRITEFUN 41 D PBITWRD : Register for bit writeN : The bit number of the D register to bewritten.D, N 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∣D40950 0∣ or ∣15 31P0~P9D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○N ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○V、Z• When write control "EN" = 1 or "EN↑" ( P instruction) changes from 0 to 1, will write the write bit (INB) intothe Nth bit of register D.• When the operand is 16 bit, the effective range of N is 0~15. For 32 bit ( D instruction) operand it is 0~31. Nbeyond this range, will set the N value error flag "ERR" to 1, and do not carry out this instruction.X0X1ENINB41P.BITWRD : R 0 ERRN : 3• The instruction at left writes the status of the write bitINB into B3 of R0. AssumingX1 = 1, the result will be as follows:X1 1N=3───────────── X0=D R0 1B15 B3 B0Bits other than B3 remain unchanged7-16

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

Saved successfully!

Ooh no, something went wrong!