Forums

Need to construct the logical reverse of a 7448 - perhaps using a GAL

Started by John Robertson October 8, 2018
On Mon, 8 Oct 2018 21:19:16 -0700, John Robertson <spam@flippers.com>
wrote:


>Truth table can't display it here, so I put it here: >ftp://flippers.com//usr/www/users/flip/images/temp/7-segment-to-BCD-truth-table.png
550 no such directory. -- Jeff Liebermann jeffl@cruzio.com 150 Felker St #D http://www.LearnByDestroying.com Santa Cruz CA 95060 http://802.11junk.com Skype: JeffLiebermann AE6KS 831-336-2558
On Tuesday, October 9, 2018 at 12:19:26 AM UTC-4, John Robertson wrote:
> On 2018/10/08 8:27 PM, gnuarm.deletethisbit@gmail.com wrote: > > On Monday, October 8, 2018 at 9:57:49 PM UTC-4, Jeff Liebermann wrote: > >> On Mon, 8 Oct 2018 17:20:35 -0700, John Robertson <spam@flippers.com> > >> wrote: > >> > >>> I am looking for a way to take the TTL level outputs (treating them as > >>> inputs) of a 7448 and convert them back to the original BCD TTL input > >>> levels (but as outputs) and I figured a simple socketed GAL would do the > >>> trick for the least cost. However I don't have the skill set to build > >>> the GAL logic table for this. Any suggestions? And no, I can't simply > >>> remove the 7448 from the circuit. > >>> > >>> Go easy on me here, I can unscrew hardware, but Boolean has never been > >>> my forte... > >> > >> Ok, a 7 segment display to BCD converter. > >> <http://slidegur.com/doc/1081821/7-segment-to-bcd-converter> > >> The truth table on Pg 5, logic on Pg 6, and schematic on Pg 8 should > >> be sufficient to produce a PLA or SSI implementation. > >> > >> So, do I get a finders fee? > > > > This logic diagram is not optimal. I guess a Karnaugh map for 7 inputs is not so easy to draw. I was thinking about this recently. When I was in school they taught Karnaugh maps because you would use them from time to time. Later they taught Karnaugh maps because you needed to know how they worked so you could potentially write your own minimization programs I suppose. I expect they barely teach Karnaugh maps because there is tons of software around to do this for you much as they don't emphasize simple arithmetic when you will likely use a calculator. > > > > I think this is a lot simpler to construct from SSI than the diagram shown. Or maybe a very few MSI devices could be used. Or mux logic (which I was taught in school) could be used much as is done in FPGAs. I haven't checked, but I bet this could be done with maybe six devices. > > > > Rick C. > > > > My thought was to trick a GAL into being essentially a ROM lookup table. > should be enough gates inside for that. > > Using the link Jeff provided I have adapted the boolean equations that I > am hoping can be further simplified, (f' = NOT-f), but I am done for now: > > W = abcdfg + bcdef&rsquo;g + a&rsquo;b&rsquo;cdefg + a&rsquo;b&rsquo;c&rsquo;def&rsquo;g&rsquo; + abc&rsquo;defg + ab&rsquo;c&rsquo;d&rsquo;efg
W = (b'+d'+f'+g')' This is an example of how much simpler the optimized equations can be. To do this using tools, you would need to complete the full 128 state table with don't cares which could be done with a simple program. Then a tool could be used to find the optimized equations. I did this by inspection of the short table finding the inputs required to distinguish the output values. I don't think minimizing the equations using Boolean logic would be enough. I don't have the full 16 character table so this may not be the actual answer you need.
> X = ab&rsquo;cdfg+ a&rsquo;bcd&rsquo;e&rsquo;fg+ abcd&rsquo;e&rsquo;f&rsquo;g&rsquo; + a&rsquo;b&rsquo;c&rsquo;def&rsquo;g&rsquo; + a&rsquo;bcdef&rsquo;g + > abc&rsquo;defg + ab&rsquo;c&rsquo;d&rsquo;efg > > Y = abc&rsquo;deg + abcdf&rsquo;g + ab&rsquo;cdefg + abcd&rsquo;e&rsquo;f&rsquo;g&rsquo; + abcdef&rsquo;g + a&rsquo;b&rsquo;cdefg + > ab&rsquo;c&rsquo;d&rsquo;efg > > Z = bcd&rsquo;e&rsquo;f&rsquo;g&rsquo;+ abcde&rsquo;g+ ab&rsquo;cde&rsquo;fg + a&rsquo;b&rsquo;cdefg + a&rsquo;bcdef&rsquo;g + ab&rsquo;c&rsquo;d&rsquo;efg > > Truth table can't display it here, so I put it here: > > ftp://flippers.com//usr/www/users/flip/images/temp/7-segment-to-BCD-truth-table.png > > John :-#)#
Rick C.
On 10/08/2018 08:20 PM, John Robertson wrote:
> I am looking for a way to take the TTL level outputs (treating them as > inputs) of a 7448 and convert them back to the original BCD TTL input > levels (but as outputs) and I figured a simple socketed GAL would do the > trick for the least cost. However I don't have the skill set to build > the GAL logic table for this. Any suggestions? And no, I can't simply > remove the 7448 from the circuit. > > Go easy on me here, I can unscrew hardware, but Boolean has never been > my forte... > > Thanks! > > John :-#)#
Might as well just use an 8 bit microcontroller like the ATTiny 2313, it's a dollar in quantity, doesn't need any external hardware to run at ~8MHz which is plenty, has 2 kilobytes of program memory which is plenty. then just sort of the KISS-ish program I can think of, in C++-ish: struct State { bool seg_1 = false; bool seg_2 = false; bool seg_3 = false; bool seg_4 = false; bool seg_5 = false; bool seg_6 = false; bool seg_7 = false; }; void read_state(State* state) { state->seg_1 = digitalRead(DIGITAL_IN_PIN_1); state->seg_2 = digitalRead(DIGITAL_IN_PIN_2); // etc... } int decode_state(const State* state) { if (state->seg_1 && state->seg_2) { return 0x1; } else if (state->... { // etc } else { return -1; } } void write_values(int value) { switch (value) { case 0: digitalWrite(OUT_PIN_0, 0); digitalWrite(OUT_PIN_1, 0); digitalWrite(OUT_PIN_2, 0); digitalWrite(OUT_PIN_3, 0); break; case 1: digitalWrite(OUT_PIN_0, 1); digitalWrite(OUT_PIN_1, 0); digitalWrite(OUT_PIN_2, 0); digitalWrite(OUT_PIN_3, 0); break; case 2: digitalWrite(OUT_PIN_0, 0); digitalWrite(OUT_PIN_1, 1); digitalWrite(OUT_PIN_2, 0); digitalWrite(OUT_PIN_3, 0); break; // etc. default: //do something if "decode_state" returns -1 = invalid state } } int main() { State state; for (;;) { // loop forever read_state(&state); write_values(decode_state(&state)); } }
On 2018/10/08 9:40 PM, Jeff Liebermann wrote:
> On Mon, 8 Oct 2018 21:19:16 -0700, John Robertson <spam@flippers.com> > wrote: > > >> Truth table can't display it here, so I put it here: >> ftp://flippers.com//usr/www/users/flip/images/temp/7-segment-to-BCD-truth-table.png > > 550 no such directory. >
Crap, this is correct: https://flippers.com/images/temp/7-segment-to-BCD-truth-table.png Thanks, John :-#)#
On 2018/10/08 9:15 PM, tom wrote:
> > "John Robertson" <spam@flippers.com> wrote in message > news:FpWdnYuq0ujJaSbGnZ2dnUU7-I_NnZ2d@giganews.com... >> I am looking for a way to take the TTL level outputs (treating them as >> inputs) of a 7448 and convert them back to the original BCD TTL input >> levels (but as outputs) and I figured a simple socketed GAL would do the >> trick for the least cost. However I don't have the skill set to build the >> GAL logic table for this. Any suggestions? And no, I can't simply remove >> the 7448 from the circuit. >> >> Go easy on me here, I can unscrew hardware, but Boolean has never been my >> forte... >> >> Thanks! >> >> John :-#)# >> -- > > One way to do it is to use an EPROM. Connect the seven segments to AD0 to > AD6. Use the first four data outputs (D0 to D3) for the BCD code. Make up a > table with the correct memory locations to put 1s in for the decoder. Tie > /CE and /CS to the appropriate levels. A 2716 would work fine, just ignore > the unwanted outputs and tie AD7 to ground. > > > Regards > >
Was looking for tiny, I have lots of Eproms, but space, eh? An Eprom would be simple too. The look up table would only take 15 bytes, you would use the Address lines A0-A3 with the Data lines being the outputs. Easy, but too big for my application. I guess I could use a tiny EPROM, should have looked for that I guess. Got caught up in elegant solutions... John :-#)# -- (Please post followups or tech inquiries to the USENET newsgroup) John's Jukes Ltd. MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3 (604)872-5757 (Pinballs, Jukes, Video Games) www.flippers.com "Old pinballers never die, they just flip out."
On 2018/10/08 10:11 PM, gnuarm.deletethisbit@gmail.com wrote:
> On Tuesday, October 9, 2018 at 12:19:26 AM UTC-4, John Robertson wrote: >> On 2018/10/08 8:27 PM, gnuarm.deletethisbit@gmail.com wrote: >>> On Monday, October 8, 2018 at 9:57:49 PM UTC-4, Jeff Liebermann wrote: >>>> On Mon, 8 Oct 2018 17:20:35 -0700, John Robertson <spam@flippers.com> >>>> wrote: >>>> >>>>> I am looking for a way to take the TTL level outputs (treating them as >>>>> inputs) of a 7448 and convert them back to the original BCD TTL input >>>>> levels (but as outputs) and I figured a simple socketed GAL would do the >>>>> trick for the least cost. However I don't have the skill set to build >>>>> the GAL logic table for this. Any suggestions? And no, I can't simply >>>>> remove the 7448 from the circuit. >>>>> >>>>> Go easy on me here, I can unscrew hardware, but Boolean has never been >>>>> my forte... >>>> >>>> Ok, a 7 segment display to BCD converter. >>>> <http://slidegur.com/doc/1081821/7-segment-to-bcd-converter> >>>> The truth table on Pg 5, logic on Pg 6, and schematic on Pg 8 should >>>> be sufficient to produce a PLA or SSI implementation. >>>> >>>> So, do I get a finders fee? >>> >>> This logic diagram is not optimal. I guess a Karnaugh map for 7 inputs is not so easy to draw. I was thinking about this recently. When I was in school they taught Karnaugh maps because you would use them from time to time. Later they taught Karnaugh maps because you needed to know how they worked so you could potentially write your own minimization programs I suppose. I expect they barely teach Karnaugh maps because there is tons of software around to do this for you much as they don't emphasize simple arithmetic when you will likely use a calculator. >>> >>> I think this is a lot simpler to construct from SSI than the diagram shown. Or maybe a very few MSI devices could be used. Or mux logic (which I was taught in school) could be used much as is done in FPGAs. I haven't checked, but I bet this could be done with maybe six devices. >>> >>> Rick C. >>> >> >> My thought was to trick a GAL into being essentially a ROM lookup table. >> should be enough gates inside for that. >> >> Using the link Jeff provided I have adapted the boolean equations that I >> am hoping can be further simplified, (f' = NOT-f), but I am done for now: >> >> W = abcdfg + bcdef&rsquo;g + a&rsquo;b&rsquo;cdefg + a&rsquo;b&rsquo;c&rsquo;def&rsquo;g&rsquo; + abc&rsquo;defg + ab&rsquo;c&rsquo;d&rsquo;efg > > W = (b'+d'+f'+g')' > > This is an example of how much simpler the optimized equations can be. To do this using tools, you would need to complete the full 128 state table with don't cares which could be done with a simple program. Then a tool could be used to find the optimized equations. > > I did this by inspection of the short table finding the inputs required to distinguish the output values. I don't think minimizing the equations using Boolean logic would be enough. > > I don't have the full 16 character table so this may not be the actual answer you need. > > >> X = ab&rsquo;cdfg+ a&rsquo;bcd&rsquo;e&rsquo;fg+ abcd&rsquo;e&rsquo;f&rsquo;g&rsquo; + a&rsquo;b&rsquo;c&rsquo;def&rsquo;g&rsquo; + a&rsquo;bcdef&rsquo;g + >> abc&rsquo;defg + ab&rsquo;c&rsquo;d&rsquo;efg >> >> Y = abc&rsquo;deg + abcdf&rsquo;g + ab&rsquo;cdefg + abcd&rsquo;e&rsquo;f&rsquo;g&rsquo; + abcdef&rsquo;g + a&rsquo;b&rsquo;cdefg + >> ab&rsquo;c&rsquo;d&rsquo;efg >> >> Z = bcd&rsquo;e&rsquo;f&rsquo;g&rsquo;+ abcde&rsquo;g+ ab&rsquo;cde&rsquo;fg + a&rsquo;b&rsquo;cdefg + a&rsquo;bcdef&rsquo;g + ab&rsquo;c&rsquo;d&rsquo;efg >> >> Truth table can't display it here, so I put it here: >> >> https://flippers.com/images/temp/7-segment-to-BCD-truth-table.png (fixed) >> >> John :-#)# > > Rick C. >
Interesting, and the corrected link is: https://flippers.com/images/temp/7-segment-to-BCD-truth-table.png Thanks for taking the time! John :-#)# -- (Please post followups or tech inquiries to the USENET newsgroup) John's Jukes Ltd. MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3 (604)872-5757 (Pinballs, Jukes, Video Games) www.flippers.com "Old pinballers never die, they just flip out."
Am 09.10.2018 um 09:26 schrieb John Robertson:
> On 2018/10/08 9:15 PM, tom wrote:
>> One way to do it is to use an EPROM.&nbsp; Connect the seven segments to >> AD0 to >> AD6. Use the first four data outputs (D0 to D3) for the BCD code. Make >> up a >> table with the correct memory locations to put 1s in for the decoder. Tie >> /CE and /CS to the appropriate levels. A 2716 would work fine, just >> ignore >> the unwanted outputs and tie AD7 to ground. >> >> >> Regards >> >> > > Was looking for tiny, I have lots of Eproms, but space, eh? An Eprom > would be simple too. The look up table would only take 15 bytes, you > would use the Address lines A0-A3 with the Data lines being the outputs. > Easy, but too big for my application. I guess I could use a tiny EPROM, > should have looked for that I guess. Got caught up in elegant solutions...
Someone I knew got bitten by that. He had an EPROM that contained dynamic logic. It would present the correct data, but after some time the data turned wrong. Hold time was not eternal. Perfectly OK for a processor, but not for character mapping of a mechanical teletype. :-) Gerhard
On Tuesday, 9 October 2018 13:23:50 UTC+1, Gerhard Hoffmann  wrote:
> Am 09.10.2018 um 09:26 schrieb John Robertson: > > On 2018/10/08 9:15 PM, tom wrote: > > >> One way to do it is to use an EPROM.&nbsp; Connect the seven segments to > >> AD0 to > >> AD6. Use the first four data outputs (D0 to D3) for the BCD code. Make > >> up a > >> table with the correct memory locations to put 1s in for the decoder. Tie > >> /CE and /CS to the appropriate levels. A 2716 would work fine, just > >> ignore > >> the unwanted outputs and tie AD7 to ground. > >> > >> > >> Regards > >> > >> > > > > Was looking for tiny, I have lots of Eproms, but space, eh? An Eprom > > would be simple too. The look up table would only take 15 bytes, you > > would use the Address lines A0-A3 with the Data lines being the outputs. > > Easy, but too big for my application. I guess I could use a tiny EPROM, > > should have looked for that I guess. Got caught up in elegant solutions... > > Someone I knew got bitten by that. He had an EPROM that contained > dynamic logic. It would present the correct data, but after some > time the data turned wrong. Hold time was not eternal. > > Perfectly OK for a processor, but not for character mapping of a > mechanical teletype. > > :-) Gerhard
EPROMs can be nice for this sort of thing, but there are likely to be some glitches before the outputs settle to the values you are expecting. This may or may not matter, depending on what comes next in your system. If one of the outputs is being used to generate a clock for a peripheral it really matters! As mentioned above, a small processor will probably give you the smallest solution. John John
On 2018/10/09 6:43 AM, jrwalliker@gmail.com wrote:
> On Tuesday, 9 October 2018 13:23:50 UTC+1, Gerhard Hoffmann wrote: >> Am 09.10.2018 um 09:26 schrieb John Robertson: >>> On 2018/10/08 9:15 PM, tom wrote: >> >>>> One way to do it is to use an EPROM.&nbsp; Connect the seven segments to >>>> AD0 to >>>> AD6. Use the first four data outputs (D0 to D3) for the BCD code. Make >>>> up a >>>> table with the correct memory locations to put 1s in for the decoder. Tie >>>> /CE and /CS to the appropriate levels. A 2716 would work fine, just >>>> ignore >>>> the unwanted outputs and tie AD7 to ground. >>>> >>>> >>>> Regards >>>> >>>> >>> >>> Was looking for tiny, I have lots of Eproms, but space, eh? An Eprom >>> would be simple too. The look up table would only take 15 bytes, you >>> would use the Address lines A0-A3 with the Data lines being the outputs. >>> Easy, but too big for my application. I guess I could use a tiny EPROM, >>> should have looked for that I guess. Got caught up in elegant solutions... >> >> Someone I knew got bitten by that. He had an EPROM that contained >> dynamic logic. It would present the correct data, but after some >> time the data turned wrong. Hold time was not eternal. >> >> Perfectly OK for a processor, but not for character mapping of a >> mechanical teletype. >> >> :-) Gerhard > > EPROMs can be nice for this sort of thing, but there are likely to be > some glitches before the outputs settle to the values you are > expecting. This may or may not matter, depending on what comes next > in your system. If one of the outputs is being used to generate a clock > for a peripheral it really matters! > > As mentioned above, a small processor will probably give you the > smallest solution. > > John > > > John > >
This is for very slow logic - a few hertz - so settling time is not an issue. Basically I am taking the output of a still available obsolete CPU that originally fed a 7-segment display directly through a driver and using it to replace an unobtanium obsolete CPU array that drove a 7448 - want the circuit to be simple from the end users perspective - rip the 3 old chips out and plug in a replacement sub-board with no added work required. An $1.50USD EPROM is just fine and saves me a bunch of time in the design stage. Production is expected to be low, under 50/year, but keeps those customers happy! Thanks for all the suggestions! John :-#)#
On Tue, 9 Oct 2018 00:26:06 -0700, John Robertson <spam@flippers.com>
wrote:

>Easy, but too big for my application. I guess I could use a tiny EPROM, >should have looked for that I guess. Got caught up in elegant solutions...
Swell. Now you want it small. Perhaps something like a 28C16A: <https://www.digchip.com/datasheets/download_datasheet.php?id=548714&part-number=M28C16A> -- Jeff Liebermann jeffl@cruzio.com 150 Felker St #D http://www.LearnByDestroying.com Santa Cruz CA 95060 http://802.11junk.com Skype: JeffLiebermann AE6KS 831-336-2558