Using a 74HC153 to multiply external interrupts..?

My current project requires me to read a ppm signal from 7 devices. The code I used to read the RPM of 1 fan uses an external interrupt. Since the ATMEGA 328 only has 2 external interrupts a friend of mine came up with the idea of using a MUX, specifically the 74HC153 to switch between devices. This would allow me to connect up to 8 devices on just 2 digital pins.

Multiplexers are completely new to me and I am just trying to wrap my head around how and if this will work. I am still waiting on the MUX to arrive from electronic goldmine so I can not breadboard it yet.

Yes this will allow you to direct your pulses into the interrupt pins but only two at a time can be directed like this. Which rather defeats the point of an interrupt in most cases but I think your application, periodic sampling of pulse rate, would suite this approach.

Thanks Mike! I should have the Muxs I ordered in tomorrow or Monday.

Is there a chance I could get a snippet of sample code so I can understand how to code this.

What is the nature of the signals that are generating your interrupts. The two 'external interrupts' on the 328 can be configured to select the desired signal level and edge. The rest of the I/O pins can also be configured to generate an interrupt whenever the logic level changes. They aren't nearly as flexible as the 'external interrupts' but perhaps detecting a logic level change is all you need.

Don

The project is a PC Water Cooling Information and Control center. It reads temperature from 3 temperature sensors (10k thermistor based) Then after Displaying the temperature of each sensor for 10 seconds it will change screens and display The RPM of the 3 PC fans, this screen will also last for 10 seconds. Then it will display the pump RPM and Water flow rate for 10 seconds. After that it will start the loop over. With 3 fans, 2 pumps and 2 water flow meters to pull data from I was under the impressions I would need an external interrupt to be able to poll the PPM signal from each fan individually. I am also able to control the speed of the fans and pumps via PWM and a 12v transistor circuit that is separated from the arduino via an opto coupler.

I was under the impressions I would need an external interrupt to be able to poll the PPM signal

An interrupt is used to deal with asynchronous events, events whose timing is not under your direct control. If you want to initiate something periodically, you generally use a polling technique. It looks like you want to use the latter.

Don

Can you post a sample of a polling technique that would work for this application?

Can you post a sample of a polling technique that would work for this application?

I could probably come up with one. I can make time to do that if you come here and mow the grass, paint the bedroom, clean out the garage....

Don