The alternating current is generated from the otherwise-unused PC1 and PC2 pins on the ATmega328p. After a reset, the ATmega328p sets PC1 to ground and PC2 to 5v:
- Code: Select all | TOGGLE FULL SIZE
DDRC |= _BV(PC2) | _BV(PC1);
PORTC |= _BV(PC2);
PORTC &= ~_BV(PC1);
And approximately once per millisecond, the PC1 and PC2 outputs are reversed, generating 500 Hz square-wave alternating current:
Since PC1 and PC2 cannot output sufficient amperage to drive the VFD filament, they are amplified by two push-pulls:
For the direct current test, the setup and digit brightness looked like:
For the alternating current test, I used a multimeter and oscilloscope to verify that the output used to drive the VFD filament was indeed 5-volt square-wave alternating current. The setup and display looked like:
I realize that the VFD brightness gradient is difficult to see in photographs, but there was no noticeable difference between the setups. The last digit and overall brightness gradient appeared identical. Therefore, I believe the brightness gradient is intrinsic to individual tubes and that software modification is a perfectly reasonable way to workaround the issue.
This makes me wonder... Are there any compelling reasons to use alternating current for the filament?