Logic Help Please

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by paulsantangelo:
Hi there:<p>I started editing the buffer of a blank chip. It a 512K, I ran into my first snag!<p>The Screen looked like this <p>ADDRESS 0 1 2 3 4 5 6 7..F
00000000
00000010
00000020
00000030<p>I edited across, and I wonder if that was correct because your offsets were only single digits<p>ADDRESS 0 1 2 3 4 5 6 7 ..F
00000000 01 01 00 00 00 00 00 01<p>Is this correct or should I be editing down?<p>ADDRESS 0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 00 83 07 00 0E 00 00 00 1C 00 00 00 00 00 00 00
00000010 38 00000.....
00000020 70
00000030 00
00000040 E0 00000000...
00000050 000000...
00000060 000000...
00000070 000000...
00000080 C1 00 00000..<p>
<hr></blockquote><p>Hi Paul,
If you look at the address/data table above you'll see that I filled in the data bytes on the correct places.
Each line contains 16 bytes (address x0 - xF) and the data you set is in one byte. All 8 outputs is in each byte!
Address 1=83, 2=07, 4=0e, 8=1C 10=38, 20=70, 40=E0 and finally 80=C1. This represents your 8 reed inputs and your 3 active outputs for each input. All other data bytes is 00.<p>(C1=11000001) Note that data bit 7 is the leftmost in this notation. :) <p>TOK ;) <p>[ October 24, 2005: Message edited by: Gorgon ]<p>[ October 24, 2005: Message edited by: Gorgon ]</p>
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Wait a minute...<p>Are you telling me I have to enter the code in hex. Hex I can read, write and everything else. Colleges accuse me of thinking in Hex and converting, which is why its takes me so long to come up with a response or figure things out.<p>But so I get this, I'm not changing the bit, but the byte (word) Value from 0 - 7 or 8-F and only that address, say 0, 1, 2 ,4, 8, 16, 32, 64<p>I'm going to put the hex code into that address only, I'm not going to change the entire word or byte, it will stay at FF?<p>-Please just confirm!!!
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Gorgon:<p>I get it, but is it in reverse. I would except C1 to be at address 01 and what about the last notation you worte? Note that data bit 7 is the leftmost in this notation.<p>Nevermind, like our copiers, its in reverse 7-0. I do get it now! I dont think I could have thought of this our my own thats for sure.<p>So you take the binary that you want to use, write it backwards and convert to hex. Then place the value in the proper address.<p>Now, one more question and I think I got it. Address 0 is pin A0 right?<p>I noticed you really want to use sw0 and I dont have one but maybe I should just to be tidy.<p>-thanks
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by paulsantangelo:
Gorgon:<p>I get it, but is it in reverse. I would except C1 to be at address 01 and what about the last notation you worte? Note that data bit 7 is the leftmost in this notation.<p>Nevermind, like our copiers, its in reverse 7-0. I do get it now! I dont think I could have thought of this our my own thats for sure.<p>So you take the binary that you want to use, write it backwards and convert to hex. Then place the value in the proper address.<p>Now, one more question and I think I got it. Address 0 is pin A0 right?<p>I noticed you really want to use sw0 and I dont have one but maybe I should just to be tidy.<p>-thanks<hr></blockquote><p>Hi Paul,
sw0 (addr00) is in fact no switches closed :) <p>TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

OK, Done<p>I got it programmed, I'll let you know how it works tonight!!
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Hey All:<p>I'm not going to be able to test the eprom tonight, the belt in my car went, had to have it towed, neves are shot, I'll do better tomorrow!<p>-sorry
-paul
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Hi Gorgon:<p>Yes, I believe I understand now, But for the record, is pin A0 connected to Byte 00? Just to go forward with that, now that I'm not at work and can concentrate on this.<p>A0 = Byte 0
A1 = Byte 1
A2 = Byte 2
A3 = Byte 4
A5 = Byte 8
A6 = Byte 16
A7 = Byte 32
A8 = Byte 64
A9 = Byte 128<p>Now if I was using an encoder that Philba was talking about , I could access other bytes, correct?<p>I suppose if pins A0, A1, A2 went high, does that mean byte 3 would be outputed?<p>I'm just trying to understand the addressing of an eprom. Ya know, when I was 16, I wrote a program to edit the sectors of a disk. I had a Commodore 64 and I could read it well. The editor looked exactly like that Hex editor for the programmer. I just didn't understand that I was using a HEX editor today and all the values needed to be in HEX (I dont know why, I can think). And I would have never figured out that the LSB starts on the right and MSB is on the left (7-0). I just forgot all that stuff. Funny, I use it today for work and I didnt associate the two together. Everyone I worked with has always wondered why when we set soft dips switchs on our copiers, that the notation is from right to left. Now we ALL know.<p>This was an incedible excerise, you probably don't know how much light you shed on me, woke me up, kind of. Made me remember some of those things I used to do.<p>You and Philba really are great people, staying with me through all of this. I still have more to learn but I dont want to drag you guys down.<p>So thanks for now and I'll let you know how I make out tomorrow!<p>-paul
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Help Please

Post by philba »

The address going into your eprom is just a number. If you write the address in binary, you will see that each of your pins cooresponds to a seperate bit in the address number. We often call this an address line. What gorgon came up with is to associate each switch with a seperate address line. Rather clever. it wastes eprom space but it wasn't going to be used for anything so it doesn't matter. of course, the eprom must be at least 256 bytes in size but that's no problem either.<p>So, if switchs 0, 1 and 2 (A0, A1 and A2) are high (1), that makes a 0000 0111 address or 7. so location 07 would be selected when those 3 address lines are high. If address lines a1, a2 and 3 are high, it would be 0000 1110 or 0E (14 decimal).
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Ok, I got it, It makes sense!<p>So thats why there are more A pins on my eprom, becaue I have a 512K, the extra pins allow you to access more addresses.<p>Would the encoder have worked also? I think it would, but its an extra piece of hardware that is not needed for my purposes.<p>Yes, Gorgon, he's one of a kind, good guy and so are you!!!<p>Thanks!
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Philba:<p>Why do you say in wastes space? Was it just becuase the code is not linear? I just want to be sure, not that it matters in this project, just for understanding!<p>-thanks!
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

Hi Paul, Philba,
Thanks for the good words, but I have used this kind of 'programmable logic' many times during the years. I remember the first time I used a cmos prom of 256 bytes from TI (gosh thats almost 25 years ago). I even had to make a programmer for it. This was a real prom where the term 'burning' was valid. You had to burn open the fuses inside. The yield was terrible, I think we got 18 working out of 25, but it worked and drew little power.
Using eproms is a walk in the park compared to that. (You don't need to bury your faults, just light them up)<p>So, remember this the next time you need 'glue logic' in a design, at least if you have loads of old eproms on the shelf. (I have ;) <p>TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

You should write an article for either nuts and volts or EPE. I mean you have the technical experience and the know how. "Glue Logic" Perfect name for it.<p>You know, I havent done hex editing like this since the 80's now it seems I need it and I've forgotten everything. Perhaps there more of us out there and need enlightenment!!
jimandy
Posts: 572
Joined: Sat Dec 04, 2004 1:01 am
Location: Birmingham AL USA
Contact:

Re: Logic Help Please

Post by jimandy »

Gorgon- <blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr> So, remember this the next time you need 'glue logic' in a design, at least if you have loads of old eproms on the shelf. <hr></blockquote><p>And a real challenge is to make a sequential logic circuit with an EPROM. I fiddled with this awhile back using a clocked 8 bit latch in between the output and selected inputs of the EPROM. Programming done in Excel to figure out what byte should give the next byte. Sort of a finite state machine gizmo.
"if it's not another it's one thing."
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Hey Guys:

I put the chip on my breadboard and wired it to turn on/off LEDs. I got very positive results. Mostly the LEDs turned on predicably with just one exception.

At Address A6 and A7, The LEDs did light as predicted but when I applied power to the chip, all the LEDs flashed on for a split second. A0-A5 showed no issue.

My test producedure was as follows:

All power is off
Place a high on the desired pin A0-A7 (only one)

Turn power on.

repeat procedure for next pin.

For A0 -A5 no flashes on LEDs, but A6 and A7 flashed.

A8-A15 are wired to V0.

/E is wired to V0, /G-VPP share the same pin, they were wired to V0 but I disconnected it to see what would happen.

Vcc is +6V
Vss is V0

The chip is SGS Thompson 27C512.

The LEDS are wired with a 1K resistor ALL negatives are bussed together. There are only two wires from the V+ and that is Vcc and the pin address I want high (A0-A7).

Any ideas?

Thanks
paul
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

Hi Paul,
If you have problems with unwanted glitches at poweron, use a capacitor/resistor on the OE- input. Capacitor between +vcc and OE-, and resistor from OE- to GND(0V). 0.1uF(or more) and 2k2 should give you a small delay to remove the glitches. This will disable the output during poweron. I suppose there is some sort of row/column matrix inside the chip that change between A5 and A6.

BTW, 6V is a bit on the high side, use a diode in series with the supply line to reduce the voltage.

TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 63 guests