I have a Argon and I’m trying to communicate with a chip that I have working on a Arduino Uno which is using Bitbanging.
@peekay123 helped me convert the library to use the Hardware SPI interface on the Argon.
One thing I noticed when troubleshooting is that the SCLK line starts off at 3.3-3.2v but once communication starts it drops down to 1.6v. Is this normal for this pin to operate at this voltage?
The MISO, MOSI and SS/CS pin all operate at 3.3-3.2V. It’s just the SCLK line that’s operating low.
When I pull the SCLK line from the shield I’m connecting to the SCLK pin stays at 1.6v.
Any ideas? I’m going to try on a Photon also to see if there are any differences.
In the screenshot below you see the SCLK line starts off at 3.255v but then operates at 1.6v in the next screenshot.
Update: I just tested another project using a Argon with a device over SPI and the voltage on the CLK line is also 1.62V. So seems to be normal on the Argon.
I’m off to see if I see the same issue on the Photon.
What devices are your talking to?
Normally an SPI device should not put a considerable load on the communication pins.
This should be the respective PR - maybe try setting the drive strength manually
Downside of bit-banging is that it keeps the controller core occupied while communicating where HW SPI can offload that to a dedicated circuitry which can also do DMA.
One theory is that the Saelea Logic 4 I’m using can read the voltage on SCLK because of the Bus speed being higher than it’s capable of sampling accurately? Somebody else would have to verify that.
The Screenshot below shows the Analog sample rate set to 6 MS/s. The SPI bus speed was set in code for 2 Mhz same as the Arduino version of the code which the Analog voltage reads correctly. I’m not sure if the Arduino uno can run it’s SPI bus at a real 2 Mhz or if it could be slower than the Argons SPI speed running the same code.