porta.0[x] is an Array function.
When used with HIGH LOW SEROUT or any command other than a math formula, it reads the indicated array element (a pin) and returns the value to be used in the command.
Since it's a BIT Array, it will only return a 0 or 1 depending on the state of the indexed PIN.
Therefore, the serout2 command will only output on PORTB.0 or PORTB.1
To reiterate my previous recommendation ...
If you moved your serial outputs so they are all on two PORTs, instead of scattered across 3 or four ports ... you can do exactly what you want by using pin "Numbers", and a very small bit of code.





Bookmarks