Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] I want to connect 80 inputs to micro controller

Status
Not open for further replies.

thannara123

Advanced Member level 5
Advanced Member level 5
Joined
Jan 7, 2010
Messages
1,601
Helped
122
Reputation
244
Reaction score
116
Trophy points
1,353
Activity points
10,609
Hello I want to check 80 inputs from optocouplers . How can I multiplex input to microcontroler .which is the easy and cheapst way . is it better shift registers ?
can i get any examples . I prefer (8051 ,pic 16f877a, atmega series )
thank you
 

Analog or digital?
One-bit or multi-bit values?
How fast to sample all of them in the cycle?
Susan
 

The smallest in size and the most flexible solution is to use CPLD (for example Altera EPM 240) or some MaxV . This will bring you ultimate freedom do achieve any scanning speeds, also routing the board is easier. Altera development IDE (Quatrus II) is free, iyou need just to learn how to use it. In case you can't program on VHDL you can use the schematic editor and draw directly your schematic in Quartus.
 

i prefer to use four 16f877a with mikroe software. 1 master and 3 slave. each slave can be used to connect to 30 i/p s. master can be connected to slave using each software serial receiver and a slave enable connection. totally 6pin is used to connect to slaves. other extra pin in slaves can be connected to led for indication.
 

Damn! What are you talking about? He just need ten 74HC165 registers connected in serial or some PCFxxxx I2c port expanders if interrupt function needed. What a f***k? Four 877? )))) CPLD??? Don't drink so much!
 
yep, i missed the shift register and low cost point from the author's post.

@easyrider

dont be monger. know to reply politely.
 

Try this circuit.
 

Attachments

  • 40 ip.png
    40 ip.png
    50.2 KB · Views: 261
Hello everyone, in my opinion the best way to do that work is using some CPLD, the cheapest one with the required pin count. There are lots of examples in VHDL and Verilog. The option to use shift registers is also good, but must be taken in consideration the space needed in pcb to connect all of those chips (i.e. 10 x 74HC165 is equivalent to 160 pins and a lot of tracks in pcb). The best option can be use just one chip with 100 pins, i.e. the CPLD. The most convenient option is up to the designer.
 

Try this circuit.
Bad interpritation of my idea to use port expander. At least try to count to 80 and calculate desired pins. And never forget about pull-up resistors.

- - - Updated - - -

Hello everyone, in my opinion the best way to do that work is using some CPLD, the cheapest one with the required pin count. There are lots of examples in VHDL and Verilog. The option to use shift registers is also good, but must be taken in consideration the space needed in pcb to connect all of those chips (i.e. 10 x 74HC165 is equivalent to 160 pins and a lot of tracks in pcb). The best option can be use just one chip with 100 pins, i.e. the CPLD. The most convenient option is up to the designer.
Did you tried to compare power consuption? Again, PLD is a bad idea for many reasons.

- - - Updated - - -

again dont be monger. know to reply politely..
This is an other side of being clever.
 
His inputs are from opto couplers (Hence effectively diode junctions), so the obvious thought is actually connecting the things as a matrix (9*9 springs to mind), requiring just 18 IO lines.
Then either a port expander or shift register sort of arrangement, maybe a 16 bit port expander and two extra pins on the micro if available to keep the job down to 1 chip?

Other options, shift register and two '138s, whatever works.

Regards, Dan.
 

9x9 matrix is a good idea, but imagine 80 optocouples. Even if they will be quad - 20 pcs in 16 pin packages. It is a lot of PCB space. Sure, isolation barier will be needed. So we are talking about very large PCB. I think, shift registers will be optimal solution.
 

CD4021 is a parallel to serial IC. 10 of these can be put to sample 80 inputs.
 

How about using MAX7300 IO port expander which has 20/28 IO expansion capability or PCA9698/ PCA9505 IO port expander with 40 IO expansion ...
 
Last edited:

parallel to serial conversion ? is there any latches parallel to parallel ?
May i know about optocoupler package with an IC having more optocoupler in a single chip :thinker:

- - - Updated - - -

Hello Experts Actually I need to check whether the Inputs (from the 80 inpts) is high nd the coresponding data need to save and display..
 

Sorry for late i am again in this project .Not here lot of time sorry ..
 

When looking for specific logic functions, I would check manufacturers search engine, e.g. TI, NXP, Onsemi. You have HC573 octal latch or HC574 octal D-FF.

4 optocouplers in 16-pin DIL package is pretty standard like TLP281-4.
 
You can use 2 Cypress CY8C9540A port expanders. 40 bits each, I2C communication to reduce uP pin requirements, built-in pull-ups on input. I've used 4 of the 60 bit versions on a single board before. Actually pretty simple to use. NXP also has the PCA9505 which is also 40 bits.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top