Control Panel Notes

From SlugWiki
Revision as of 03:54, 2 April 2006 by Wrchan (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The 8 devices share a single 8 bit IO port on a PIC microcontroller. The device is selected by a 3 bit wide select line. The devices we speak of here are only for clairity's sake. In the actual control panel, some of the logical devices (such as the seven segment display) have more than 8 bits of IO and some (such a button or LED) have fewer. Another way of thinking about it: there are 64 "virtual" IO lines that are compressed down to 11 (8+3) then reexpanded. A device may use any configuration of IO lines in the 8x8 grid. They are used for the following:

  • 5 digit 7 segment LED display
  • 3 digit BCD thumbwheel
  • 5 playlist buttons (including Push it to the Limit)
  • 2 toggle switches for arming
  • 7 LEDs: 2 for arming, 5 for playlists
  • 2 IO and 1 input for future expansion

The software is based around the IOBuffer which maps the 64 virtual IO lines to an 8x8 chunk of memory. The timer and interrupt make sure that the buffer remains up to date without the user needing to add code to the main loop or manipulate the IO ports directly.