1. 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.
    Dismiss Notice

Counter circuit used to switch an encoder chip

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by 0RESET0, Sep 11, 2007.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi Len, Sean

    Just to be sure, have measured PC paraport pins on power up, ALL 12 output pins are High, about +4V.
     
  2. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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: Oct 17, 2007
  3. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia

    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
     

    Attached Files:

    Last edited: Oct 17, 2007
  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    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: Jul 7, 2008
  7. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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?
     
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi Sean,
    Do you have any experience on pcb track layout?
    I'll look around for a basic freebie.

    EDITED: Sean look here.

    http://www.freepcb.com/
     
    Last edited: Oct 20, 2007
  9. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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: Oct 20, 2007
  10. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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
     
  11. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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.
     

    Attached Files:

  12. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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: Feb 17, 2008
  13. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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: Feb 18, 2008
  14. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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: Feb 19, 2008
  15. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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.
     
  16. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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
     
  17. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    I found this site,
    http://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
     
  18. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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.
     
  19. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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.
     
  20. 0RESET0

    0RESET0 New Member

    Joined:
    Sep 11, 2007
    Messages:
    53
    Likes:
    0
    Location:
    Iowa
    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: Feb 22, 2008
  21. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    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 http://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 http://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.
     

    Attached Files:

    Last edited: Feb 24, 2008

Share This Page