Hi All-
I was hoping I could get some advice on some of the hardware aspects of embedded systems design. What I am doing should be very easy but I'm stuck on a couple of things. I have 23 tact switches that each turn a function on or off, and 24 status LEDs for the switches.
What I want to happen is when a switch is pressed, the micro turns a function on or off and the staus LED changes accordingly. Additionally the status is stored to memory so it will remember the last state on powerup.
The switch positions are spread out along a panel, so I'm using 8X 8bit I2C GPIO expanders near the switches/LEDs. I want to use AVR Micros.
My question is about external interrupts versus pin change interrupts. Which do I use? Does each GPIO need its own INT port or can I connect all of the interrupt outputs together (I can't tell if the interrupt outs send address data too)?
If the interrupt outputs can't be summed, the problem is 2 ext. INT ports are used for the 2 wire interface, so I can't use all 8 anyhow...unless I can configure the micro to read pin changes, where each pin, say A0-A7, correspond to a respective GPIO. If the GPIO sends a interrupt, then I can tell the micro to read that specific GPIO.
How is this sort of thing done?
Thank you in advance.
I was hoping I could get some advice on some of the hardware aspects of embedded systems design. What I am doing should be very easy but I'm stuck on a couple of things. I have 23 tact switches that each turn a function on or off, and 24 status LEDs for the switches.
What I want to happen is when a switch is pressed, the micro turns a function on or off and the staus LED changes accordingly. Additionally the status is stored to memory so it will remember the last state on powerup.
The switch positions are spread out along a panel, so I'm using 8X 8bit I2C GPIO expanders near the switches/LEDs. I want to use AVR Micros.
My question is about external interrupts versus pin change interrupts. Which do I use? Does each GPIO need its own INT port or can I connect all of the interrupt outputs together (I can't tell if the interrupt outs send address data too)?
If the interrupt outputs can't be summed, the problem is 2 ext. INT ports are used for the 2 wire interface, so I can't use all 8 anyhow...unless I can configure the micro to read pin changes, where each pin, say A0-A7, correspond to a respective GPIO. If the GPIO sends a interrupt, then I can tell the micro to read that specific GPIO.
How is this sort of thing done?
Thank you in advance.