I need to manipulate inputs pins and associated flags. For initial process I need this data arranged as follows:
INA A8 A7 A6 A5 A4 A3 A2 A1
INB B8 B7 B6 B5 B4 B3 B2 B1
INC C8 C7 C6 C5 C4 C3 C2 C1
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - --
ING G8 G7 G6 G5 G4 G3 G2 G1
INH H8 H7 H6 H5 H4 H3 H2 H1
Later, for further process I need the data rearranged like this:
reg1 A1 B1 C1 D1 E1 F1 G1 H1
reg2 A2 B2 C2 D2 E2 F2 G2 H2
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
reg7 A7 B7 C7 D7 E7 F7 G7 H7
reg8 A8 B8 C8 D8 E8 F8 G8 H8
I've been looking for matrix handling, in assembler for a 16F877 but found nothing simple to understand.
Could anyone point me in the right direction or just tell me what is the way to go? I am not asking for code (of course it would be good to have it ready) but for the idea to implement the conversion, back and forth, if necessary.
What I actually need is 8 "channels" with 16 ( 8 + 8 ) flags, each.
All what I found in PICLIST related bits handling seem to lead to a unnecessary complex solution.
INA A8 A7 A6 A5 A4 A3 A2 A1
INB B8 B7 B6 B5 B4 B3 B2 B1
INC C8 C7 C6 C5 C4 C3 C2 C1
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - --
ING G8 G7 G6 G5 G4 G3 G2 G1
INH H8 H7 H6 H5 H4 H3 H2 H1
Later, for further process I need the data rearranged like this:
reg1 A1 B1 C1 D1 E1 F1 G1 H1
reg2 A2 B2 C2 D2 E2 F2 G2 H2
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - -
reg7 A7 B7 C7 D7 E7 F7 G7 H7
reg8 A8 B8 C8 D8 E8 F8 G8 H8
I've been looking for matrix handling, in assembler for a 16F877 but found nothing simple to understand.
Could anyone point me in the right direction or just tell me what is the way to go? I am not asking for code (of course it would be good to have it ready) but for the idea to implement the conversion, back and forth, if necessary.
What I actually need is 8 "channels" with 16 ( 8 + 8 ) flags, each.
All what I found in PICLIST related bits handling seem to lead to a unnecessary complex solution.