Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Counter circuit used to switch an encoder chip

Status
Not open for further replies.
hi Len, Sean

If Eric confirms the above, you will need three 74LS07 ICs.
Two for the counter output interface and one for the computer interface

Just to be sure, have measured PC paraport pins on power up, ALL 12 output pins are High, about +4V.
 
0RESET0 said:
Just for reference, I have taken a picture of the breadboard as it sits now.
It still has my old display. I moved some things around to get more room and it still works. right now only the ones digit is hooked up. I have hooked up each digit to it's respective decoder and they are all working correctly.

It looks like I will need to get another bread board to have room for the other three ICs that I need for the interfaces. If you make the multiplexer you will only need 7 resistors, so it may fit on the existing breadboard.
Alternatively, you could mount the displays and the 21 resistors on a piece of matrix board.

I will wait until Eric has reported in on the IC I need for the computer interface. I should have my new displays by then and have the circuit ready for the interface circuits.

Until next time...
Sean

P.S. I should have asked this before. Will I be able to run this circuit off of the same battery as the transmitter or should I plan on a separate power supply? You can use the same battery if you wish. But it would be more energy efficient if you used a 9 Volt battery for the ICs. If you use the 12 Volt battery, 7 Volts will be dropped across the Voltage Regulator and this wastes energy.

Whereas, if you use a 9 Volt battery, only 4 Volt is dropped across the regulator, hence almost 50% less energy is wasted.
Eric's reply indicates that you need non inverting buffers for the computer interface. So you need a total of three 74LS07 ICs, two for the counter interface and one for the computer i/f.
 
Last edited:
I think the multiplexer with the IC and additional required components would take up about the same amount of space as the 14 additional resistors needed to run with out the multiplexer. I have a couple extra matrix boards and I think I will put the displays and resistors on one of them as you suggested. The display will probably be mounted separately any way.

The displays should be here tomorrow so I will update the circuit and be ready for the transmitter interface.

Thanks
Sean
 
Here are the interface arrangements.

I suggest you draw up the whole circuit and post it so we have common drawing to refer to instead of my scribbles.

Do you have a data sheet for the 74LS07 and the other ICs?

If not, go to a site such as alldatasheets or just do a Google search.

The 74LS07 contains 6 non inverting buffers with open collector outputs.

So when an input is low, the corresponding output is low.

When an input is high, its output is open.

So the PT 2262 address lines will be either open (floating) or low.

Thus you will have 1000 combinations - 000 ~ 999 as determined by the counters.

If you want to monitor the counter settings - connect LEDs in series with suitable resistors (about 470 Ohm) to each of the Q outputs. Led on = floating, LED off = Low.

eg. If the counters were set to say 3 4 9 (0011 0100 1001 in BCD), the Tx code would be LLff LfLL fLLf
 

Attachments

  • Scan 5.png
    Scan 5.png
    93.4 KB · Views: 190
Last edited:
hi Sean,Len

For reference have added the paraport connections to Len's latest drawing.

Len,
Overdrawn some of the faint lines on your drawing.
 
Last edited:
Eric,
Am I missing something or did you not include a connection for a fire button?

Len,
I am having trouble getting my displays to work and I have not gotten the 74LS07s yet. I will try to get them next week.

Once I get the new ICs, I will be back to figure out this interface. I will try to make a complete schematic before I come back. Are there any easy to use programs out there that can do that kind of thing? Maybe even one that I could export and have a PCB made?
 
0RESET0 said:
Eric,
Am I missing something or did you not include a connection for a fire button?
I have connected all the pins on Len's circuit, there are still another 6 port pins available for 'other' functions, [ fire, etc]

Len,
I am having trouble getting my displays to work and I have not gotten the 74LS07s yet. I will try to get them next week.

Once I get the new ICs, I will be back to figure out this interface. I will try to make a complete schematic before I come back. Are there any easy to use programs out there that can do that kind of thing? Maybe even one that I could export and have a PCB made?

hi Sean,
Do you have any experience on pcb track layout?
I'll look around for a basic freebie.

EDITED: Sean look here.

https://www.freepcb.com/
 
Last edited:
0RESET0 said:
Eric,
Am I missing something or did you not include a connection for a fire button?

Pin 1 is the "fire button". A low on pin 1 turns Q1 on and thus turns the Tx on.

Len,
I am having trouble getting my displays to work and I have not gotten the 74LS07s yet. I will try to get them next week.

Once I get the new ICs, I will be back to figure out this interface. I will try to make a complete schematic before I come back. Are there any easy to use programs out there that can do that kind of thing? Maybe even one that I could export and have a PCB made?
Are you using the multiplexing circuit or the non mux one?

What type of display do you have? The 7447 ICs drive the cathodes, so the displays have to be common anode.

Finding faults in a circuit is done by a variety of means. For example, you check for dry joints, short circuits due to solder bridges or other reasons, incorrect wiring or part placement, faulty parts, etc. You can also measure the voltages at various points and check whether they are correct.

I draw my circuits using PowerPoint and save them as .gif or .png before posting. I scan the hand drawn ones to PowerPoint, edit if necessary and then save as .gif or .png.

I use "Sprint Layout" to draw PCB layouts. It was free, but not now.

I expect there are free ones available. Do a search of this forum for key words such as "PCB", "layout", etc. There have been several threads on this in the past.
 
Last edited:
Back for more

Alright, it has been a while but I am back to get this finished. I have the counter circuit complete and workingm minus the interface circuit. I have been reviewing everything and I think I have found something that Isn't going to work. The Interface circuit is taking the output from the counters. These countershave a BCD output. I need a true binary input for encoder, otherwise I will lose several combinations and my switching won't work the same on the Rx decoder. For instance. 12 from the counters would be 0001 0010 while 12 for the Rx is 1100. THe only way I see out of this is my original plan to have two counters with the same inputs so that I know that they count at the same time. So, I will still be using the interface circuit but the buffers will have to connect to the outputs of two 4 bit binary counters.

Len, Eric, Will it still work that same way?

Thanks
Sean
 
Sean,
I don't believe that you need to do it that way.

You have 12 bits (4 bits per counter) that are BCD coded - as you said.

Connect them to the PT 2262 as shown in the attachment (this was attached previously but I've attached it again for convenience).

Connect the display drivers to the counters as you have done.

Now, I know that the BCD sequence is not a pure binary sequence, but does that matter?

If you have LEDs connected to the 12 inputs to the PT 2262 (we can discuss how to do this later) then they will display the bits that are being input to the Tx and so you can set the Rx accordingly.

So the procedure would be:-
disable the Tx,
reset the counters,
advance the counters with the up button and set each Rx in turn.

For example, the first Rx would be set to 0000 0000 0001, the second to 0000 0000 0010, etc. The 12th would be set to 0000 0001 0010.

Since you have plenty of binary combinations to play with, then as far as I can see, a few gaps in the sequence does not matter since you only want a max of 999 combinations.

I'll be away for a few days, so I won't be able to respond until we return.
 

Attachments

  • Scan 5.png
    Scan 5.png
    93.4 KB · Views: 172
Len,
Thanks for the response, I am glad you are still here after all this time.

Having 999 from the counters to the Tx would be fine but I only have eight positions on the Rx and have purchased the 8 position DIP switches. If I use the 8 positions as two sets of four and then match what I get from BCD, I will only end up with 99 instead of 256.

To top all that off, I found a kit that has a 4 digit up-down counter. So, I will use this to replace what I have done so far. This kit has everything except the buttons. With this and a binary counter circuit using your debounce circuit, I will end up with everything that I wanted. I will have the 4 digit to display the decimal value of the coding and have the binary counter to set the coding. I will integrate the interface circuit into this new binary counter, only 8 bit for now, to connect the counter to the transmitter encoder chip. This way, the Tx and Rx will match. Then, down the road, I can add one more switch to the Tx and Rx to select the H/L option, since these lines are all connected I will just need a DPST switch, and have two sets of 256. I think 500 combinations will last me for some time.

Thanks again
Sean

EDIT: Just doing a little tinkering with the 8 bit counter that I originaly purchased. I ahve been reading the datasheet and it is a little more complicated to hook up. There are a few pins that I have to hold low for them to be active, like the output enable. I know you said that I shouldn't use this IC, I am just tinkering untill I can find something else to use.
 
Last edited:
Part number suggestion needed

I had a small epiphany last night while I was trying to sleep. The 8 bit counter that I bought is what they call tri-state. The encoder chip is also tri-state. Based on this, can I hook the counter to the encoder in a way that will net me all 6561 combinations?Does the tri-state on the counter mean that it has floating, Low and High as output states like the encoder has for the inputs?

The encoder that we have been working with has the 12 pins that we were originally trying to connect to the 12 outputs from three BCD counters. These 12 pins are normally used as 8 pins for encoding and 4 pins for data. All twelve pins are tri-state. That gives me the 6561 combinations from the encoding and 81 more from the data pins. That gives me 531441 total combinations.

Since I want my finished system to be expandable, I would like to use a tri-state counter to give me all the possible combinations. So, If the tri-state works as I have describes above, does anyone know a part number for an 12 bit up/down counter with tri-state outputs? Something similar to the 74F579 that I have but not as fast.
 
Last edited:
0RESET0 said:
I had a small epiphany last night while I was trying to sleep. The 8 bit counter that I bought is what they call tri-state. The encoder chip is also tri-state. Based on this, can I hook the counter to the encoder in a way that will net me all 6561 combinations?Does the tri-state on the counter mean that it has floating, Low and High as output states like the encoder has for the inputs? Yes & no, see below (I'm a poet and don't know it).

The encoder that we have been working with has the 12 pins that we were originally trying to connect to the 12 outputs from three BCD counters. These 12 pins are normally used as 8 pins for encoding and 4 pins for data. All twelve pins are tri-state. That gives me the 6561 combinations from the encoding and 81 more from the data pins. That gives me 531441 total combinations. I have not done the maths, but that sounds about right, ie. 12 ^ 3

Since I want my finished system to be expandable, I would like to use a tri-state counter to give me all the possible combinations. So, If the tri-state works as I have describes above, does anyone know a part number for an 12 bit up/down counter with tri-state outputs? Something similar to the 74F579 that I have but not as fast.
Sean,
You're misunderstanding the Tri State.

You're assuming that any output can be L, H or TS. Not true. When the outputs are set in TS, all outputs are in TS.

TS is used for "bus" connections. For example, several RAM memory chips could be connected to the same data bus. All are normally in TS, but when the CPU wants to address a particular chip, it disables the TS of that chip only so its outputs are connected to the bus so that data can be transferred to the CPU from that chip. I suggest you do an internet search for TS.
 
Last edited:
0RESET0 said:
Alright, it has been a while but I am back to get this finished. I have the counter circuit complete and working minus the interface circuit. I have been reviewing everything and I think I have found something that Isn't going to work. The Interface circuit is taking the output from the counters. These counters have a BCD output. I need a true binary input for encoder, otherwise I will lose several combinations and my switching won't work the same on the Rx decoder. For instance. 12 from the counters would be 0001 0010 while 12 for the Rx is 1100. THe only way I see out of this is my original plan to have two counters with the same inputs so that I know that they count at the same time. So, I will still be using the interface circuit but the buffers will have to connect to the outputs of two 4 bit binary counters.

Len, Eric, Will it still work that same way?

Thanks
Sean
Sean,
You could have 2 counters (ie. one BCD and the other binary) counting in unison, but there is a possibility that they may loose sync (due to a noise pulse or some other reason).

Given that you're setting off fireworks, it seems to me that this could be a safety issue, ie. you would fire the wrong one if the counters loose sync.

It would be better if you had a BCD counter with a BCD to binary converter.

Let me know if you want to persue this option and I'll post a suggestion.
 
Len,
is there something like a display driver that can take the binary out and run a 7-segment? I have three BCD to 7-seg now, is there a binary to 7-seg?

This would allow me to run only one counter and still have the decimal display to know what channel I am on.

If this is not an option, could you explain the BCD to binary conversion? Will it work the same as what I mentioned above except it would be a BCD counter and have the output going to the driver and the converter?

Thanks
Sean
 
ljcox said:
Sean,
You're misunderstanding the Tri State.

You're assuming that any output can be L, H or TS. Not true. When the outputs are set in TS, all outputs are in TS.

TS is used for "bus" connections. For example, several RAM memory chips could be connected to the same data bus. All are normally in TS, but when the CPU wants to address a particular chip, it disables the TS of that chip only so its outputs are connected to the bus so that data can be transferred to the CPU from that chip. I suggest you do an internet search for TS.

I found this site,
https://www.asic-world.com/digital/gates5.html
At teh bottom of the page, he explains TS. Is this correct? Right now I don't understand most of it. All I see is H, L and floating. Just like we have on my encoder chip.

Are you saying that TS outputs and TS inputs are not the same?

Thanks
 
0RESET0 said:
Len,
is there something like a display driver that can take the binary out and run a 7-segment? I have three BCD to 7-seg now, is there a binary to 7-seg?

This would allow me to run only one counter and still have the decimal display to know what channel I am on.

If this is not an option, could you explain the BCD to binary conversion? Will it work the same as what I mentioned above except it would be a BCD counter and have the output going to the driver and the converter?

Thanks
Sean
Yes, this would be the best option.

The display would be in hexadecimal rather than decimal, ie. 0 ~ F not 0 ~ 9.

I believe some display drivers provide hex.

I'll have a look at the data sheets that I have on hand and let you know.
 
0RESET0 said:
I found this site,
https://www.asic-world.com/digital/gates5.html
At teh bottom of the page, he explains TS. Is this correct? yes Right now I don't understand most of it. All I see is H, L and floating. Just like we have on my encoder chip.

Are you saying that TS outputs and TS inputs are not the same? Yes & no

Thanks
This is a good site for general info.

TS inputs and outputs would be compatible if the outputs could be controlled individually as in the TS NAND gate shown in the site.

But I have never seen a TS NAND gate.

The only TS I have seen are in ICs such as memories, buffers, etc.

In these cases, all of the outputs are set into TS when the appropriate signal (ie. H or L) is applied to the control line; in other words, there is only one TS control line rather than a control line for each output.
 
Question

OK,
I have gone over some things and I have a question. On a normal counter like the ones I am using, The active output state is high correct? What is the state of the outputs when they are not active? I thought I read in here that they are floating. If both of these assumptions are true the would not the same be true for a counter that has active outputs low? If all of these assumptions are true then would a counter chip with the capability of high or low outputs have three possible states, High, Low and Floating? Am I totally wrong on this or what? I think I may have confused the issue when I mentioned tri-state. As I see it, a tri-state has a different three states, High, Low and high impedance with the high impedance being applied to all output pins when it is active.

Are these definitions correct? -
Floating - having neither a high or low state but a voltage that falls below the high threshold and above the low threshold.
High impedance - not connected, the same as physically disconnecting.

Sean
 
Last edited:
0RESET0 said:
OK,
I have gone over some things and I have a question. On a normal counter like the ones I am using, The active output state is high correct? Yes but a counter with AL outputs would be unusual. What is the state of the outputs when they are not active? The attachment may help you.

I thought I read in here that they are floating. No If both of these assumptions are true the would not the same be true for a counter that has active outputs low? If all of these assumptions are true then would a counter chip with the capability of high or low outputs have three possible states, High, Low and Floating? No

Am I totally wrong on this or what? I think I may have confused the issue when I mentioned tri-state. As I see it, a tri-state has a different three states, High, Low and high impedance Yes with the high impedance being applied to all output pins when it is active. This is ambiguous. The Hi Z state is applied when the outputs are disabled. Tri State is used for bus connections, as I explained previously. It does not help you with your situation.
Are these definitions correct? -
Floating - having neither a high or low state but a voltage that falls below the high threshold and above the low threshold. Floating means open. You're right in the case of the PT2262 IC. when open, the voltage is between the upper & lower thresholds. The internal logic determines whether the input is F, H or L, ie. if the input voltage is > the upper threshold, then it is seen as a H, If it is < the lower threshold it is a L. If the input is open (or the voltage is between the upper and lower thresholds) it is F.

High impedance - not connected, the same as physically disconnecting. This is essentially correct. The internal circuitry is disconnected from the output pin. So the output pin would appear to be open if you measured it.

Sean
Sean,
I thought about your project while we were away (not much else to do at mother-in-law's).

After considering various options, I concluded that the configuration I suggested previously is the best, ie. 3 decade counters and decimal displays.

The advantages of this are:-
1. hexadecimal displays are not required.
2. you can have up to 1000 Rx (or 999 if you choose to exclude zero)
3. The Tx circuitry is simple - no BCD/Binary code conversion, etc.
4. It is easier to set the BCD codes (rather than binary codes) in the Rx.

Now I know your objection to this is that you want to use 8 bit switches in the Rx since you want to use all 256 combinations.

I accepted this point originally, but now I'm not so sure.

I assume that the Rx have 12 code setting inputs the same as the Tx. Is this correct?

If so, then to go beyond 256 combinations, you will have to add extra switches. So why not add them at the outset?

Thus the first 4 switches would set the Hundreds digit (in BCD), the next 4 the Tens digit and the last 4 the Units digit.

It is very easy to remember the BCD codes, but not as easy to remember the hex codes.

The DIL switches come in various sizes - 2 way, 4 way, & 8 way, so you could install either an 8 way and a 4 way, or three 4 ways. See https://www.altronics.com.au/index.asp?area=item&id=S3050 {This is an Australian supplier, but you should be able to buy then in the US also}

You can also buy DIL switches that mount vertically and they have 1/10 th inch spacing between pins. See https://www.altronics.com.au/index.asp?area=item&id=S3094

Let me know what you think and - assuming I have not missed something - I'll draw a circuit and post it.
 

Attachments

  • Gating.gif
    Gating.gif
    7.8 KB · Views: 165
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top