Dawn Simulator BASICAtom Software
The operating software was written in Atom Basic and compiled using the Basic ATOM IDE, a free download from the Basic Micro website. The operating software can be downloaded here, and is provided free for private, noncommercial use. Commercial use permitted only with my written permission (I really provide these things for hobbyists, not businesses, although I don't think I would have any particular problem granting permission--at least today).
The first action take by the program is to initiailize the DAC chip, then force the outut to zero volts (or as close as we can get with the lower 2 bits tied high) to keep the lamp extinguished. It wouldn't do to have the lamp come on in the middle of the night after a power failure.
Next, the program initializes the LCD display, then puts up a display of the program and version, followed by an intial version of the running display. Afterward, variables for the system state and initial light levels are set, and the command interface variables are intialized.
After initialization, the software operates on an event loop that runs twice a second. The event loop calls subroutines for the following actions:
- Detect and act upon the "Cancel/Override" switch.
- Detect and handle any commands waiting in the Hardware Serial Port input buffer. All light level changes are handled by this code. The command/response specification for the Command Interface may be downloaded here.
- Update the LCD display with the current system state. The display also shows the previous and most recent commands, the response to the most recent command, and a "spinner" that increments once for each pass through the event loop.
The LCD display of the Dawn Simulator device (taken from the front view picture on the hardware page) is shown below (it's rather hard to read because of reflections on the LCD bezel). The display tells us the following:
- The "Lvl:" entry on the first line tells us that the brightness level is zero, or that the lamp is currently off.
- The "Stat:" entry on the first line tells us that the system is in Cancel state, meaning that the Cancel/Override switch has been pressed. The system will remain in the state until rebooted or until the "Clear Cancel" command is received.
- The "PC:" entry on the second first line is the previous command seen by the Dawn Simulator devive. In this case, the entry "Butn" indicates that the previous action was a press of the Cancel/Override switch.
- The "LC:" entry on the second first line is the most recent command seen by the Dawn Simulator devive. In this case, the entry "@L00" was received. According to the Dawn Simulator Command/Response Specification, this was a command to set to brightness level to zero (lamp off). The # sign at the end of the entry indicates that the Dawn Simulator device sent a "Cancel Acknowledgement" for the command, indicating that the system is in Cancel state.
Copyright 2001-2009, Tim Sharpe. You are free to use this information for personal, non-commerical use without restriction. All rights reserved for commerical, organizational, or government use. Questions or comments to email@example.com. Flames to /dev/nul.
visits since July 14, 2008