Page 1 of 1

3-bit Extendable Graphing Display

Posted: Thu Oct 05, 2017 5:53 am
by SuicideJunkie
I had a desire to see my power history and came up with this tonight:
Power History Graph Display
Power History Graph Display
PowerHistoryGraph.png (933.71 KiB) Viewed 2624 times
It was pretty straightforward, once the plan was set.
- The starting block measures an accumulator and divides by 13 to get a 3-bit value (0-7) (Any input could be used of course, as long as you divide it down to 3 bits or rework the rest of the system for more bits.)
- It also contains a clock in the bottom left which is chained along the substations. The cycle time can be adjusted to arbitrary sample rates.
- The top portion of the clock checks for when the T<2 and outputs S=1 for a couple ticks every time the clock expires. This is tuned so that the shifted value stabilizes after making its way through the shifter and AND operations.

- The output of the clock is multiplied by 3 and fed into the bit shifter as the shift amount.
- The bit shifter thus will move everything left 3 bits each time the clock expires, and leave it alone otherwise.
- The AND operation drops the lowest 3 bits so that the accumulator result can be added in without overflowing.

- The row of ANDs at the top mask off the relevant 3 bits for each timeslice, and the lights display the value.
- The rightmost lights get their value divided by 16777216 to bring it back down to 0-7.
- That rightmost 0-7 can then be fed in to another segment of the display for infinite chaining.

Note: Depending on the timing of rocket fuel and uranium production activations, and biter attacks, my nightly accumulator minimum does vary as can be seen in the graph.
The charge rate also visibly slows from 2 lights to 3, as the rising charge level wakes up some of the day-only production facilities.
Display Base String
Display Extension String

3-bit Extendable Graphing Display

Posted: Fri Oct 06, 2017 4:22 am
by SuicideJunkie
I've made an update worth mentioning:
By swapping most of the combinators over to using Each, and a bit of futzing to isloate the clock, the memory is now multichannel (everything except S is remembered since that is used for the clocked shifting signal) I've eliminated a tick and a combinator from each segment by passing the clock along the substations, but spent it again to make the multichannel work.

It should also be noted that if a value changes during the memory shift, a flickering light can be locked in. The flicker state will be passed along faithfully between segments, and could be considered a feature.

Currently I've got offscreen logic which compares the current stored power against a solar clock ideal level, and uses the color channels to run the 8th row of lights.
The two odd white lights in the bottom row are from when I was still wiring up the color rules.
New graphing display
New graphing display
PowerHistoryGraph3.png (585.71 KiB) Viewed 2575 times
New Display Base String
New Display Segment String

Re: 3-bit Extendable Graphing Display

Posted: Fri Oct 06, 2017 6:39 am
by vanatteveldt
Very cool!!