I recently came across the online circuit simulator Wokwi. So, I don't really know what to say just yet. But, I am certainly impressed to say the least. I copied my RPI Pico 7-segment design into the simulator and it ran just fine.
I believe anyone can see the project, if you want to try the simulator here is the project link: https://wokwi.com/projects/331838877263200851
I am even more impressed how far down the rabbit hole the simulator goes. I also tried one of my more complicated buswrite function which addresses the gpio registers in memory and that worked fine too!
SIO_BASE = 0xd0000000 def BusWrite( b0, bn, v ): n = bn-b0+1 bitmask = (0xFFFFFFFF >> (32-n)) << b0 scratch = mem32[SIO_BASE+0x10] # read GPIO output reg scratch &= ~bitmask scratch |= v << b0 mem32[SIO_BASE+0x10] = scratch
I tried another sample project with an arduino and an MPU650:
I added the logic analyzer block myself to monitor the I2C bus. After stopping the simulation, I got a value change dump file name "wokwi-logic.vcd"
I imported the VCD file into sigrok and added an I2C, decoder:
You can even adjust sensor values in real time!
I found this sample project at the bottom of the mpu modules help guide located at: https://docs.wokwi.com/parts/wokwi-mpu6050