Project board problems

dan123456

Member
Hi all,

I'm using the 18m2 project board that has been working correctly for a few months but I was just making sure all the outputs were working using:

Code:
 main: high b0
                    high b1
                    high b2
                    high b3
                    high b4
                    high b5
                    high b6
                    high b7
goto main
The only output that goes high is b0 even when I told all the outputs to go low except b2 for example.

Any ideas?
 

hippy

Ex-Staff (retired)
You probably want some dots / periods in the pin names so they are no longer variables ... B.0, B.1 etc
 

westaust55

Moderator
In case you need some further explanation over that given above by hippy,

b0 or B0 are pre-defined byte variables all cleared to a value of zero when a program starts.

B.0 and B.1 etc are pre-defined constants as IO pin designations.
B.0 has a value of 0
B.1 has a value of 1
etc
B.7 has a value of 7
C.0 has a value of 8
C.7 has a value of 15

In you program as posted, HIGH b5 is the same as HIGH 0 which is the same as HIGH B.0

If you first give a byte variable a value, eg b5 = 5,
then HIGH b5 ==> HIGH 5 ==> HIGH B.5
 
Top