Академический Документы
Профессиональный Документы
Культура Документы
PO BOX 110332
Lakewood Rch, FL. 34211
www.gabotronics.com
XScopes User’s Manual
Main Features:
This manual targets both novice and advanced users, providing a full resource for everyone. However, for a full
understanding of the operation of the XScopes, the user should be familiar with the operation of a regular oscilloscope.
The features documented in this manual are for units with firmware version 2.24+.
Conventions
Technical Detail
TABLE OF CONTENTS
1. General Overview.......................................................................................................................... 7
5. PC Interface .................................................................................................................................. 28
9. Firmware Updating....................................................................................................................... 37
1. General Overview
K1 K2 K3 K4 K1 K2 K3 K4
K1 K2 K3 K4
K3
Analog Inputs
Digital Inputs
Arbitrary Waveform
K2
ON
External Trigger USB Port /
K1
OFF
Device Charging
Curve Tracer Switch
Figure 7: Xprotolab Portable
Arbitrary Waveform
Digital Inputs
Analog Inputs
MENU /
Power button Input Coupling Switch
1.3 Specifications
Device size 1.615” x 1.01” 3.3” x 1.75” 1.83" x 3.13" x 0.7" 3.17” x 2.22” x 0.7”
Weight 8.6 grams 25 grams 60 grams 75 grams
Interfaces 4 Tactile Switches, USB (Micro USB connector), UART, PDI for debugging
Battery N/A Li-Ion 3.7V 600mAh Li-Ion 3.7V 750mAh
Active current1 40mA to 60mA 45mA to 75mA 40mA to 60mA 45mA to 75mA
Sleep current 3.6mA 1uA
Logic Inputs 8 Digital Inputs
Logic Input levels 3.3V only 3.3V, 5V tolerant
Logic Analyzer
Input Pull None, 24kΩ Pull Up, or 24kΩ Pull Down 820kΩ Pull Down
Max. Sampling rate 2Msps
Buffer Size 256
Frequency Counter 16MHz, 1Hz resolution, +/- 100ppm accuracy
Sniffer Protocols UART, I2C, SPI
Analog Inputs 2 Analog Inputs
Max. Sampling rate 2Msps
Oscilloscope
Notes: 1. The Active current varies depending on the number of pixels lit on the display.
1.4 Dimensions
1. The maximum voltage on the analog inputs has only been tested to these limits. The device may tolerate higher voltages, but it is not recommended for safety.
The device can enter factory options if the MENU key is pressed during power up. The following options are available:
1) Offset calibration: The unit is calibrated before being shipped, but calibration is required again if the firmware
is updated. During calibration, two graphs are shown that represent the calibration on each channel.
2) Shut off timeout: Sets the time to shut down the device after the last key has been pressed. On the non-
portable devices, it will only shut off the display and put the microcontroller to sleep.
3) Restore defaults: Select this function to restore to the default the settings. There are many settings on the
device, if you are not familiar with them, this function is useful to set the device to a known state.
- Take the device out of the packaging. There is a protective film on the display which can be removed.
- Power on the device. The non-portable devices can be powered with either the USB or with an external power
supply, by applying +5V on the corresponding pin. Double check your connections because the device WILL get
damaged if applying power on the wrong pin. The portable variants are powered with the MENU button.
- Connect the AWG pin to CH1. On the portable variants, you can flip the Curve switch instead.
- The tactile switches are named (from left to right) K1, K2, K3 and K4. The K4 is the Menu button.
- Press and hold the K1 key (auto setup). The screen should look like figure 16.
- Pressing K2 or K3 will change the sampling rate.
Additional examples
on how to use the device are
presented in chapter 8.
The K4 button is the MENU button, used to navigate thru all the menus. The K1 - K3 buttons action depend on the
current menu. The green arrows represent the flow when pressing the MENU button. When the MENU button is pressed
on the last menu, the device settings are saved and the menu goes back to the default. Figure 17 shows the main menus
in blue and some secondary menus in yellow. Further ramifications are shown on the respective chapters.
If confused while
navigating the menus, it is
easy to go back to the default
menu by pressing the MENU
button a few times.
A green arrow
represents the flow when
pressing the MENU button
Time Base Fast *8µ 16µ 32µ 64µ 128µ 256µ 500µ 1m 2m 5m 10m
( s / div ) Slow 20m 50m 0.1 0.2 0.5 1 2 5 10 20 50
Table 4: Time divisions *At 8µs/div, CH2 is not displayed.
- Fast Sampling (10ms/div or faster): All samples are acquired to fill the buffer, and then they are displayed on
the screen.
o Pre-trigger sampling (ability to show samples before the trigger) is available only with fast sampling.
o Only 128 samples are visible at a time, varying the horizontal position allows exploring the full buffer.
- Slow Sampling (20ms/div or slower): Single samples are acquired and simultaneously displayed on the display.
o The ROLL mode (waveform scrolls to the left during acquisition) is only available with the slow sampling.
o All 256 samples are visible on the display (each vertical line will have at least two samples)
When setting the XY mode, the graph can be moved vertically (Section 2.4.1.3).
Edge Trigger: The trigger occurs when the signal crosses the trigger level in a certain direction. The trigger level is
represented on the display as a rising ( ), falling ( ) or dual arrow ( ).
o Rising edge: The trigger occurs when the signal crosses the level from below to above.
o Falling Edge: The trigger occurs when the signal crosses the level from above to below.
o Dual Edge: The trigger occurs when the signal crosses the trigger level in any direction.
To select the Dual Edge mode, deselect Window, Edge, and Slope in the “Trigger Mode Menu”, the trigger
mark will change to a dual arrow:
Edge Trigger:
The signal crosses a level.
Window Trigger: The trigger occurs when the signal leaves a voltage range. This mode is useful for detecting
overvoltages or undervoltages. Two arrow trigger marks represent the window levels.
Window Trigger:
The signal is outside a range.
Slope Trigger: The trigger occurs when the difference between two consecutive samples is greater or lower than
a predefined value. This is useful for detecting spikes or for detecting high frequency signals. The trigger mark is
represented on the screen as two small lines, with a separation proportional to the trigger value.
Slope Trigger:
The difference of two points
in the signal is above a value.
Depending on the post trigger settings, different parts of a signal can be displayed. Consider the signal on figure 28:
Even though the buffer sample is relatively small, any section of the shown figure can be analyzed by varying the post
trigger value. Examples:
The actual post trigger value can vary between 0 and 32768 samples, so you can explore the signal after a very long
time after the trigger event has occurred, but with a high post trigger value, the refresh rate of the scope will be reduced.
Scope Settings:
The scope can also display
Channel Gain Time Base
the traces in XY mode, which is
described in section 2.4.1.3 Grid
Figure 33: Oscilloscope Mode
2.4.1.3 XY Mode
The XY mode changes the display from volts vs. time display to volts vs. volts. You can use XY mode to compare
frequency and phase relationships between two signals. XY mode can also be used with transducers to display strain
versus displacement, flow versus pressure, volts versus current, or voltage versus frequency. Lissajous figures can also be
plotted using the XY Mode. Component curves can also be plotted, see section 8.5.
When using the XY modes with a Slow Sampling rate, activating the
ROLL mode will display a continuous “beam”.
You can use the “Explore Wave” menu to move the graph vertically.
Figure 34: XY Mode
Frequency measurements on the analog channels are done using the FFT of the acquired data, so measured
frequencies have discrete steps. The frequency range is determined by the highest frequency of the analog channels. If
there is a high frequency on one channel and a low frequency on the other, the channel with the lowest frequency will
have low resolution. Frequency measurements with the FFT are best suited for analog signals. Frequency measurements
on the digital inputs are done counting the pulses on the pin over one second. The resolution of the measurement is 1Hz.
Frequency measurements with the Frequency counter are best suited for digital signals.
If only interested in one channel, turn off the other channel to maximize the vertical display.
Example:
Figure 37: Triangle Wave Figure 39: FFT without Log Figure 38: FFT with Log
Hann: ( ( ))
Blackman: ( )
Figure 40: Window and sine frequency response, from left to right: Rectangular, Hamming, Hann and Blackman
2.5 Cursors
You can measure waveform data using cursors. Cursors are horizontal and vertical markers that indicate X-axis values
(usually time) and Y-axis values (usually voltage) on a selected waveform source. The position of the cursors can be moved
on the respective menu. Figure 41 shows the cursor menus.
When the automatic cursors are enabled, the device will try to automatically make measurements on the waveform.
Vertical Cursors: The device will try find a full or half cycle of the selected waveform. If both CH1 and CH2 are
enabled, the channel with the most amplitude will be used.
Horizontal Cursor: The selected horizontal cursor will be set with the maximum and minimum points of the
waveform.
- No grid.
- Dots for each division: Vertical dots represent the scale divisions. Horizontal dots represent the time base
setting and the ground level of each channel.
- Vertical grid line follow trigger: Vertical dots represent the position of the trigger, the location of the vertical
dots follow the trigger position. Horizontal dots represent the time base setting and the ground level of each
channel.
- Dot graticule: The screen is filled with dots that represent the vertical and horizontal divisions.
In the UART and SPI sniffers, the data can be displayed in HEX or ASCII, press K2 and K3 simultaneously to toggle
between them. If using ASCII, only codes 0x20 thru 0x7A will show valid characters. Figure 51 shows the 3x6 font.
Normal mode: Continuous operation, when the buffer is filled, all pages are erased, the index goes back to page 1
Single mode: The sniffer will stop when the buffer is filled.
Circular mode: New data will be placed at the end of the last page, older data will be shifted towards the first
page. At the beginning, the device will show 0x00 an all pages, and the last page will be set. The circular mode is
useful if you are only interested in the most recent data received.
The XScope implements the I2C sniffing in a bit-bang fashion. The maximum tested clock frequency is 400kHz (Standard
I2C Fast Speed). As the data is decoded, the data in HEX will appear on the screen, accompanied by a symbol:
There are 16 pages of data, each page shows 64 bytes => the total memory for the I2C sniffer is 1024 bytes.
The XScope can decode both the TX and RX lines of the UART at the standard baud rates, and with selectable data bits:
5,6,7,8 Data bits / 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps
When the sniffer begins, the screen is split in two, the left side is used for the RX line,
and the right side is used for the TX line. Each side can show 40 bytes per page. With
16 pages, a total of 640 bytes can be stored for each decoded line.
The XScope can decode both the MOSI and MISO lines of an SPI bus. The Configuration Leading edge Trailing edge
SPI's MOSI pin decoding is done in hardware, so it can decode data at high CPOL CPHA Rising, sample Falling, setup
speed (up to 8MHz), but the SPI's MISO pin decoding is implemented in CPOL CPHA . Rising, setup Falling, sample
CPOL CPHA Falling, sample Rising, setup
software using bit-banging, the maximum clock is 439kHz. Decoding starts
CPOL CPHA . Falling, setup Rising, sample
when a falling edge on the SS pin is detected.
Table 7: SPI Configuration
The screen is split in two, the left side is used for the MOSI line, and the right
side is used for the MISO line. Each side can show 40 bytes per page. With 16
pages, a total of 640 bytes can be stored for each decoded line. Table 7 shows the SPI configuration.
When adjusting the parameters, the K1 button serves as a shortcut key, which sets predefined values .
When enabling the Sweep, the waveform will be updated only on a screen refresh. For a smooth sweep,
set the scope with a high speed sampling, or stop the oscilloscope.
Sine Wave Square Wave Triangle Wave Exponential Periodic Noise Custom Wave *
The XScope can output the following waveforms: Sine, Square, Triangle and Exponential. There is a “Periodic Noise”
option that fills the AWG buffer with random data, it is periodic because the same data is output over and over, but each
time the Noise wave is selected, new random data will be generated. There is also a custom waveform which is initially set
with an ECG wave, but can be changed with the PC XScope Interface.
The resolution of the waveform generator varies depending on the frequency range: the lower the frequency, the higher
the resolution. Note that the possible frequencies are discrete:
5. PC Interface
Data Bits: 8
Baud rate: 115200
Parity: None
Stop Bits: One
Handshaking: None
Table 9: Serial settings Figure 54: Xprotolab PC interface
6. Interface Protocol
The XScope can communicate to external devices thru the USB or the external port. Each interface can access the Xscope’s
main settings. Follow the protocols to make your own applications, or to make devices that attach to the XScope.
The settings for communicating with the serial port are shown in Table 9. If using the USB interface, you can use WinUSB
or LibUSB libraries. The USB device’s endpoints have a size of 64 bytes. The device uses BULK IN transfers on endpoint 1
for transferring data (770 bytes in SCOPE mode: CH1, CH2, CHD, FRAME and INDEX; 1289 bytes in SNIFFER mode), BULK
OUT transfers on endpoint 1 to write to the AWG RAM buffer (256 bytes), and CONTROL READ transfers on endpoint 0 for
changing and reading settings. The FRAME and INDEX are variables used to check the flow of the data. They are also
needed if you want to implement the ROLL mode.
The FRAME will increase whenever a full buffer has been acquired. For the fast sampling rates, this will occur all the time.
Ideally, when you read data, the FRAME will increment by 1 every time. If you see that the FRAME has incremented by
more than 1, then you are not reading data fast enough and missing frames of data. In the slow sampling rates, since you
can read faster than the acquisition, the FRAME will help you determine if you are reading from the same frame.
The INDEX is not used in the fast sampling rates. For the slow sampling rates, it indicates the current position in the buffer.
For example, if you set the Xprotolab at 1S/div, you will see on the display that the samples start filling the screen from left
to right. The index represents this position. So for the slow sampling rates, the FRAME and INDEX can help you determine
if you need to erase the screen, and you are able to show more data on the screen (similar to the Xprotolab screen).
All XScope’s settings are stored in 44 bytes, table 10 shows these variables, table 11 describes the bitfield variables.
Open HyperTerminal.
Enter a name for a new connection (example: scope).
Enter the COM port where the device is connected.
Select 115200 bits per second, 8 data bits, Parity None, 1 Stop bit, Flow control None. (See figure 55)
To use, make the script executable with “chmod +x capture.sh”. Then enter “./capture.sh” into a terminal followed by the
serial device for example “./capture.sh /dev/ttyUSB0”.
Then enter a name for the bmp image including the .bmp file extension.
8. XScope’s Examples
8.1 Resistor Voltage Divider
1) Build the circuit shown on figure 58.
2) Set the device to Meter mode
3) You should see similar voltages as
shown on figure 59. Figure 59: Meter mode
Figure 58: Resistor divider
Theory of operation: The circuit is a voltage divider, where Vin is 5V, and Vout is the voltage at CH2:
Theory of operation: Circuit theory shows that if the RC circuit is fed with a step input, the output will approach a DC value
exponentially; figure 62 shows the equation from which we can obtain RC when the half-life value is known.
Theory of operation: The diode will allow current to flow only during the positive half of the sine wave. The output voltage
is a little bit lower because of the voltage drop of the diode. When the AWG voltage is negative, the diode acts like an
open circuit and the capacitor discharges thru the resistor at an exponential rate.
Theory of operation: The transistor needs to be biased in its forward active region; this is what the offset in the AWG is for.
The output voltage will vary according to the BJT transfer curve: changes in the input make large changes in the output.
Theory of operation: The goal is to plot the component’s voltage, versus the component’s current. Using the integrated
waveform generator and a 1kΩ resistor, we can inject current into the component. The voltage is measured directly using
CH1. The current thru the component is the same as the current thru the resistor, the voltage on the resistor is
proportional to the current. The voltage on the resistor is equal to CH2-CH1. 1V on the scope will represent 1mA on the
component. Figure 69 and figure 70 show examples of V/I curves on components.
Figure 72 shows an RLC circuit, and figure 73 shows the frequency response. Figure 73: Frequency plot
This example shows the vertical scale with the LOG disabled.
9. Firmware Updating
This guide will show how to update the firmware on your AVR XMEGA based device. There are two updating methods; the
first method requires an external programmer. You can use either method depending on your needs.
A regular AVR programmer might not work, the programmer needs to be PDI capable. PDI is the new interface to
program XMEGA microcontrollers. Many old AVR programmers use ISP, which is not compatible with the XMEGA.
For the portable devices, you need to press K1 and also press the MENU button.
For the non-portable, you need to press K1 while connecting the device to the computer with the USB cable.
Once the XScope enters the bootloader, the red LED will be lit, and will blink with USB activity. The XScope will appear
as a new device on the host computer, the drivers required are found in the FLIP application folder.
13) After updating the firmware, the device will enter Figure 74: Flip application
the calibration function on the first power up (See
section 1.6).
Software Tools:
Integrated Development Environment: AVR Studio 4 or Atmel Studio 6
If using AVR Studio 4, the C compiler is a separate package, found in the WinAVR package.
4) Can I connect the XScope to the computer to control the oscilloscope and get the data?
Yes, you can use the XScope PC Interface. A UART to USB cable will be required for old hardware revisions 1.4 and 1.5.
5) Can I connect the XScope to the computer using the USB for firmware updates?
Yes. Only the old hardware revisions (1.4 and 1.5) need a PDI programmer for firmware updates.
7) What is the maximum frequency that I can measure with the XScope?
The analog bandwidth is set at 200kHz. However, you can still measure frequencies up to almost Nyquist/2, i.e. 1MHz. The
FFT analysis will be particularly useful when measuring high frequencies.
10) The source code says "evaluation version", can I get the full version?
The full source code is currently not open. The evaluation source code does not contain the MSO application, but the
source code provided can be used as a template for your own programs. The HEX file does contain the full version of the
oscilloscope, so you can always program back the original firmware.
11) I tried updating the firmware using the USB bootloader. It didn’t work and now the device does not start.
The bootloader should still be functional. Try resetting the computer and try the procedure again, step by step.
11. Troubleshooting
Is the XScope not working? Check out these tips:
5) When powering up, the splash screen stays for a very long time (more than 4 seconds)
The crystal is defective or the traces on the crystal are shorted.
If all fails and if the device is under warranty, you can send it back for repairs.
The XScope uses many resources and peripherals of the XMEGA microcontroller. Figure 75 shows the XScope’s
Architecture block diagram.
12.2 Schematics