I'm trying to find the best way to get five more digital I/O pins back in a particular design I'm working on (the
kit form of the Keyglove, actually), since I've run out of pins and I really need those back. I'm using the AT90USB1287 MCU, and everything is pretty much maxed out. I have a number of I2C devices on the bus though, so if I can find an I2C-based solution, that would be ideal.
The five pins in question are currently being used for the following tasks:
1. Red component of RGB LED (active high)
2. Green component of RGB LED (active high)
3. Blue component of RGB LED (active high)
4. Vibration motor on/off control (active low)
5. Piezo buzzer frequency control (either off or some pitch creating by the Arduino tone() function)
I need to move all of these to some external chip. I know there are plenty of I2C I/O expanders out there that would have no trouble at all with tasks 1-4 above. However, I'm not sure if there is anything out there that can do 1-4
and take care of the a tone()-like solution to control the pitch of piezo buzzer.
Does anyone know if such a device exists? I'm looking for something that is a very small 8 to 16-pin QFN or SSOP that is not more than ~$2. Would it be possible (or necessary) to use an ATTiny MCU for this task--something that is built to use to I/O pins for bit-banged I2C device emulation and VERY simple communication protocol, then 4 digital I/O pins for RGB/vibe control and one along with the 16-bit timer for tone()-like pitch control. Maybe an ATTiny24?