Donnerstag, 31. Mai 2012

k7103-USB

Several years ago I wrote a GUI frontend for the Velleman k7103 PC Storage Oscilloscope.

K7103 picture          K7103 Frontend

The DSO is connected to the PC with a parallel printer cable. Most modern PCs don't have this interface any more. USB to Parallel converter cables don't work as interface because special control signals are used by k7103.

Therefore I developed a USB interface for k7103. k7103-USB is a dedicated interface with direct connection to the internal signals of the k7103. It offers all features of k7103 as available with the parallel printer cable. Additionally, an increased bandwidth for the data transfer of the sampling RAM to the PC is achieved. The K7103 frontend is extended with an appropriate driver for the new USB interface. It achieves approx. 70 acquisitions per second at my Core-i7 at 2.8GHz.

An additional PCB (100x76mm) is inserted into the k7103 case and connects to several digital chips of the k7103 PCB. k7103-USB mainly contains a Cypress AN2131Q EZ-USB 8051 microcontroller (MCU) and a Xilinx XC9572-PC84 CPLD.

Find more information on the GUI frontend and the k7103-USB hardware at http://k7103.sourceforge.net/.

Donnerstag, 17. Mai 2012

Colorful svn diff

How to get a colorful svn diff?

First install the program colordiff.

aptitude install colordiff

Now SVN must be told to use colordiff, so edit your ~/.subversion/config and add the line

diff-cmd = colordiff

in the [helpers] section (usually there is a commented template you can use). Now the output of

svn diff

will be a colorful representation of your changes.

However, this creates one problem when piped to less, because it shows the escape characters with caret notation. Therefore the command line parameter -R is used to display ANSI color escape sequences as colors. Set the environment variable LESS with this option.

export LESS="-R"

One more improvement: less wraps the lines at screen width which is often not desired. Therefore use the switch -s to get a line-by-line output. For a permanent setting, put

export LESS="-sR"

to ~/.bashrc or system wide to /etc/bash.bashrc.

One more tip: A recursive search in an SVN working copy with grep also reveals occurences in the internal "backup" files. Therefore the following alias excludes the .svn subdirectory (and backup files of your editor and compiled Python files).

alias rsgrep='rgrep --exclude-dir=.svn --exclude=*~ --exclude=*.pyc'