Mapping 8-bit to 3-bit.

Discussion in 'General Electronics Chat' started by DaddyCoder, Apr 1, 2014.

  1. DaddyCoder

    Thread Starter New Member

    Apr 1, 2014
    1
    0
    Hi,

    I am working on a simple project which requires ADC 0804 output. However the adc gives me 255 outputs, whereas I require just 8(3-bit) outputs. That is, I want the adc output mapped onto 3-bit output, where outputs from 0 to 32 are mapped unto single bit, 32 to 64 onto the next one, etc. These input would then be decoded by 3-8 decoder, lightning up 8 LEDs. ( lm3914 cannot be used)


    Now, I want to ask if there is any IC which can help me with this function, or will I have implement 8 comparator circuits?
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Just take the three most-significant bits and use those...
     
    atferrari likes this.
  3. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,530
    1,248
    Yup, it really is that simple. Bit six changes state every 32 values, exactly what you describe. And bit 7 follows, and bit 8.

    ak
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    ADC0804 → CD4028 → 8 LEDs
    CD4028 - connecting D to GND, using 0~7 connecting to 8 LEDs and 8 resistors.
     
Loading...