Journal Entry #0059

Project: 03009 (MM1 Minute Hand)

2025-12-17, Anthony Remark, Marian Scientific, AMDG

A few days ago, there was a lot of work done. The circuit was constructed on a breadboard.


The Team constructed the encoder circuit and it uses a 74LS00 to interface with the stm32 bluepill. The bluepill interfaces with the Max7219. The Max7219 is wired for 2 seven segment displays that are supposed to disply the position of the minute hand.
Below are plans of the corresponding position of the EN16AB encoder to the expected output of the Max7219. The Binary column was my reading of the outputs of the Encoder. The Green column is the properly written binary output wit the Leftmost bit treated as the Most Significant Bit.

The issue of the 12 position encoder is that the binary outputs do not follow an obvious chronological pattern, so An array was constructed to extract the necessary data.

We conventionally discribe the sequence of binary numbers as following an increasing number pattern. But the Encoder doesn't output that. So We use an array to organize whatever is given from the green column (the output of the encoder corresponding to the position) to something that the code can use. This 'something' is a workable sequence of numbers to tell us what position the encoder is at.
Below is the myArray array we use. We use a sequence of binary numbers to correspond to decimal numbers. For example, the 0010 number is supposed to be the 3rd number but we have to use it as the 1st number because the EN16AB datasheet says this is the first position output. I decided to follow that convention. Another example is that 1100 is not the 10th number in binary counting but it is the 10th position output on our chosen encoder, so we set the content of that array to be 10 which corresponds to the 10 position of the encoder.

Last image is the notes on how the data from myArray will be used and the operations that will be done to feed the Max7219 the proper value to the appropriate address.