Document Navigation
Table Of Contents
Index
Notes
Previous
Next


VFP Display User LED's & Dip-Switches

LED's

The user LED's are controlled by two addresses. The LED's are intended to function like actual red and green bi-state LED's', which have two light sources, one red, one green. The LED can be either red or green, and also will appear yellow if both light sources are on.

Ones written to $E00A turn on the red light sources, and ones written to $E00B turn on the green light sources. If ones are written to both addresses, the LED's appear yellow.

To use the LED's as red LED's, initially write a zero byte to $E00B and write your data to $E00A. To use the LED's as green LED's, initially write a zero byte to $E00A and write your data to $E00B. To use the LED's as yellow LED's, write your data to both addresses: $E00A and $E00B.

You can use each LED independently for on, off and color based on the bits written to the two control addresses.

Because the control bytes are memory (you can read them back) you can use AND and OR operations to individually control LED's with ease.

Dip-Switches

The dip switches appear in the 6809's memory space in DATB and DATA of VIA3, at $E050 and $E051.

Reading the DATB and DATA ports of VIA3 results in a byte which has one bit set or reset for each of the dip switches. The DATB port is the top set of 8 dip switches, and the DATA port is the bottom set. When a switch is up, the bit will be a one; if down, a zero.

You can preset the dip switches by storing a byte to the appropriate port with the bits set the way you want them.

There is a coding example called DSTEST.TXT and the command generated from it (DSTEST.CMD) on the release disks. The dip switches are very easy to deal with. The command example shows both presetting and reading.


Table Of Contents
Index
Notes
Previous
Next
Document Navigation