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 4
Joined
Jan 7, 2010
Messages
1,456
Helped
121
Reputation
242
Reaction score
111
Trophy points
1,353
Location
God's Own country India, India
Activity points
9,479
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
 

Aussie Susan

Advanced Member level 4
Joined
Jan 5, 2015
Messages
1,332
Helped
387
Reputation
774
Reaction score
396
Trophy points
83
Activity points
14,400
Analog or digital?
One-bit or multi-bit values?
How fast to sample all of them in the cycle?
Susan
 

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,911
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.
 

welove8051

Full Member level 6
Joined
Jul 16, 2009
Messages
357
Helped
51
Reputation
102
Reaction score
41
Trophy points
1,308
Location
india
Activity points
3,277
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.
 

Easyrider83

Advanced Member level 5
Joined
Oct 11, 2011
Messages
1,608
Helped
374
Reputation
748
Reaction score
362
Trophy points
1,363
Location
Tallinn, Estonia
Activity points
8,577
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!
 

welove8051

Full Member level 6
Joined
Jul 16, 2009
Messages
357
Helped
51
Reputation
102
Reaction score
41
Trophy points
1,308
Location
india
Activity points
3,277
yep, i missed the shift register and low cost point from the author's post.

@easyrider

dont be monger. know to reply politely.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
Try this circuit.
 

Attachments

  • 40 ip.png
    40 ip.png
    50.2 KB · Views: 87

Yosmany325

Member level 3
Joined
Oct 31, 2012
Messages
62
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
1,758
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.
 

Easyrider83

Advanced Member level 5
Joined
Oct 11, 2011
Messages
1,608
Helped
374
Reputation
748
Reaction score
362
Trophy points
1,363
Location
Tallinn, Estonia
Activity points
8,577
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.
 

Dan Mills

Advanced Member level 2
Joined
Nov 10, 2013
Messages
510
Helped
239
Reputation
478
Reaction score
229
Trophy points
43
Activity points
4,558
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.
 

Easyrider83

Advanced Member level 5
Joined
Oct 11, 2011
Messages
1,608
Helped
374
Reputation
748
Reaction score
362
Trophy points
1,363
Location
Tallinn, Estonia
Activity points
8,577
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.
 

ALERTLINKS

Advanced Member level 4
Joined
Dec 13, 2003
Messages
1,259
Helped
396
Reputation
786
Reaction score
380
Trophy points
1,363
Location
Pakistan
Activity points
7,263
CD4021 is a parallel to serial IC. 10 of these can be put to sample 80 inputs.
 

ravindragudi

Full Member level 3
Joined
Jan 20, 2010
Messages
172
Helped
51
Reputation
102
Reaction score
51
Trophy points
1,308
Activity points
2,334
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:

thannara123

Advanced Member level 4
Joined
Jan 7, 2010
Messages
1,456
Helped
121
Reputation
242
Reaction score
111
Trophy points
1,353
Location
God's Own country India, India
Activity points
9,479
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..
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
49,160
Helped
14,393
Reputation
29,050
Reaction score
13,144
Trophy points
1,393
Location
Bochum, Germany
Activity points
283,322
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.
 

spudboy488

Full Member level 5
Joined
Oct 10, 2012
Messages
272
Helped
69
Reputation
140
Reaction score
75
Trophy points
1,308
Activity points
3,058
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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top