Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reference:instrumentation:analog-discovery-studio:canvas-ic-demo [2019/04/16 23:28]
Boris Leonov
reference:instrumentation:analog-discovery-studio:canvas-ic-demo [2019/04/26 21:28] (current)
Boris Leonov
Line 6: Line 6:
  
 Depending on the application of the particular Canvas board being prepared, additional header pins may be needed for the power terminals at the top of the Canvas, as well as in the protoboard area. Two breadboards can also be attached using the sticky backing they come with. This demo uses header pins on the power terminals, and a single breadboard, as seen in Fig.2 below. Depending on the application of the particular Canvas board being prepared, additional header pins may be needed for the power terminals at the top of the Canvas, as well as in the protoboard area. Two breadboards can also be attached using the sticky backing they come with. This demo uses header pins on the power terminals, and a single breadboard, as seen in Fig.2 below.
-== Figure 2: Header pin placement options ​==   +== Figure 2: Canvas with header pins and a single breadboard ​==   
-{{:​reference:​instrumentation:​analog-discovery-studio:​board-whole.jpg}}+{{:​reference:​instrumentation:​analog-discovery-studio:​board-whole.jpg?800}} 
 + 
 +The ICs selected for this demo are a 10-bit digital-analog converter (DAC) and a 4.9V, 1% voltage reference. The product numbers are LTC1661CMS8#​TRPBF and ZRT050GC1TA,​ respectively. The DAC has an MSOP8 package, and the voltage reference has an SOP223 package. [[https://​www.mouser.com/​datasheet/​2/​609/​1661fb-1268166.pdf | LTC1661 datasheet]],​[[https://​www.mouser.com/​datasheet/​2/​115/​ZRT050-91453.pdf | ZRT050 datasheet]]. 
 + 
 +Once all the parts are soldered on, connections will need to be made. Since each IC may differ in its pinout, refer to the datasheet of the specific IC you purchased. The connections shown here will be for the ICs selected for this demo. See Fig.3 below for how these ICs were connected.  
 + 
 +== Figure 3: DAC and Voltage Reference wiring diagram== ​  
 +{{:​reference:​instrumentation:​analog-discovery-studio:​IC-diagram.jpg}} 
 + 
 +Connect the power supply and USB type-B cables into the Analog Discovery Studio, flip the power switch on, and open WaveForms. After selecting the device, open the Scope and Protocol windows. Set the offset of Channel 1 of the oscilloscope to -2.5V and the range to 500mV/div. This will display 0-5V, which is the approximate output range of the DAC. (Note that the voltage reference provides 4.9V, so the DAC will make 1023 steps between 0 and 4.9V in 4.79mV increments. If the variable power supply from the Analog Discovery Studio is used, the range can be modified to any value 0-5V in 10mV increments. However, the voltage reference can provide a more stable signal than the variable power supply.) 
 + 
 +To communicate with the DAC, use the protocol analyzer to initially test the system before writing scripts for whatever use cases arise. The exact communication method will depend on the IC manufacturer,​ DAC resolution, and the serial interface it's designed for. In the case of the LTC1661, it uses a 16-bit input word that consists of a 4-bit control code, a 10-bit voltage value code, and 2 don't care bits. It uses 3-wire SPI as its communication protocol.  
 + 
 +Since this DAC uses SPI, the protocol analyzer'​s "​SPI"​ (red 1 in Fig.4 below) tab will need to be selected. Set the "​Select"​ (2), "​Clock"​ (3), and "​DQ0"​ (4) (Data or "​D<​sub>​IN</​sub>"​ on the schematic above) DIO pins based on your configuration.  
 + 
 +== Figure 4: Protocol Analyzer Set Up==   
 +{{:​reference:​instrumentation:​analog-discovery-studio:​protocol-DAC.png}} 
 + 
 +Looking at the register loading sequence (Fig.5 below), we see that the chip select (!CS/LD) needs to go low when communicating with the DAC. This means that on the protocol analyzer, "​Active"​ will need to be set to "​Low"​. From the Fig.5 we can also tell that the most significant (left-most) bit gets transmitted first, so set "First bit" (5) to "​MSBit"​. "First word" (6) can be either, but if you want to send data in the order you read or write in English, set this to "​MSWord"​. Since the DAC doesn'​t need to communicate back to the Analog Discovery Studio, set the "​Mode"​ (7) to "​Write"​. Set "​Command bits" (8) to 4, and "Word bits" (9) to 12. These represent the 4-bit control code and the 10-bit voltage code plus the 2 don't care bits. To check that everything is working, set the "​Command (DQ0)" (10) code to b1111 and the "​Write(DQ0)"​ (11) code to b111111111111,​ press "​Run"​ on the oscilloscope,​ and press "​Execute"​ in the protocol analyzer. This should result in the output going to 4.9V. Again, these instructions are specific to the LTC1661, and other DACs will have other protocols. This guide should be used as a sample of how to interpret the operation instructions provided with a DAC. If a DAC doesn'​t have any control bits, leave the command line empty. 
 + 
 +== Figure 5: Register Loading Sequence== ​  
 +{{:​reference:​instrumentation:​analog-discovery-studio:​timing.png}}