Designed and publishedby: Vassilis Serasidis on 02 January 2012.

Programming language: AVR GNU

IDE: AvrStudio 4.18


Capturing frequency

Logic inputs voltage

Power supply

Liquid Crystal Display (LCD)

Capturing lengthsignals:

400 kHz

up to +5V DC.

Maximum 4.8V DC (4 x 1.2V recharchable batteries)

84x48 pixels

From 3.7ms for high speed signals, up to36s for low speed signals


This mini Logic analyzer is a tool for you to watch on LCD the logic transitions 0 or 1 of a digital data signal. A digital data signal can be found on the output pin of TSOP-1730 Infrared Receiver, on the Transmit and reveive pins of MAX-232 chip (RS-232), on Clock and Data pins of I2C data bus and many more electronic components. This circuit supports capturing forup to 100 kHz digital signals.

Schematic of the circuit.


The operating voltage of the circuit is 4.8V DC from 4x1.2V rechargeable batteries. Switch on the S1 to power on the electronic circuit. After the initial screens on LCD you will see a message that the AVR waits for a signal change on input pins. The AVR has 4 external pull-down resistors 33kÙ (R2-R5) avoiding any unnecessary trigger on any input pin because of an external electromagnetic field or by touching accidentally your hand on any input pin. The Nokia 3310/5110 LCD works from 3.3 - 5V power supply. The problem is that the LCD's backlight works with Maximum 3.3V DC. So I put diodes D1-D3 to decrease the voltage from 4.8V to 4.8-(0.7*3)=2.7V that is the required power supply of Nokia's LCD. When you power ON the circuit, the LED1 is turnedOFF. After the first trigger on any of 4 input pins, this LED is turnedON and the AVR starts capturing the data in to its internal RAM buffer (290 samples).


Do not useregular alcaline 1.5V batteries instead of rechargeable. The total voltage is 4 x 1.5 = 6V. This voltage will probably burn theLCD and theAVR microcontroller.

The software (firmware)

Picture 5: The data capturing process.

As you can see on Picture 5 the data buffer is constituted by 870 bytes (v1.00) 2 for the counter and one for the input pins information. In version 1.01 the data buffer was decreased to 256*3=768 bytes for increasing the capturing speed because the buffer size variable is 8 bit instead of 16 bit that I used before. The next byte calculations must be done according to the firmware versionyou use.

How it works? It is simple. After the power ON the AVR waits for a trigger pulse on any of 4 input pins. If a trigger pulse is detected the AVR starts counting the time is needed for the next trigger on any of the 4 input pins. The sample length is stored in a 16-bit variable named "counter". When this variable overflows, the status of the 4 input pins and the counter value are stored in the buffer and its address is increased by 3 (2 bytes for counter and 1 bytefor input pinsdata). This process is been made until the AVR fills all the buffer bytes (870/3 = 290 samples or triggers). When the AVR fills the buffer, all the data are appeared on LCD as a graph. You can move the graph to the left ( button S3) or to the right (button S4) to watch the entire data sequence. If the data sequence is in a low speed you can shrink the graph (zoom out) with a2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 or8192 ratio by pressing the S2 button.

Programming The ATmega8

Burn the ATmega8 with miniLogicAnalyzer.hex and select external crystal at the fuses section.

The fuses that must be set onATmega8 microcontroller.

PCB (55x65mm) and components placement.


04 February 2012 (v1.01)

I did a re-compilation ofthe source code with AVRstudio-5 (version 5.0.2123) and I saw a much better stability of the captured signals. So, I put the source code and hex filesforboth AVRstudio-4 and AVRstudio-5 in the same v1.01 zip file.

03 February 2012 (v1.01)

Capturing speed was increasedfrom 100kHz to 400kHz.

02 January2012 (v1.00)

Initial version by Vassilis Serasidis.

mini Logic Analyzer v1.00

v1.01 Download the source code andhex file of updatedmini Logic Analyzer.

v1.00 Download the source code, hex file, schematic diagram, PCB and photosof mini Logic Analyzer.

Created and published by Vassilis Serasidis on 02 January 2012