RadioLocman.com Electronics ru
Advanced Search +
  

08-08-2011

Development Kit and Mixed Signal Oscilloscope on AVR ATXMEGA. Part 2 - User Interface, Software

Part 1. Schematic

The Xminilab and Xminilab-B are fully featured Mixed Signal Oscilloscopes (MSO) with Spectrum Analyzer and Arbitrary Waveform Generator (AWG).
The Xminilab's can also be used a development boards for the XMEGA AVR microcontroller.

Mixed Signal Oscilloscope Specifications

  • 1 Analog Inputs
  • Input Impedance: 1MΩ
  • Maximum Input Voltage: +/- 25V
  • (+/- 250V if using a 10:1 probe)
  • A/D Converter Resolution: 8 bits
  • Max Sample Rate: 16MS/s
  • 4 Digital Inputs: 3.3V level

Features:

Time Base (S/division):
1u
2u
5u
10u
20u
50u
100u
200u
500u
1m
2m
5m
10m
20m
50m
0.1
0.2
0.5
1
2
5
10
20
50
Gain (Volts / division):
20m
50m
0.1
0.2
0.5
1
2
5
  • Horizontal Cursors
  • Vertical Cursors
  • Automatic Average and Peak to Peak measurements
  • FFT and automatic search of fundamental frequency
  • Export to BMP through RS-232 using HyperTerminal
  • Analog trigger and external digital trigger
  • One time division consists of 16 pixels. Example: 5uS / division = 5uS / 16 pixels ==> 312.5nS / pixel
  • One gain division consists of 16 pixels
  • User Interface

The K6 button exits from the current menu. If the current menu is the default menu, the '*' Key exits the MSO application. The K7 button cycles thru 2 main menus, K1 thru K5 buttons select the menu item.

 
K1
K2
K3
K4
K5
Encoder 1
Encoder 2
default
Run / Stop
       
Horizontal
Position
Sampling
Rate
Channel 1 Menu
Channel on/off
Invert Channel
Probe X1/X10
Average
Samples
 
CH1 position
CH1 gain
Digital Input
Digital on/off
Invert Channel
Thick Low
Serial Hex
Display
Parallel Hex
Display
Digital Position
Digital Size
Trigger Type
Force Trigger
Free
Normal
Single
Auto
Trigger Delay
Trigger
Timeout
Cursor Menu
Reference
Waveforms
Lock Auto Set
Vertical
Cursors 
CH1
Horizontal
Cursors 
 
Cursor 1
Cursor 2
Spectrum Analyzer
Apply Logarithm
Hamming Window
Hann
Window
Cosine
Window
Triangle
Window
Horizontal
Position
Sampling Rate
Trigger Source
CH1
 
DAC
PB0
PB1
 
Trigger Level
Display Menu
Persistent Mode
Line / Dot
Show
Gain/Rate settings
Change
Grid type
Backlight on/off
   
AWG Control
Sine
Square
Triangle
Exponential
Toggle Encoder
Frequency / offset
Amplitude / Duty Cycle

Detailed Function Description
Default Menu
K1: Run / Stop: Starts or stops the data acquisition

Channel 1

K1: CH1ON
K2: INVERT
K3: X10
K4: AVRG
K5
Toggles channel 1
on and off
Inverts the channel
Toggles between
X1 probe or X10 probe
Toggles between
averaging on and off
 

Digital Input

K1: CHDON
K2: INVERT
K3: THCK0
K4: HEXS
K5: HEXP
Toggles logic
on and off
Inverts the logic
Thick or thin line
when the input is low
Shows the
serial decoding
Shows the
parallel decoding

Serial Hex Display: Shows the hexadecimal value of the stream of bits on each channel. The decoding starts at the first vertical cursor and ends at the second vertical cursor, 8 bits are decoded.

Parallel Hex Display: Shows the hexadecimal value of the 4 bit digital input lines.

Trigger Type

  • K1: Force Trigger: Pressing the K1 button will force a trigger.
  • K2: Free: The MSO trigger is free running, a new trace will be drawn when the last one ends.
  • K3: Normal: Trace when a trigger occurs
  • K4: Single: Trace once when a trigger occurs
  • K5: Auto: Trace when a trigger occurs, or when the trigger timeout is reached.

Cursors

  • K1: Reference Waveforms: A snapshot is taken of the analog waveforms to be used as reference waveforms.
  • K2: Lock Auto Set: The cursors are automatically set continuously in MSO and FFT modes
  • K3: Vertical Cursors: Toggles vertical cursors on and off.
  • K4: CH1 Horizontal Cursors: Toggles CH1 horizontal cursors on and off.
  • K5: CH2 Horizontal Cursors: Toggles CH2 horizontal cursors on and off.

Spectrum Analyzer

  • K1: Apply Logarithm: Apply Logarithm to the FFT
  • K2: Hamming Window: A Hamming window is used on the FFT.
  • K3: Hann Window: A Hann window is used on the FFT.
  • K4: Cosine Window: A Cosine window is used on the FFT.
  • K5: Triangle Window: A Triangle window is used on the FFT.

Trigger Source

  • K1: CH1: Select CH1 as the trigger source.
  • K2:
  • K3: DAC: Select the internal DAC as the trigger source.
  • K4: PB0: Select Digital Input PB0 as the trigger source.
  • K5: PB1: Select Digital Input PB1 as the trigger source.

Display Options

K1: PRSTENT
K2: LINE
K3: SHOW
K4: GRID
K5: BKLITE
Sets persistent
mode
Selects line or
dot display
Display gain and
sampling rate
Selects the
grid type
Toggles the backlight
on and off

TIPS:
Persistent Mode: The persistent display is useful as a simple data logger or to catch glitches in the waveform.
The persistent mode can also be used to maK5 frequency plots by varying the frequency of the input signal.

Dot dispay: The dot display is useful at slow sampling rates or when used in combination with the persistent mode.

Menu : AWG Control

  • K1: Sine: Selects a sine wave for the AWG.
  • K2: Square: Selects a square wave for the AWG.
  • K3: Triangle: Selects a triangle wave for the AWG.
  • K4: Exponential: Selects an exponential wave for the AWG.
  • K5: Change Encoders:Toggles Encoders control from ( Frequency / Amplitude ) or ( Offset / Duty Cycle ).


Arbitrary Waveform Generator

The Xminilab can output the standard waveforms of a function generator and can adjust the frequency, amplitude, offset and duty cycle of the selected waveform.

The waveform is stored in a 256 byte long buffer, this buffer is fed to the XMEGA's DAC thru the DMA. Once the waveform is set, the waveform will be generated without any CPU intervention. The maximum conversion rate of the DAC is 1MSPS, this limits the maximum output frequency of the AWG as a system.For example, if the AWG is generating a sinewave with 256 points, the maximum frequency is 3906.25Hz. If generating a sinewave with only 32 points, the maximum frequency is 31.25KHz. The AWG amplifier has a cut off frequency of 66KHz.

The predefined waveforms of the AWG are:

синусоида
Прямоугольные импульсы
Треугольные импульсы
Экспоненциальный сигнал
Шум
Sine Wave
Square Wave
Triangle Wave
Exponential Wave
Random points

By modifying the source code, any kind of waveform can be generated on the AWG.

Downloads

Source code – download
HEX-file - download
BOM- download

Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus