ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

AN ELECTRONIC LITESHOW DISPLAY


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

AN ELECTRONIC LITESHOW DISPLAY

Lessons from the Trenches Part 2: Controlling the Lights with Software

by James Antonakos

Start ý Recap ý Software Initialization ý Building a Bit Pattern ý Outputting Data to the Display ý Scrolling the Display Pattern ý Handling Network Messages ý Other Uses ý Sources and PDF

SOFTWARE INITIALIZATION

After the LiteShow server is started up, the following things must be done:

  • read and process the KONFIG.DAT file
  • load canned messages from MSG.DAT
  • initialize and configure a network socket

The KONFIG.DAT file is used to configure the server application for the computer it is running on and the number of light panels used in the display. Although six panels are used in the display, as few as one may be used. The maximum number of panels has not been determined, but you must take into consideration how fast the bits can be clocked out of the printer port, the propagation delay of the 1488/1489 converters, and the animation requirements of the display message. The KONFIG.DAT file used for the six-panel display can be seen in Listing 1.

30

15610; The order is<speed factor><I/O delay><number of panels><slide rate>

Listing 1ýHere you can see the contents of the KONFIG.DAT configuration file, which is read by the server during initialization.

The <speed factor> is used to compensate for machines with different processor speeds. This value was initially used to compensate for different hardware platforms running the LiteShow server without having to recompile the application whenever the processor speed changed. The <I/O delay> value controls how much idle time is used after each change in the state of the data sent to the printer port. This is used to compensate for the slow propagation time of the 1488/1489 converters. The <number of panels> value is used to control how many bits of data are clocked out during an update of the display. And, the <slide rate> value controls how many new columns of data are scrolled into the display in 1 s.

The canned messages in the MSG.DAT file are plain text messages, one to a line, and limited to a maximum length of 132 characters per line. A maximum of 100 canned messages are allowed at a time.

The network initialization required by the LiteShow server entails starting up a Windows socket for the server, assigning various attributes to the socket, and making the socket non-blocking. The latter step is important because a blocking socket will force the server to wait for a network message to be received, preventing any scrolling on the display during the wait. The network initialization code can be seen in Listing 2.

After the socket has been initialized, the first canned message begins scrolling on the display.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ