- Discrete LEDs
- Dot/Bar LEDs
- Matrix LEDs
- 7-Seg LEDs
- Serial -- Software
- Serial -- Hardware
- RS-232 via the MAX3232
- I2C -- EEPROM
- I2C -- DS1307 Real Time Clock
- 1-Wire -- DS18B20, Powered, Single-Drop
- 1-Wire -- DS18B20, Powered, Multi-Drop
- 1-Wire -- DS18B20, Parasitic, Multi-Drop
- TI Link Protocol -- Calculator Demo
- Infrared Communication
- MIDI -- Output Demo
- MIDI -- Input Demo
- MIDI to Analog Synth
Analog Switch -- Bipolar
Unlike the previous exercise, this analog switch can handle much larger bipolar signals. In the demo, I have it alternating between a sine, triangle and square wave, all of which are +/- 6V.
The secret is the DG442 chip. This is a quad SPST analog switch package. The one I used was fabricated by Maxim, but it apparently has also been picked up by Vishay. Here's a link for its data sheet:
That the chip can easily handle signals all the way up to +/- 15V is great. But even better is the logic switching only requires the usual 0V and 5V level (OFF and ON, respectively). This makes it an absolute dream to use with the PIC.
The PMP code is trivial. All it does is sequentially close one of the three switches, passing the present signal through to the mixer. For emphasis, only one switch is closed at a time so in effect the unit is acting like a SP3T switch. Incidentally, there is a fourth switch available, but I didn't need it for this example.
Click to get the source code.
Click to get the schematic PDF.
Next Project: Serial -- Software