The ADALM1000 has 4 general purpose digital input/output pins which we can use as a serial port, as we saw in this last blog entry. We can use these pins to interface to the PMOD-DA1 4 channel DAC module sold through Digilent and other distributors such as Mouser.
It has a 6 pin male connector which plugs directly into the digital port on the ADALM1000. The PMOD-DA1 has two AD7303 8 bit dual voltage output DACs as shown in the block diagram.
PMOD-DA1 block diagram.
The 6 pin header on the module lines up with the pins on the ALM1000 digital connector and all four of the general purpose I/O pins are used as follows. PIO 0 connects to the SYNC input on both DACs. PIO 1 connects to the data input on the first AD7303. PIO 2 connects to the data input on the second AD7303 and PIO 3 connects to the SCLK serial clock input on both DACs.
There is no external access to the reference input voltage on the DACs so they must generally be configured to use VDD/2 as the reference. In this case VDD is wired to the 3.3 Volt supplied on the digital port connector. The voltage output range for all four output channels will be 0 to 3.3 V.
The AD7303 DACs are also available in 8 pin PDIP packages and could be used plugged into solder-less breadboards with other components of a circuit project.
A simple demo Python program, which is attached to this blog, has been written to show how to send data to the AD7303 DACs. The interface is simple and of course can be changed as needed and incorporated into a larger program. There are four entry slots, one for each DAC channel. Output voltage values from 0 to 3.3 can be entered and the program converts them to an 8 bit digital code and updates the DAC values when the send button is clicked.
Demo Python program
In conclusion we can plug the PMOD-DA1 module directly into the digital port on the ADALM1000 and use Python to control the output voltages. In future blogs we will see how to use the ALM1000 digital port to control even more devices that have serial inputs and outputs.
As always I welcome comments and suggestions from the user community out there.