Minecoprocessors

Minecoprocessors

183k Downloads

Upper Nibble ADC and DAC Support

frodare opened this issue ยท 2 comments

commented

discussed in #7

commented

Using the values below would allow the input pins to always be in ADC mode without messing up current programs by making sure the lowest bit is always on for any signal greater than zero:

 redstone    output port    input port
   signal         ranges        values
        0              0             0
        1         1 - 17            17
        2        18 - 33            33
        3        34 - 49            49
        4        50 - 65            65
        5        66 - 81            81
        6        82 - 97            97
        7       98 - 113           113
        8      114 - 129           129
        9      130 - 145           145
       10      146 - 161           161
       11      162 - 177           177
       12      178 - 193           193
       13      194 - 209           209
       14      210 - 225           225
       15      226 - 241           241

Using these values to determine the output signals in a forced DAC mode could break current programs. A value of 0xf[1-f] would need to be used instead of anything greater than zero to get a output signal of 15. Also, all even values are currently treated as off, but now they would considered on if greater than zero. Maybe that wouldn't be a big issue though and avoids the need to add an additional PORTs register.

commented

Decided to just create a new register, ADC, to keep things clean.