Encoder 16bit output

Discussion in 'Programmer's Corner' started by Wai, Jan 5, 2005.

  1. Wai

    Thread Starter New Member

    Jan 5, 2005
    the function of a Decimal to BCD encoder is required in VHDL code ~ the catch is that it is required to output 4 different digit at the same time... means 16 bit output ~ any suggestions is very much appreciated thanks

    a brief description:
    the encoder has 10 inputs and each represents the decimal number 0 to 9 ~ if a '1' is input at the decimal 0 input then the output will be "0000", if it's at decimal 1 input the output will be "0001" and so on...
    a "Clear" input is included if it's a '1' at this input then the results will be cleared/reset or becomes "0000"

    1st input will be the first digit output... second input the second digit output... until the fourth
  2. dragan733

    Senior Member

    Dec 12, 2004
  3. beenthere

    Retired Moderator

    Apr 20, 2004

    The difference between a straight binary counter and a decimal counter is that the decimal short counts at 9. It never goes to the A, B, C, D, E, or F state. Look up the internal logic for a 40162 as an example. Binary Coded Decimal has 4 bits, but never goes beyond 1001.
  4. Wai

    Thread Starter New Member

    Jan 5, 2005

    the 16 bit output are 4 DIFFerent dec numbers as in each 4 bits represents a number in the range 0~9 ~ the 4 different decimal numbers are grouped together then only goes to the output at the same time ~ for example if this is the output is 1001 1001 1001 1001 it would means the user inputed 4 different 9's

    It's like how u key in a phone number; in a group of say 7 different decimal numbers?? 012- 1234567 ~ get what i mean?
  5. cyberhehe

    AAC Fanatic!

    Oct 6, 2004

    Some points I want clarified, when you said at start you want a Decimal to 16 bit BCD encouder, do you mean to say that you need a 10 Bit Binary input converted to Decimal???