So far in this series we have used the PC only with digital signals: switching, monitoring and counting. Now we turn to the analogue domain: our programs will understand not just ‘yes’ and ‘no’, but ‘larger’ and ‘smaller’.If a voltage is applied to a serial port input, it will be read as either a logic Low (0) or a logic High (1). The PC cannot determine the actual voltage present. Likewise, if a resistor is connected between an output that has been set high and an input, there are only two possible results: either the resistor is sufficiently small that a clear logic one is read at the input, or it is not. If more precision is required, a new approach is needed.
Discussion (0 comments)