Port.Bit on X2

Jeremy Leach

Senior Member
I was hoping to use a command like:
Code:
Pulsout B.B0,10000
But it doesn't like the variable in the BIT position :(

But in the manual, for Pulsout it says
Pin is a variable/constant (0-7) which specifies the i/o pin to use.
Hmmm, pity ...
 

Technical

Technical Support
Staff member
You can't mix a variable into a port.bit name, but you can use a variable as a pin name

Code:
b1 = C.0
pulsout b1,10000
 

Jeremy Leach

Senior Member
Code:
b1 = c.0
So, what is the actual value that is placed in b1? What is the numbering system? I'm using the code to calculate the bit to use ;)
 

hippy

Ex-Staff (retired)
Which means you can do things like this ...

For b0 = B.0 To B.7
Toggle b0
Next

For b0 = 0 To 7
b1 = B.0 + b0
Toggle b1
Next
 
Top