Calendar-Alarm Project Report


Prototype Testing

Hardware setup

The prototype system consisted of an Altera UP1 board, a keypad, a 16x2 character Sharp LCD, and associated wiring and resistors.

 

We attached the keypad and LCD to the chip via FLEX Expansion Bus A.

 

The global clock was connected to the 25.175MHz oscillator, and the global reset was co nnected to FLEX push-button B.

 

The alarm LED was mapped to FLEX digit 2, segment "a".

We also mapped the three horizontal segments of FLEX digit 1 to the controller state so that we would be able to easily determine what state the system was in.

Testing

We te design modifications

Physical operation

Our initial keypad design did not work because the voltage level s from the keypad were too small in the case of active high signals, and they were too high for active low signals. Voltage division across the pull-up resistors and the keypad inter nal resistance was to blame for the bad signals.

 

We had to modify the keypad design such that keypad entity "scans" each column , one at a time, to detect a low signal. The row in which the key is pressed will give out a low signal when the entity "scans" that particular columns, else a high signal will be detected.

Reset handling

After consulting with Edgar Wong from the Advanced Entry System group, we concluded that the LCD was being incorrectly reset, so we modified our reset instruction sequence, and found that with the new sequence, the LCD reset correctly, and could show characters on the screen.

Handshaking with Control

Unfortunately, after correctly resetting the LCD, we found that the characters being sent to the screen were incomplete and in seemingly random order. This problem was interpreted to be a symptom of improper handshaking between the Control entity and the LCD driver entity.

 

We totally reworked the handshaking mechanism by introducing a state machine to observe the LCD driver's LCDready signal. The addition of intensive handshaking code.

 

Resource-motivated modifications

The changes that we had to make to the design resulted in greater logic cell usage and a marked increase in the usage of logic cell interconnects. We had to replace the Gregorian calendar in Control with the less resource-demanding Julian calendar, and we also had to removed the input-count error-checking feature in the counters.