Hello,
I want to set 4 outputs of a 08M2 according to 4 sequences of 16 bits.
Considering one sequence/output and assuming that b0 is used as pointer (from 0 to 8), I should use the subroutine:
1st: is this instruction formally correct?
2nd question: how is it possible to set the output pin C.0 of the 08M2 according to the value of bit8?
3rd: after adding in the code the other 3 lookup instructions (which use the variables bit9, bit10 and bit12) how is possible to transfer the 4 bits to the 4 outputs C.0, C.1, C.2 and C.4 of the 08M2 in the same time, by using the "pins" instruction? I guess like this:
Last: in the case that the port is larger (e.g. other PICAXE chip), how is it possible to keep theremaining pins configured as inputs? If I use the "pins" instruction, they should become outputs, if I don't misunderstand the instruction.
Thank you in advance,
Alberto
I want to set 4 outputs of a 08M2 according to 4 sequences of 16 bits.
Considering one sequence/output and assuming that b0 is used as pointer (from 0 to 8), I should use the subroutine:
Code:
loop: lookup b0,(%0,%1,%0,%1,%1,%1,%0,%1,%0,%0,%0,%0,%0,%0,%0,%0),bit8
2nd question: how is it possible to set the output pin C.0 of the 08M2 according to the value of bit8?
3rd: after adding in the code the other 3 lookup instructions (which use the variables bit9, bit10 and bit12) how is possible to transfer the 4 bits to the 4 outputs C.0, C.1, C.2 and C.4 of the 08M2 in the same time, by using the "pins" instruction? I guess like this:
Code:
pins = b1
Thank you in advance,
Alberto
Last edited: