WEDDING BOARD FLOWCHARTS
If you want to learn a little bit more about the firmware that went into the Wedding Board, this is a good place to start. These flowcharts were made using OmniGraffle (much better than microsloth’s Visio).


Upon power-on reset, the peg begins implementing the EEPROM Check routine. This is essentially the peg finding the break in the first circular buffer, indexing into the second buffer and then handling the power cycle count (are we being programmed?). This section is complicated simply because of the value checking that has to occur and the need to prevent the peg from looping infinitely.
This section had to handle numerous special cases in determining when the “cliff” of the pointer buffer was discovered. Initial versions of the code would end up in infinite loops or find false peaks or overrun the buffer. This latest version is stable and can handle cases where the EEPROM is loaded with the same number throughout.
To see an example of a dual bufferr EEPROM dump click here.




The Timer 0 Overflow Interrupt routine is another complicated routine. It begins by determining if it is handling a flash (simple on/off at a set time) or a pulse (think of pulses as colorwashing black by varying the length of the black sequence.
This section is only intended to interrupt the wash subroutine to introduce “black” into the color wheel. The Timer0 overflow interrupt is used to handle the pulse or flash modes. Sure, with a little more register combination and reclamation, it might have been possible to use a second interrupt scheme to enable *both* pulse and flash overlays simultaneously…..but this thing was already a late Wedding Present. NOTE: It’s the pulse side of things (with it’s varying interrupt cycle) that presents the most complexity. The flash interrupt routine is fairly straightforward. The most difficult portion of the overlays was making sure not to destroy needed registers. This took some discipline.
