Logic Help Please

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Help Please

Post by philba »

address 0 is the absense of any Address Lines (pins) being high (i.e. they are all low). There is no pin associated with address 0 in this scheme.
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Hi Gorgon:

It worked! Perfectly, All the LEDS lit in the order they were suppose to. Thanks and thanks to all that perovide some outstanding and great information.

I do have one more question. How did you know that Address 0x01 is Pin0? I think even Philba knew this. You see its very imporant that you write something, even if it just for us novices, we can really benefit from your experience!!!

I wish I could say or do something to show my appreciation but know that you have it!!!

Always Thanks
-paul
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Hi Philba:

If you forget about "this scheme", Byte 00, does it turn off the chip or is it like "No Output"? Does anyone use it, or is it just there?

Thanks again for ALL the valuble information. I really learned alot in this excerise!
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Help Please

Post by philba »

It's a valid memory location. I think you are letting the 0 overcomplicate this. In digital electronics, counting usually starts at 0 and goes up to N-1 where N is the number of items (and is usually a power of 2). The reason becomes apparent when you look at an address as set of bits. A 256 (2^8) byte memory will need 8 bits of address to select memory cells 0 (0000 0000) to 255 (1111 1111). If you numbered the cells 1 to 256 (1 0000 0000) you would need 9 address bits to access the last cell.
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Yeah:

I know, I just, well, remember I said it takes me a while. You might think of it an an initial byte. No address pins high, use this binary code output!

I did get it, a couple of hours later, but thanks for the explanation.

The circuit is working very well, it looks as if I had programmed it incorrectly, leaving FF from address 0x90 - 0xffff. I used the nice fill command to change the values to 00. That was a nice feature since there was not many in the HEX editor, but I was able to make a backup of the program also, and I'm happy about that.

I also made one modifcation to the circuit and that was to add the diode (1N4007). I knew 6 volts was a bit excessive, but setting up a voltage divider takes resistance ( and real estate) and I was a volt under the max, which is 7 volts. I think the voltage drop is about 1 volt, so its in a good range now.

I plan on installing a 5 volt voltage recifier, Currently, I use an LM3914 IC to drive LEDS which can draw up to 100ma. I supply the entire circuit with two 9 volt batteries in parallel, just to keep up with the IC as well as other componets on the board, so I will have to choose something that will handle 300ma from this configuration.

Thanks for ALL the help. I have to admit, I was thinking that I was nuts before posting, I thought no one could help me, but I took a chance and posted anyway. Glad there was a community out there that knows, I learned a lot!


-paul
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: Logic Help Please

Post by paulsantangelo »

Gorgon:

Is there a PIC that would do the same thing we did here with the eprom? The reason why I ask is that I will need two more chips on the board, and space is tight, it was tight enough with this eprom, now with two more, I'm not sure how they are going to fit on the board.

-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,
Any PIC or microcontroller with enough I/O pins can do this. If you want to do more I would assume that this could be incorporated in the chosen controller too.
What you need to do is to make a count of the number of I/O functions you need and then the timing involved. If you want to use a PIC controller and have much I/O, I would propose to use the SPI interface for both inputs and outputs.

You didn't tell the limiting size of the PCB and the technology you want to use. I would assume that you want to use through hole components, not SMD. I can be wrong? For each multiple of 8 I/O, you'll need one small logic circuit, normally 16pin, if you use SPI. For this you can use one of the smaller PIC controllers. For the SPI interface you'll need at least 4 or 6 pins on the PIC. 6 if you want to read inputs too.

These are: SDO(data out), SDI(data in), SCLK(clock), OEN(output enable), OSTR(output strobe), INEN(input latch enable)

Just for the record. You can simulate the SPI functionality in software, if you want to use a controller not equipped with this function.

Philba is the one to ask about PIC recommendations. The PIC is no favourite of mine, but I understand those who use it, due to the excellent support from Microchip.

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 »

Gorgon:

Maybe I asked for the wrong thing. By your response it looks as if the PICs require support chips and I'm trying to get away from adding more chips. My board is like a 4 X 6 inch. Currently my breadboard has 3260 connection points, and they are almost full.

I guess what I'm asking for is a 16 or 18 pin chip what can be programmed in the exact manner in which we were doing. Currently I'm looking at adding 2 more eproms so that I can have a 10-bit output.

-thanks
paul
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Help Please

Post by philba »

since my name was mentioned...

A PIC can be used by it self - no other components. an 18 pin PIC can be set up to provide 14-16 I/O pins. The issues for you is going to be programming since, I think, you've got no experience there. You'll need to get a simple programmer and one of the free compilers (or the assembler). It can be done fairly cheap but the learning curve can be somewhat steep if you have no experience with micrcontrollers and programming.

Good 18 pin pics are the 16F88 and 16F628A (or non-A). I'd recommend the 16F88 but that's for reasons that won't matter to you.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

Originally posted by paulsantangelo:
Gorgon:

Maybe I asked for the wrong thing. By your response it looks as if the PICs require support chips and I'm trying to get away from adding more chips. My board is like a 4 X 6 inch. Currently my breadboard has 3260 connection points, and they are almost full.

I guess what I'm asking for is a 16 or 18 pin chip what can be programmed in the exact manner in which we were doing. Currently I'm looking at adding 2 more eproms so that I can have a 10-bit output.

-thanks
paul
Hi Paul,
Sorry, if I confused you. From your question I drew the conclusion that you needed more I/O than the 16 pins you already use on the eprom. I assume that we are talking about the same project.
An 18pin PIC can maximum use 16 pin as I/O. So, the question is what number of I/O do you really need, if I read you correct you intend to use 18 I/O. Then you need a bigger PIC or a support chip to the small one :) . Remember that the PIC takes less space than the eprom you use today.

By the way, why do you need 2 eproms more? 2 in total should be enough(8in and 10(16)out)?
A 3k+ node breadboard is more than 4"x6", methink ;)

(If you need a review of your design, post it or send it by email.)

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 »

Hi there Guys:

Thanks for the feedback. I guess I'm looking for something small. I'll be using two regular rotating switches to turn the outputs on. One switch will be connected to 10 inputs, well thats not accurate. Its a ten pin rotary switch. This circuit we did not work on. The other switch is a 8 pin rotary switch, this circuit is complete. Well on paper anyway. The switch will be connected to 8 input pins.

Philba has a good point that I dont have the hardware, and I'm not sure I want to spend the money and time for only one project, (sorry) No insult intended. So I was thinking if a smaller eeprom could be used, I'm might find someone to program it for me. There are a number of good starter books out there, I was looking at B&N last week, its not that I'm not interested. It comes down to finances and my wife is starting to wonder.

Total pins for output needed are 18. Also for input is 18. If I can find one chip to do it, that would be great even if its a 40 pin chip, I think it would take less space than 3 eproms. I doubt there is a chip with that many I/O pins and 40 is the largest our programmer at work will take.

The circuit is ever changing. The circuit started with two PNP transistors and a relay. I had to add some resistance and capatiance to that part of the circuit to keep the relay from switching (thrashing) too quickly. Then I found out about SSRs and Logic chips, which brought me to this site. I have to say that the project over all has greatly improved but Its not getting done any faster, thats for sure.

The board I'm using is a strip board, I dont really want to do the chemical thing and the board is smaller than the breadboard I have, so space is at a premium.

Any comments you have would be great, As it looks right now, I'll be tying to eproms together to make the 10 bit outputs. Thanks to your teachings I have figured out the address work and the values.
jimandy
Posts: 572
Joined: Sat Dec 04, 2004 1:01 am
Location: Birmingham AL USA
Contact:

Re: Logic Help Please

Post by jimandy »

For me every project is a learning experience. It sounds like the same goes for your project.

You asked for comments – I have two.

1) You last post at one point said "Total pins for output needed are 18." then later you said "I'll be tying to [two] eproms together to make the 10 bit outputs"

So is it 10? or is it 18?

Clarity in writing is important in a technical discussion. You need to work on that.

2) I don't believe I ever really understood what the project is all about. Imagine trying to explain what you are trying to do to a ten year old (me), not in language, but in written words. I'm still curious and hope you'll give it another shot.

Meantime you are to be applauded for your patience and perseverance in making your project work. Also I appreciate your follow up in telling us where you are on your project, the problems you encountered, and your results in the suggestions you've been given.

Keep it up!
"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 there:

Technical support is my job. I sort of ask other to do the same. One tinme when I was new in my field someone found a solution to a big problem, he would not share that solution, ever since then I have kind of demanded that all solutions no matter how stupid be shared.

About the pins. Well, I need 2 chips tied together so I can get 10 bit output, I know that you could achive 16, but thats not what I'm after. We (the board members and myself) have already finished with the first eprom which has 8 bit output. I need another 10 bit output for another function.

The circuit itself has manifested into different parts but the end result (so far) has remained the same. The resulting project will be a cutoff switch based on wind speed and direction. The LM3914 drives LEDS that indicate wind speed and the reeds indicate wind direction. It more detailed then that but difficult to explain since the circuit contantly changes, and to add to the fact I'm kind of dislectic (yeah Whatever) I'm containtly reproven a circuit because I either got things backwards or just think I did. You can imagine when Gorgon was feeding me the binary bits I needed, getting it right, in the correct order was a killer. Not because of anything from Gorgon, it just was I thinking right or did I tell it backwards. It's not easy being me!

Anyway I bore you, hope I cleared it up for you!

One more thing about sharing, I realize and worried about the size of this thread, the guys at work look at long audit trails of support calls and get worried that "Its too long", but I say we need all that information detailed out so that if someone else gets the call, all the inof is there. The bad thing about this is that the managers dont understand this concept and actrually uses it agaist them when review time comes around.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Logic Help Please

Post by Gorgon »

Hi Paul,
You ask for eproms with 10 outputs. As far as I know there are none.

If I understand you correct you want an 'eprom' with 10 inputs and 10 outputs?
If you strecth the term eprom a bit I would think a PAL or GAL. This is programable logic, and you normally use a standard eprom programmer to program them. The one I was thinking about is one called 22v10. The number stand for 22 I/O, and 10 of them is programable input/outputs. The rest is only inputs. Using 2 of these you could replace your eproms. They are also small, 24 pin narrow DIL(.3"). And the best, if you make an error, you correct it and program again. They are based on eeprom technology.

If you want to continue the eprom trail, you could make your circuit with only 1 eprom more. Adding 2 8bit latches/registers and some logic, you could make the eprom more 'intelligent'. If you take one of the spare address lines and clock it you could clock 2 times 8 bit into the two registers and get 16 outputs from one eprom.
Depending on the clocking speed the outputs looks to change at the 'same' time.

Just some brain dust :D

TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Help Please

Post by philba »

This whole thread of 10 bit output makes me think the design has suffered from what I call "solution drift". An initial design has a problem, a solution begets another problem. The solution to that problem begets another and so on. At some point the project goes off-track.

I'd stand back and look at it with the question: "Is there an easier way". For example, can you reduce the need of 10 inputs? can the problem be restated to better use the resources available? Is there a better way to drive LED displays (hint - shift registers like the 74HC595 only require 3 outputs to drive as many outputs as you want when you use a microcontroller).

Phil
Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests