Setting multiple pins simultaneously


Author Message
circuit
Guru

Joined: 10/01/2016
Location: United Kingdom
Posts: 308
Posted: 07:47am 16 May 2025      

Nimue, just in case you had not noticed, a very useful new command was introduced in the first Release Candidate (RC0), allowing direct editing of bits in an integer variable.  This gives a very simple method of setting specific bits in a control integer for various interfaces including sending values to PORT(). Peter introduced this as a method for setting flags and subsequently withdrew it an alternative method of flag handling.  It then became obvious that it had other applications including setting values for PORT() and also for sending binary strings to power logic shift registers (I use the TPIC6A596) and Peter was requested to reintroduce it, which he kindly did.
  Quote  
New Commands and Functions

Command BIT(var%,bitno)=0 or 1  'sets a specific bit (0-63) in an integer variable
Function BIT(var%,bitno) 'returns the value of a specific bit (0-63) in a integer variable (0 or 1)

Edited 2025-05-16 17:49 by circuit