Journal Entry #0065
2025-12-21, Anthony Remark, Marian Scientific, AMDG
Yesterday, I programmed another stm32 bluepill and I added a Logic Leveler from 3.3V to 5V.
The second Bluepill was an attempt to power the whole circuit with the micro B usb input. The Top Bluepill's
micro B usb has no clearance. So another Bluepill was placed in the bottom and configured to work with the rest
of the circuit.
The Bluepill is unable to supply the Max7219 and the Seven segment displays with enough current to operate. Another thing that
was discovered is that the Max7219 was not operating as expected.
There may have been issues with the code but what is expected is the issue is with the logic levels being sent to the max7219. The Max7219 is configured
to receive logic levels of 5V, but the Bluepill outputs 3.3V for logic High.
A Logic level is used to attempt to correct this issue. But the expected operation was not observed. The Max7219 was not displaying anything. An attempt to
understand why was made using the Analog Discovery Oscilloscope feature.
The Blue signal reading from the oscilloscope is the CLK signal before the logic leveler. So it's from the bluepill.
The Yellow Signal reading from the oscilloscopre is the CLK signal after the logic leveler.
Together, both signals are like this,
But This doesn't tell us much. If we zoom into the signals, we get this:
But this essentially tells us nothing because we know the CLK signal is supposed to be a pulse Train with a period. So when
the sampling is turned up to 100 MHz, we get something that looks like what the CLK signal should look like.
Well, we have a lot of Squiggles that shouldn't be there. My hypothesis is that the Logic Leveler is corrupting the signal.
When learning Digital Circuits, the class stresses that the signal delays and the degrating of the signal are important variables to
consider when designing a circuit. It seems that the Max7219 is not 'in time' with the bluepill because of the logic leveler.
The Remedy for this is perhaps alteration of the shiftout function, or making our own shiftout function that doesn't need to be soo fast. Or
we can use the atmega chip instead of the bluepill, but that would require great alteration of the code.