B4R Question How to create a new port of 8 pins

Mostez

Well-Known Member
Licensed User
Longtime User
Hello,
I need to group 8 pins into one port of 8 bits and refer to this new port with an alias i.e.
pins 4~7 and 10~13 = MyNewport, and be able to perform some logic i.e.

MyNewport.0 = pin4
MyNewport.1 = pin5
....
MyNewport.7 = pin13

MyNewport = 127 'write value to port
MyByte = Mynewport 'read port
MyNewport.3 = True 'set bit 3

Thanks
 

Cableguy

Expert
Licensed User
Longtime User
You can create an array for the pins, and initialise it according to the pins you wish to use.
As for the logical methods, it shouldn't be to hard to implement them yourself...
 
Upvote 0
Top