Simple implementation of a serial modem