11.07.2015 Views

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>MC95FB204</strong>destination address.The CJNE instructions use the abbreviation #d for immediate data; other instructions use #data.22.2 Instructions on how to use the input port.22.2.1 Error occur status• Using <strong>co</strong>mpare jump instructions with input port, it <strong>co</strong>uld cause error due to the timing <strong>co</strong>nflictinside the MCU.• Compare jump Instructions which cause potential errorused with input port <strong>co</strong>ndition:JB bit, rel ; jump on direct bit=1JNB bit, rel ; jump on direct bit=0JBC bit, rel ; jump on direct bit=1 and clearCJNE A, dir, relDJNZ dir, rel; <strong>co</strong>mpare A, direct jne relative; decrement direct byte, jnz relative• It is only related with Input port. Internal parameters, SFRs and output bit ports don’t cause any error by using <strong>co</strong>mpare jump instructions.• If input signal is fixed, there is no error in using <strong>co</strong>mpare jump instructions.22.2.2 Error status examplewhile(1){if (P00==1){P10=1; }else{ P10=0; }P11^=1;}zzz: JNB 080.0, xxx ; it possible to be errorSETB 088.0SJMP yyyxxx: CLR 088.0yyy: MOV C,088.1CPL CMOV 088.1,CSJMP zzzunsignedchar ret_bit_err(void){return !P00;}MOV R7, #000JB 080.0, xxx ; it possible to be errorMOV R7, #001xxx: RET126 July 17, 2012 Ver.1.7

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

Saved successfully!

Ooh no, something went wrong!