74HC165 with two decimal Push swithces
Rino
Posts: 15
The circuit with the 74HC165 shift register and the two decimal push switches works fine with the BS2.· I can read the·switch positions 0 to 9 each.· The 4 bits of each switch is combined into an 8 bit word when I read it with DEBUG.·· I want to get mumbers 0 to 99, I have to multiply this number with another number but when I set·the switches to 99, the number I·get·is 153.·· The ten switch gives me 16, 32 and so on.· I probably have to separate the 8 bit word and recombine it to get the number I need.·
Is there a better way to do it?
Is there a better way to do it?
Comments
Decimal 153 equals 99 Hex.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Yes I get that but when I multiply it with another number, it is 153 that is used.
Thanks for the quick reply.
Rino
You need to convert your BCD Hex number into a Decimal number first before you can perform any math operations to it.
Here is an example:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I am going to try that.
Rino
Thank you
Rino