Path: utzoo!utgpu!watserv1!watmath!att!att!rutgers!apple!uokmax!norlin From: norlin@uokmax.ecn.uoknor.edu (Norman Lin) Newsgroups: sci.electronics Subject: Re: Design a bar graph Message-ID: <1990Nov3.055034.23343@uokmax.ecn.uoknor.edu> Date: 3 Nov 90 05:50:34 GMT References: <16307@s.ms.uky.edu> Distribution: na Organization: Engineering Computer Network, University of Oklahoma, Norman, OK Lines: 51 tindle@ms.uky.edu (Ken Tindle) writes: >I have three binary lines, for eight possible states (yeah, oh wow). How >can one light seven LED's from this, with zero having all LED's off and >seven lighting all seven of them, in bar graph fashion? A dot display is >easy, but bar is tougher. As a final touch, one should tax each digital ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >line with but one standard TTL load. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If I understand this restriction, this pretty much rules out any solution involving a demultiplexer, since one would need several OR gates connected to the demultiplexer output, each OR gate having one input from the current output line and another from the previous (i.e. line 4 would go high either if line 4 was selected from demultiplexer input 010 OR if line 5 was high, since we want a bar graph, line 5 -> line 4 which similarly -> line 3 -> line 2 -> line 1, so we get a continuous 1-2-3-4-5 bar output). Thus, the only solution I see (and you are right, it is a bit surprisingly, and, I might add, annoyingly, difficult!) is to use some sort of an arithmetic unit with binary or perhaps BCD output, since only this way can you control all 7 lines independently and simultaneously (as needed for your bar graph) while still only "taxing each digital line with but one standard TTL load." Stated in the following manner, the problem may perhaps be more easily solved: Given the binary number 000, what do I do to get the binary number 000 0000? 001 000 0001 ... ... .... 110 011 1111 111 111 1111 I see no trivial solution to this, but I do believe looking at the problem this way may help in finding its solution. Of course the brute-force least-parts solution is to write out the entire truth table and use a PLA... :-) >I can think of two ways to implement this, but they both seem like too many >parts have to be used. What were your methods? >--------------------------\ /----------------------------------------------- >INTERNET:tindle@ms.uky.edu | "Could you please continue the petty bickering? >BITNET: tindle@ukma.bitnet | I find it most intriguing." --- Data, >Ken Tindle - Lexington, KY | Star Trek, The Next Generation, "Haven" >--------------------------/ \----------------------------------------------- -- \ /\/\ /\/\ +-----------------------------+ /\/\ /\/\ /./ \\ /./\\\ /./\\\ /====|Norman Lin/norlin@129.15.20.2|===/./\\\ /./\\\ /./ \\\/./ \\\/./ \\\/./===| norlin@uokmax.ecn.uoknor.edu|====/ \\\/./ \\\/./ \/\/ \/\/ \/\/ +-----------------------------+ \/\/ \/\/