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.

[General] Need a logic to interface no of inputs to microcontroller

Status
Not open for further replies.

girish09

Junior Member level 2
Joined
Jul 21, 2012
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pune
Activity points
1,450
Hi,
I have developed my project using 89s52, in which I am accepting input on the no of GPIO's available on micro controller and and in uC I just checked which input (Sensor) is activated so I just send message on the UART. e.g. if Sensor number 3 is activated then corresponding GPIO pin will become high so in programming I am just polling for high status and if found true then send message on UART that "Input 3 is activated" and do this polling for all 28 inputs and if it becomes high I will display that input/sensor number on UART.
It is successful but now I want to process 500 inputs so how can i achieve it? How can we process these lot of inputs? Please suggest, I am curious to learn and implement this logic.
 

Hi,

Maybe one method is to use a multiplexer/encoder and a demultiplexer/decoder.
 

Dear d123 and genex, Thanks for your reply using mux how many inputs i can process ? how many mux i need? I never used mux so I am not aware about max no of inputs MUX IC available. And Can you suggest any i/o expander for this ?
 

Hi,

Just looked and only found a 4 in : 16 out decoder (NXP 74HC4514D, "Decoder, Demultiplexer"); multiplexers didn't seem to match 16 : 4, but maybe they exist.

**broken link removed**

Another device - and I couldn't tell you how to use it, is SN74CBT16233 16-BIT 1-OF-2 FET MULTIPLEXER/DEMULTIPLEXER

**broken link removed**

These are just examples, I'm not a mux expert at all, and as you need to do 500 inputs, perhaps this mux/demux direction is not an appropriate solution as you could need a lot of ICs for 500 signals; therefore you may want to look into a programmable solution using a PIC or similar, or anything where multiple signals can be sent at high speed.

From the very little I know - and that's not much, perhaps I2C or SDA or USART would be a more appropriate avenue to go down and research. Maybe you need a bus line with each signal located at an "address": 0xFF and all that, or more like a 12 bit address (I think) more than an analog solution for this. You may find that easy as you already use UART.
 

I think you need to go the serial route, just use some registers ... you'll need to bitbang your serial inputs and send the actual data...

anyway, I suggest you to make this only for about 100 inputs only (let's say 128 inputs that's 16 8bit registers!!!!

so make that circuit 4 times but change from RS232 to RS485, so you can connect in 'parallel' but you'll need to implement some kind of addresssing like "C1 INPUT 32" and make sure that only circuit 1 responds with it's 32nd input state...

why only 128? I suggest you to continuously read the inputs and fill the IRAM memory (from 0x80 to 0xFF via indirect address) and send the data only when the master ask for it... if you try to do this with only one MCU you would need 63 serial shift registers, and to be honest that's a lot of TTL to handle, and could produce errors...

another way is to go the FPGA / CPLD way where there's a lot of pins but still not as much as 500...

divide and conquer!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top