Appendix B

Hardware Description

From the ECE 481 Project by

Derek Creech &

Ryan Wigley

Fall 1995

1: Microcontroller

2: LCD

3: Keypad

4: Bill Verifier

5: Status LED

6: Power Supply

7: Wiring Harness

8: Parts Listing

1 Microcontroller

A Motorola 68HC11EVBU board with a M68HC11E9 microcontroller and onboard ROM monitor was used as the base for the PAWS system. The microcontroller provides an efficient means of controlling the varied input and output devices used by this project. Additionally, the HC11 device can be easily reprogrammed, which is extremely helpful when doing development work.

1.1 I/O Ports

The HC11 family provides a total of five I/O ports totalling 40 pins. The direction of the I/O pins and their shared function are as follows:

Port I/O Pins Shared With

A 3 input, 4 output, 1 configurable input or output main timer, pulse accumulator

B 8 output

C 8 configurable input or output

D 6 configurable input or output serial interfaces

E 8 input A/D converter

For the PAWS system we used all of the port with the exception of Port A. Port B was used for the LCD data bus (all 8 pins). Port C was used for the keypad rows (4 pins), the status LED (2 pins), and the bill enable (1 pin). Port D was used for the LCD data enable and register select (2 pins). Port E was used for the keypad columns (4 pins) and the bill accept (1 pin). All of the inputs pins that we used required an external pull down resistor (1kΩ) to insure reliable operation.

1.2 Programming

The HC11E9 provides 512 bytes of EEPROM and approximately 300 bytes of RAM for use by user programs. Since we wished to have the program code remain intact during times when the microcontoller was without power, we stored all of the code for the PAWS system in the EEPROM. We later found that we could easily exhaust this limited amount of space. The on-board ROM Buffalo monitor allowed us to manipulate and view the contents of the various registers and memory locations, assemble and disassemble code to and from EEPROM, and to easily download programs that had been entered and assembled under DOS using the supplied assembler. The flexibility provided by having the on-board assembler and disassembler was very helpful when trying to make minor changes while debugging the program.

2 Liquid Crystal Display

The liquid crystal display that is implemented into our device is the Optrex DMC-16202. It displays two lines with sixteen characters per line and uses a 5 X 8 dot matrix per character. It operates on 5 volts while 4 volts are required for the backlight. The character pallete consists of numerals, upper and lower case letters, Japanese, Greek, and punctuation. Custom characters are also supported but are not used in the PAWS system. The LCD has 16 pin connections including Vss, Vcc, Vee, register select, read/write, enable, 7 data lines, and the backlight.

2.1 Power

Vss, pin 1, supplies the ground connection while Vcc, pin 2, supplies power to the lcd. Vss is connected to pin 1 on the 5 volt power supply. Vcc is connected to pin 7 on the 5 volt power supply. The Vee, pin 3, is designed to be the contrast on the display. Vee is tied to ground on pin 2 on the 5 volt power supply to provide the desired contrast.

2.2 Backlight

Power for the backlight is provided by running a 50 ohm resistor between the lcd's Vcc and LED A, pin 15, on the backlight's inputs. LED K, pin 16, is tied to Vss (ground). This resistor value provides a voltage of approximately 4 volts to the backlight. By adjusting the resistor value the backlight can be made brighter or darker. Several resistor values were tested before deciding with 50 ohms which gives a delighful amount of backlighting.

2.3 Register Select

The register select, pin 4, tells the lcd whether it is receiving data input, high, or instruction input, low. The data input pertains to the character pallete and informs the lcd to display a character. An instruction input performs operations on the lcd such as clear, shift cursor, and ON/OFF. While the lcd is in instruction mode the data lines and read/write line supply the lcd with the instruction code. The only instructions necessary to PAWS is the display ON/OFF, cursor ON/OFF, setting data length and number of display lines, clear, and new line. The register select is located on port D3, pin 23 of the microcontroller. The register select is selected either high or low each time the enable is set since both are located on the same port. The register select is set when the enable is set high and maintains the same value when the enable is returned to low to ensure proper reading of this signal. Location $1008 controls the setting for port D with register select located on bit 3.

2.4 Read / Write

One of the unused but interesting features of the DMC-16202 is its internal RAM. This allows for custom characters to be stored in memory to be retrieve at a later time as well as storing messages. The read/write line, pin 5, enables writes directly to the display or reads into the internal memory. As the internal memory was not used, the read/write pin is tied to ground to keep the LCD in the write mode. The read/write signal is connected to the 3rd pin on the 5 volt power supply.

2.5 Enable

The enable feeds the inputs on the data lines into the lcd. The enable works when switched from high to low. For all the instructions and characters sent to the lcd, the enable pin was first set high, the data lines were loaded, and the enable set low. Port D4, pin 24, houses the enable signal. It is controlled through location $1008 bit 4

2.6 Data Lines

Data lines 0 through 7 provide the lcd with the appropriate values to print characters and perform instructions. Each line is set either high or low to provide the desired input. The data lines are connected to port B0 through B7, pins 42 through 35, on the microcontroller. Port B0 for data line 0, B1 for data line 1, and so on. These data lines are set via location $1004 on the microcontroller. Bits 0 through 7 of this address represent data lines 0 through 7. These lines are loaded after the enable is set high.

3 Keypad

PAWS features a 16 character keypad that allows users to interface with the system. The keypad contains all ten digits which allows users to type in their user ID. In addition, extra keys are used to perform some basic functions including back space, enter, and select yes or no.

The keypad is connected to the microcontroller through port C0 - C3 and port E0 - E3. Port C sends signals from the microcontroller to the keypad pins 5 through 8. These signals correspond to each row of the keypad. In the case of a key press, the keypad will return a signal to port E. The return signal corresponds to the column of the key pressed. Port C is located at address $1003. The keypad rows correspond to bits 0 through 3. Port E is located at address $100A. The keypad columns correspond to bits 0 throught 3.

4 Bill Verifier

The bill verifier is produced by Standard Changmakers. It is configured to only read $5 bills and is supplied with 25 V AC. The bill verifier constists of three signals, power, enable, and accept.

4.1 Enable

The enable signal on the bill verifier is used to turn the bill verifier on and off. The enable signal requires a ground signal, referenced to the bill verifier, to be placed in operation mode. PAWS utilizes a 5 volt relay that swithes between 5 volts and ground to send the enable signal. While the 5 volts is supplied to the bill verifier no bill will be accepted. The enable signal sent to the relay is controlled from port C6, pin 15, on the microcontroller. Location $1003 bit 6 sets the enable signal. Setting the signal high results in the relay connecting to ground and the bill verifier switching to operation mode. When the signal is returned to low the relay switches from ground to 5 volts turning the bill verifier off. The power for the relay is provided by pin 57 on the microcontroller and a ground form pin 60. The bill enable shares port C with the keypad and LED.

4.2 Accept

The accept signal acknowledges when a $5 bill has been inserted and accepted by the bill verifier. This signal originally returned a 25 V AC signal but was adapted to return a 5 V DC signal. This modification was beformed by cutting the 25 volt supply from the return path. A 5 volt signal is sent from pin 58 on the microcontroller to the return path resulting in an accept signal of 5 volts. The accept signal is feed into port E4, pin 44 on the microcontroller. The location of this address is $100A and is shared with the keypad column inputs.

5 Status LED

PAWS uses a tri-color LED to display the status of the system. A green light implies the system is operating within normal parameters. A yellow light indicates that the bill verifier is enabled and is ready to accept payment. A red light informs users that the system is malfunctioning and out of order. The LED consists of three signals: ground, green 5 V, and red 5 V. Yellow can be obtained by supplying signals to both green and red. The LED's ground signal is connected to one of the microcontroller's ground pins, pin 59. The green and red signals are supplied by port C4 and C5 respectively. These signals are controlled by location $1003, bits 4 and 5, on the microcontroller.

6 Power Supply

The power supplied to the above components was provided through one or both of PAWS' two power supplies. The first power supply was originally part of the card dispensing machine that we modified. This supply consists of an AC transformer that steps 120V AC down to 11 and 25V AC, an RF choke and a circuit breaker. The 25V AC was used to power the bill verifier and the 11V AC was used to provide power to the DC power supply. The second power supply, provided the microcontroller and LCD with 5V DC by rectifying the 11V AC source and feeding it into a 7805 voltage regulator. A capacitor was used to help clean up the transients on the 5V DC output.

7 Wiring Harness

8 Parts List

Quantity Item

1 5V DC relay

1 3904 transistor

1 Tricolor LED

1 16 key numeric keypad

1 16 x 2 LCD

5 300Ω resistor

5 1kΩ resistor

4 Diode

1 7805 voltage regulator

1 Green LED

1 1000F 50V capacitor

1 Bill reader (Standard Change Makers - model # 25A-$5)

1 Locking chassis (Standard Change Makers - model # 4005-SQX)

1 Power control unity (Standard Change Makers - model # M-3152-00)

1 Motorolla M68HC11E9EVBU microcontroller

1 2 x 30 Modu connector

2 1 x 8 Modu connector

1 1 x 14 Modu connector