Setting multiple pins simultaneously


Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9022
Posted: 06:44am 16 May 2025      

But on the RPxxxx you have the pad between the junction of the output buffer and the input buffer. You can read back what the output buffer is set to (but there's no point really). However, the pad can disable the pin so you aren't seeing it at all. :)

You can *simulate* things like I2C on the RPxxxx. It's output is totem pole though, and the top device can't be disabled so there is no open drain output. True I2C is actually impossible. You have to force the pin to output low then switch IO mode between input (Hi-Z) and output (low).

CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2171
Posted: 07:45am 16 May 2025      

@Nimue
Nice project... retro to the max!!!

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