Tcl/Tk
ZP Engineering has been using the Tcl scripting language extensively for hardware and system testing. The decision to use Tcl was driven by its extensibility, excellent community support and cross-platform availability. We are currently using Tcl/Tk for several internal activities:
- implementation and verification of serial protocols
- remote control over RS232/RS485
- implementation of SPI-based protocols (using a Tcl extension for ThePod)
- simple scripting on the VisualDSP environment that Analog Devices provides for DSP development (although in latest releases Tcl is being deprecated in favour of JavaScript/VBScript)
- hardware and FPGA validation through serial port or SPI
- production testing
Our usual deployment approach takes advantage of the excellent Freewrap by Dennis LaBelle; it allows us to redistribute a single-file executable.
Tcl extensions
ZP Engineering has developed LPTTCL, a parallel port extension for Windows that allows direct control of LPT signals directly from Tcl.
Version 1.0 has been released in 2001, and the updated 3.0 version in 2004; both versions have their advantages.
A complete reference and a description of differences between the two versions can be found here.
Download version 3.0 here; download version 1.0 here.
For further details:
- parallel port page on TclWiki (overview)
- lpttcl page on TclWiki (command reference)
Tcl links
The following list may be useful as a starting point for new users of Tcl.
- The current Tcl/Tk release is hosted on ActiveState web site
- A brief tutorial on Tcl syntax from ActiveState
- A Tcl primer from ActiveState
- A good reference book: Practical Programming in Tcl/Tk, by Brent Welch (more details here), 2003; 4th Edition ISBN: 0-13-038560-3. This best-selling book covers Tcl/Tk in detail, and includes chapters on C programming for Tcl, the Tcl Web Server, and the Tcl Web Browser plugin. It comes with a CD-ROM that has all the sources for the examples. The 4th edition covers Tcl/Tk 8.4.