The programmed Altera Board receives digital signals from our external sensor modules (see Module Functions) and decodes them for the output to the LCD. This means that the chip includes a LCD controller, a temperature signal decoder/encoder, a wind direction decoder/encoder and the wind speed determination/encoder module. All the individual modules have digital inputs from their respective hardware modules which are decoded and then encoded in ASCII which is then available for polling by LCD control module.
The Various Chip modules works as follows:
- The temperature hardware module serially outputs the temperature in BCD characters with a polarity bit. The temperature chip gives an inverted strobe signal. When the strobe signal is low (every 200 counts once the busy signal is low), the chip polls the digits in sequence. The signals being sent to the chips are the BCD values of the temperatures and its associated signal. The module then decodes these signals, as well as the polarity (+/-) bit to ASCII characters. The ASCII characters are sent to the LCD module.
- The wind speed hardware module outputs two pulses of indeterminate length. To make sure that the module is moving in the correct direction two sensors are used. These signals from the sensors are fed into the Altera Board. The Altera chip checks that the signals are being triggered in the right order and then signals another controller that a correct signal has been detected (debounce.vhd). There are two counters. The down counter will count down from a predetermined number to zero, while the incremental counter will count the number of pulses. Ten pulses are required to get one kph. When the downcounter reaches 0, the incremental counter value is latched to an output. This output is then sent to the LCD controller. The controller resets and then waits for the next correct sequence of inputs, before this cycle continues. Finally the chip decodes the binary number at the latch output into ASCII for the LCD to display.
- The wind direction hardware module outputs four signals which need to be decoded to provide the direction that the wind actually blowing. The wind direction module decodes these signals and outputs them as the ASCII representation of the wind directions for the LCD.
- The LCD module takes the signals from the modules which are encoded in 8-bit ASCII (chip level not hardware level) and outputs them to the LCD hardware serially one character at a time. By setting the appropriate entry mode set (as determined by the LCD data specs), the LCD display shifts right after every value that is output. The LCD controller sequentially outputs the text WS (Wind Speed), WD (Wind Direction), Temp (Temperature) along with the ASCII encoded value for these numbers from the modules. The LCD screen is written 1 character at a time, so the controller cycles through all of the possible spaces in ascending order and then outputs the correct character at the correct time. The module also has counters, which slows down the clock to less than 1 MHz. The LCD display can only properly operate if the speed is considerably slow. The LCD module also has an enable (e). The enable signal, which is an input to the hardware, enables the LCD display to display the correct values. This enable signal matched the data sheet specifications. This enable signal tells the LCD when to write the data coming into the LCD Display screen. The RS (register select) signal is either a 0 or 1, and is configured appropriately according to spec sheets. If RS =0, the LCD is executing internal operations, but if RS=1, letters are being written to the display. The RW signal is tied to 0, which means that the screen will always be in write mode.