You pretty much do it anyway...after all, surely an output pin is simply a 1-bit DAC and an input pin a 1 bit ADC? 'Digital' is purely theoretical .. once you go into the real world you deal with analogue voltages which represent digital information
5v= 1, 0v = 0...oh but what about RS232?
Some have said its a silly idea, but not necessary..
It's used in RF comms, and even wired comms to increase the throughput without increasing bandwidth (which in RF is very much at a premium). If you have 4 voltage levels, then that represents 2 bits....I mean our cable provider uses 64 QAM to pump data through (64 signalling levels). Of course its a trade off between 'bandwidth' and 'dynamic range'....higher quantisation increases the risks of errors.
Of course I didn't think you were actually going to use it over, say, SPI/USART/I2C, its theoretical. but interesting nonetheless. Hell, its a pretty good cheap form of very short range wireless comms...no line of sight like in IR, sounds goes through walls too...but yeah BIG hassle.
My two, possibly three, cents.
Blueteeth