More tikz-timing examples

This example shows how to make a timing diagrams with the tikz-timing package. The timing diagrams were taken from an external source and redrawn in TeX to demonstrate the necessary steps.

The external sources are:

Timing diagrams like these can be done using the tikztimingtable environment which has the same syntax as a tabular environment with two columns. The first column holds the signal name, the second one the timing characters. See the package manual for detailed information about them.


more-tikz-timing-examples

Edit and compile if you like:

% TikZ-Timing v0.7 2009/12/09 Example 8 & 9:
% Author: Martin Scharrer
%
% This is an example for the 'tikz-timing' package.
% It redraws the timing diagram taken from
% http://commons.wikimedia.org/wiki/File:SR_FF_timing_diagram.png
% http://en.wikipedia.org/wiki/File:SPI_timing_diagram.svg
%
\documentclass{article}
\usepackage{tikz-timing}[2009/12/09]
% Use tikz-timing library 'counters' to define a counter character.
% This character draws a 'D{}' and increases the counter
% value by one. A reset character which resets the counter value
% (by default to 1) is also defined.
\usetikztiminglibrary[new={char=Q,reset char=R}]{counters}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength{\PreviewBorder}{5mm}
\pagestyle{empty}
\begin{document}
%
% Defining foreground (fg) and background (bg) colors
\definecolor{bgblue}{rgb}{0.41961,0.80784,0.80784}%
\definecolor{bgred}{rgb}{1,0.61569,0.61569}%
\definecolor{fgblue}{rgb}{0,0,0.6}%
\definecolor{fgred}{rgb}{0.6,0,0}%
%
\begin{tikztimingtable}[
timing/slope=0, % no slope
timing/coldist=2pt, % column distance
xscale=2.05,yscale=1.1, % scale diagrams
semithick % set line width
]
\scriptsize clock & 7{C} \\
S & [fgblue] .75L h 2.25L H LLl \\
R & [fgblue] 1.8L .8H 2.2L 1.4H 0.8L \\
Q & L .8H 1.7L 1.5H LL \\
$\overline{\mbox{Q}}$ & H .8L 1.7H 1.5L HH \\
Q & [fgred] HLHHHLL \\
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Click to download: more-tikz-timing-examples.texmore-tikz-timing-examples.pdf
Open in Overleaf: more-tikz-timing-examples.tex