Electronics -- USB Live Oscilloscope: Digital Input Board
Digital Input Board Circuit
The digital input board has 8 distinct digital inputs available on JP1. There are separate pull-down resistors (RN1, choose a value you like, e.g. 1MOhm) and then each input has a Schmitt-trigger. Since these may be destroyed by improper input voltages, I chose to use HC14 devices in DIL-14 packages and mount them on sockets to be easily replaceable. Furthermore, one can switch from CMOS to TTL levels by plugging in a HCT14 instead or even have mixed inputs since there are two Schmitt-trigger IC's, each one handling 4 inputs.
The inputs operate on 5V or 3.3V levels; for the latter, there is an on-board LDO (IC5) which generates the 3.3V from 5V. This is not strictly necessary since we already have 3.3V on the mainboard (available on the AD_DUMMY connector, actually...), so you may choose to go for a simpler design. Note that when configuring for 3.3V inputs, the digital bus voltage at pin 1 on ADCV_DATA must be 3.3V, otherwise 5V are supported as well (although we exclusively use 3.3V for the USB Live Oscilloscope).
The buffering latch IC1 makes sure that we "sample-and-hold" the digital level exactly when the sampling clock arrives (rising edge).