| ??? 01/05/03 00:58 Read: times |
#35650 - RE: 4 -> 16 ASM routine needed |
Oliver,
The best thing to do is show us where you have got to. What ports do you want to use ? What processor ? In the general case, this IS pretty easy. You are just building a CASE statement really. <pre> MOV A,P1 MOV P0,#0; DEC A JNZ step1 SETB P0.0 step1: DEC A JNZ step2 SETB P0.1 step2: DEC A JNZ step3 SETB P0.2 step3: ;etc Is one method, but suffers from obvious problems.The better method needs a 16 byte look up table to do a generic portaddressing. Look at the MOVC A,@DPTR + A instruction for ideas. Steve <pre> |



