Forums

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

Started by John Robertson October 8, 2018
On 10/09/2018 07:49 PM, bitrex wrote:
> On 10/09/2018 06:43 PM, TTman wrote: >> >>> >>>    pinMode(IN_PIN_1, INPUT_PULLUP); >>>    pinMode(IN_PIN_2, INPUT_PULLUP); >>>    pinMode(IN_PIN_3, INPUT_PULLUP); >>>    pinMode(IN_PIN_4, INPUT_PULLUP); >>>    pinMode(IN_PIN_5, INPUT_PULLUP); >>>    pinMode(IN_PIN_6, INPUT_PULLUP); >>>    pinMode(IN_PIN_7, INPUT_PULLUP); >>> >>>    pinMode(OUT_PIN_0, OUTPUT); >>>    pinMode(OUT_PIN_1, OUTPUT); >>>    pinMode(OUT_PIN_2, OUTPUT); >>>    pinMode(OUT_PIN_3, OUTPUT); >>> >>>    state = new State{}; >>> } >>> >>> void loop() { >>>    read_state(state); >>>    write_values(decode_state(state)); >>> } >>> >>> >>> >> Nice, but probaly less code lines in assembler..... but if you can't >> code, you can't code so each will stick with what they know and >> complete.... > > They don't sell devices with sufficient pins with memory spaces less > than around 2k so it's irrelevant what size the binary is for a > requirement like this one. > > writing it in assembly to reduce binary size for an irrelevant > specification on what appears to be a one-off job, even, is called > "premature optimization" it's just a waste of time
Also more error-prone
On Tue, 9 Oct 2018 10:01:05 -0700, John Robertson <spam@flippers.com>
wrote:

>On 2018/10/09 9:15 AM, Jeff Liebermann wrote: >> 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>
>Size isn't everything...(ducking) > >Other than being obsolete it would be fine. Perhaps you have a few dozen >to sell? >Otherwise I'll likely go with the overkill one: AT27C256R-70JU
I see you want a 32PLCC package. I'm not selling parts, but there are plenty for sale on eBay. <https://www.ebay.com/sch/i.html?_nkw=28c16> If possible, try to get the "A" suffix version. Most are 24 pin DIP packages, which are probably too big. However, there are some smaller packages available. For example: <https://www.ebay.com/itm/3-PCS-ATMEL-AT28C16-20JC-IC-EEPROM-16KBIT-200NS-32PLCC-ATMEL/323143000067>
>At $1.50 it is hard to beat.
Looks like 28C16 EEPROMs are getting scarce, so the prices are high. You probably don't need an electrically erasable EPROM, so a burn once type is probably cheaper and good enough. I guess the AT27C256R is good enough. I assume you have an EPROM burner. I have one of these: <https://www.ebay.com/itm/Willem-EPROM-programmer-BIOS-4-5/222933620416> The on board 32PLCC sockets should be useful. It's rather clumsy to use without a box, but since I don't use it very often, I can live with the inconvenience. -- 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 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... > >Thanks! > >John :-#)#
We had a Noritake 16-segment 8-character VF display tube go end-of-life, so we did a drop-in replacement board with an LCD and a little uP. It nabs the scanned 16-seg drive on the fly and maps that into the serial LCD. That saved redesigning/recoding four different boxes that used the VF display board. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 2018/10/09 5:25 PM, Jeff Liebermann wrote:
> On Tue, 9 Oct 2018 10:01:05 -0700, John Robertson <spam@flippers.com> > wrote: > >> On 2018/10/09 9:15 AM, Jeff Liebermann wrote: >>> 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> > >> Size isn't everything...(ducking) >> >> Other than being obsolete it would be fine. Perhaps you have a few dozen >> to sell? >> Otherwise I'll likely go with the overkill one: AT27C256R-70JU > > I see you want a 32PLCC package. > > I'm not selling parts, but there are plenty for sale on eBay. > <https://www.ebay.com/sch/i.html?_nkw=28c16> > If possible, try to get the "A" suffix version. Most are 24 pin DIP > packages, which are probably too big. However, there are some smaller > packages available. For example: > <https://www.ebay.com/itm/3-PCS-ATMEL-AT28C16-20JC-IC-EEPROM-16KBIT-200NS-32PLCC-ATMEL/323143000067> > >> At $1.50 it is hard to beat. > > Looks like 28C16 EEPROMs are getting scarce, so the prices are high. > You probably don't need an electrically erasable EPROM, so a burn once > type is probably cheaper and good enough. I guess the AT27C256R is > good enough.
Actually I am now leaning to using a SST39SF010A which are around $1US in 25 lots from Digikey - I did get an assortment of PLC to DIP adapters, so the 32 pin package is not a problem.
> > I assume you have an EPROM burner. I have one of these: > <https://www.ebay.com/itm/Willem-EPROM-programmer-BIOS-4-5/222933620416> > The on board 32PLCC sockets should be useful. It's rather clumsy to > use without a box, but since I don't use it very often, I can live > with the inconvenience. >
I have a bunch of Eprom burners, going back to an ancient Pro-Log which reads and burns the odd 1702. My latest is a Xeltek Superpro 610P which handles a lot of stuff I use, other than 1970s PROMs, so for those I fire up one of my Data I/O 29Bs. Way back when I wire-wrapped an Eprom copier that went from pairs of 2708s up to pairs of 2764s using jumper headers to select the operation. Used that for copying ROMs to EPROMs before I could afford a computer (Apple II clone was my first real computer) Still have those buried in my spare parts area... 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/09 5:52 PM, John Larkin 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... >> >> Thanks! >> >> John :-#)# > > We had a Noritake 16-segment 8-character VF display tube go > end-of-life, so we did a drop-in replacement board with an LCD and a > little uP. It nabs the scanned 16-seg drive on the fly and maps that > into the serial LCD. That saved redesigning/recoding four different > boxes that used the VF display board. > >
Our old Fluke 9100s and 9010s will need that sort of repair some day, but the Noritake displays seem to last and last, until hit by something hard that is... 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 10/09/2018 08:52 PM, John Larkin 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... >> >> Thanks! >> >> John :-#)# > > We had a Noritake 16-segment 8-character VF display tube go > end-of-life, so we did a drop-in replacement board with an LCD and a > little uP. It nabs the scanned 16-seg drive on the fly and maps that > into the serial LCD. That saved redesigning/recoding four different > boxes that used the VF display board. > >
That's too bad, those Japanese-mfgr VFDs are much more civilized than the cheap China Special LED backlit LCDs. Also easier to view from an angle and in daylight
On Tuesday, October 9, 2018 at 3:21:01 AM UTC-4, John Robertson wrote:
> 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
Trouble is this truth table doesn't show the don't care states of which there are 112 of them. This will let you highly optimize the equations you want to implement and might well let you use some pretty simple SSI/MSI logic. Of course if you are targeting a PLD a tool can do this for you. But then this table is not as useful as a simple case statement. Many HDL compilers will implement don't cares by assignments of the value '-'. Assuming the lit segments are logic lows, the important code becomes... signal CharSegs unsigned(6 downto 0); signal CharHex unsigned(3 downto 0); process (CharSegs) BEGIN case CharSegs is when "0000001" => CharHex <= "0000"; -- '0' when "1001111" => CharHex <= "0001"; -- '1' when "0010010" => CharHex <= "0010"; -- '2' when "0000110" => CharHex <= "0011"; -- '3' when "1001100" => CharHex <= "0100"; -- '4' when "0100100" => CharHex <= "0101"; -- '5' when "0100000" => CharHex <= "0110"; -- '6' when "0001111" => CharHex <= "0111"; -- '7' when "0000000" => CharHex <= "1000"; -- '8' when "0000100" => CharHex <= "1001"; -- '9' when "0001000" => CharHex <= "1010"; -- 'A' when "1100000" => CharHex <= "1011"; -- 'b' when "0110001" => CharHex <= "1100"; -- 'C' when "1000010" => CharHex <= "1101"; -- 'd' when "0110000" => CharHex <= "1110"; -- 'E' when "0111000" => CharHex <= "1111"; -- 'F' when others => "----"; end case; end process; A tool will provide optimized logic equations and you can choose whether you want to use SSI/MSI or a PLD. Rick C.
On Tuesday, October 9, 2018 at 3:26:16 AM UTC-4, John Robertson wrote:
> 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...
Actually the inputs will be seven, so 128 words and four bits out, not that it makes much difference these days when small EPROMs are virtually impossible to find. Rick C.
On Tuesday, October 9, 2018 at 1:01:16 PM UTC-4, John Robertson wrote:
> On 2018/10/09 9:15 AM, Jeff Liebermann wrote: > > 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> > > > > Size isn't everything...(ducking) > > Other than being obsolete it would be fine. Perhaps you have a few dozen > to sell? > > Otherwise I'll likely go with the overkill one: AT27C256R-70JU > > At $1.50 it is hard to beat. > > Thanks, > > John :-#)#
$1.1179 qty 1 https://lcsc.com/product-detail/CPLD-FPGA_MICROCHIP_ATF16V8B-15PU_ATF16V8B-15PU_C6509.html Rick C.
Am 11.10.2018 um 01:46 schrieb gnuarm.deletethisbit@gmail.com:
> On Tuesday, October 9, 2018 at 1:01:16 PM UTC-4, John Robertson wrote: >> On 2018/10/09 9:15 AM, Jeff Liebermann wrote: >>> 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> >>> >> >> Size isn't everything...(ducking) >> >> Other than being obsolete it would be fine. Perhaps you have a few dozen >> to sell? >> >> Otherwise I'll likely go with the overkill one: AT27C256R-70JU >> >> At $1.50 it is hard to beat. >> >> Thanks, >> >> John :-#)# > > $1.1179 qty 1 > > https://lcsc.com/product-detail/CPLD-FPGA_MICROCHIP_ATF16V8B-15PU_ATF16V8B-15PU_C6509.html > > Rick C. >
< https://www.digikey.de/products/de?keywords=%20ATF16V8B-15PU > &euro;0.75 qty 1 at digikey. cheers, Gerhard