Computerized Office Scheduling System

MAHMOUD Z. ISKANDARANI* AND NIDAL F. SHILBAYEH **

* Department of Computer Engineering

** Department of Computer Science

Applied ScienceUniversity

P.O.Box 41, Post Code: 11931, Amman

JORDAN

Abstract: - A computerized appointments system is designed, built and tested. The system replaces the traditional way of appointment making by making use of computer communication hardware and software technologies. The designed system utilizes a keypad and LCD display unit, which is mounted at the front door of an office or a reception area. The LCD continuously displays information regarding available appointments, which is fed to the unit by a computer system. The user will type the required information using the provided keypad, the information will then be passed to the database and the person concerned will be informed automatically about the appointment. The booked time and date will be taken out of the available appointments. Privacy and confidentiality is guaranteed with the system, as no other appointee will be able to know who booked at a certain time. The system allows for statistics and can be an effective system at Universities, whereby students can use it to make appointments with lecturers or at Hospitals and MedicalCenters.

Key-Words: - Office automation, Computer-based application, Data communication, Interface, Database System, Automation software, Circuit design.

1 Introduction

Most of the modern equipment in automation systems has a serial interface, and data can therefore be accessed directly by a PC, processed and stored. However an indirect control of a PC in an automated environment either through a wired connection or via a wireless connection be it to a PC or to a server has just recently been considered [2, 4].

Scheduling and display process is very important event to every office or department. Today, computers are widely used in many different fields, and can be easily interfaced with other devices [1, 6, 7].

In this paper, our advanced, efficient, and economical university automation system that serves lecturer and students alike will be discussed. The discussion will cover both hardware and software aspects of the designed system

2System Hardware

The system consists of two parts, software and hardware part. The hardware is responsible of displaying and receiving information, while the software is responsible of processing the required data to be displayed. Software and hardware work together to perform the display process.

The block diagram of the system is shown in fig.1. It consists of three main parts: terminal circuits, UART and the serial port. The terminals are the user interface, and used for entering and displaying information. The UART circuit organizes the flow of data between the terminals and the computer [3]. The serial port is used in the input and output of data to the computer.

2.1 Terminal Circuit

The terminal circuit system includes the input and output devices. It consists of two parts: keypad and LCD. The block diagram of the terminal circuit is shown in fig.2. Using the UART, data will be transferred to and from a computer system.

Fig.1System block diagram

Fig.2 Terminal circuit block diagram.

2.1.1 The Keypad

The system uses a keypad as an input device, which allows the user to view the needed information. To read the data using the keypad, key scan method is applied. The scan method works by applying logic 1 voltage to one of the rows and read the columns as an array. If a button is pressed, a short circuit will occur. This short circuit will make the column that is shorted with the row carry a logic 1 voltage. Knowing which row holds the logic 1 voltage, and knowing which column has the logic 1 voltage, the pressed key is determined. The 74C922 IC is used for the scan operation. It does the scan at a high speed. Fig.3 shows how the scan method works in a practical scheme. When logic 1 is applied to row 1 input and button B pressed, LED2 will operate. By knowing that row1 has logic 1 and LED2 is ON, button B can be specified as the button that was pressed.

Fig.3 Schematic design to display the scan method.

The used keypad comprises an array of four rows and four columns of push buttons. It has eight pins; each pin is connected to a row or to a column. The keypad is shown in fig.4. The first four pins represent the columns, while the second 4 pins represent the rows.

The 74C922 IC is a 16 Key to Binary Encoder. Debouncing of the keys is achieved by connecting a single capacitor on the MK pin, with a four bit binary output according to what key is pressed. A data Available line on the 74C922 goes high when a key pressed and low once it is released. Fig.5 shows the 74C922 16 Key to Binary Encoder. The keypad connected to the 74C922 IC, which in turns connected to the UART chip.

Fig.4 The keypad.

2.1.2 LCD

The LCD is used for displaying required information from the computer system.

Fig.5 74C922 Binary Encoder.

The Hitachi LM016L is a 16 character x 2 line reflective type Liquid Crystal character display module. It includes a built-in LSI controller HD44780 that provides a range of features, including:

  • 192 5x7-dot characters plus 8 user-defined characters.
  • Instruction functions.

2.2 UART

It is used in the design as a serial to parallel and parallel to serial converter. The CDP6402, AY-5-1015 / D36402R-9 have separated and dedicated Receive and Transmit data buses and can be configured by connecting certain pins to various logic levels. These are ideal for applications where we don't have a Microprocessor available. Fig.6 shows the pin diagram of CDP6402.

Fig.6Pin diagram of CDP6402.

The CDP6402's Control Register is made up of Parity Inhibit (PI), Stop Bit Select (SBS), Character Length Select (CLS1 and CLS2) and Even Parity Enable (EPE). These inputs can be latched using the Control Register Load (CRL) or by tying this pin high, where they will immediately take effect. The CDP6402 has two-register buffers that are used to transfer the serial data to parallel data, which is then available on the Receiver Buffer Register pins, RBR 8 to1. Furthermore, it can transfer parallel data to serial data, which is available on the Transmitter Buffer Register pins, TBR 8 to1. Table 1 shown in the next page shows the pin description for CDP6402 chip.

However; this UART chips have no built-in programmable Baud Rate Generator, and no facility to connect a crystal directly to it. So we need Baud Rate Generator Chip. An alternative is the 74HC4060 14-bit Binary Counter and Oscillator.

The 74HC4060, being a 14 bit binary counter/divider, has only outputs for some of its stages. Fig.7 shows the Baud Rate Generator with the 74HC4060-pin diagram. Only Q4 to Q14 are available to use as they have external connections. This means that higher Baud Rates are not obtainable from common crystals, such as the 1.8432 MHz and 2.4576 MHz. Table 2 shows the possible Baud Rates used by 74HC4060 chip.

Fig.7 Baud Rate Generator using 74HC4060 chip.

Output / 1.8432 MHz / 2.4546 MHz
Q4 / 7200 BPS / 9600 BPS
Q5 / 3600 BPS / 4800 BPS
Q6 / 1800 BPS / 2400 BPS
Q7 / 900 BPS / 1200 BPS
Q8 / 450 BPS / 600 BPS
Q9 / 225 BPS / 300 BPS

Table 2Possible Baud Rates used by 74HC4060

The UART requires a clock rate 16 times higher than the Baud Rate we will use. For example, A baud rate of 9600 BPS requires an input clock frequency of 153.6 kHz. However; our MAX-232 level converter may be limited to 120 KBPS.

2.3 SerialPort (RS-232 Level Converter)

Almost all digital devices used require either TTL or CMOS logic levels. Therefore, the first step to connect a device to the RS-232 port is to transform the RS-232 levels back into "0" and "5" Volts [2]. This is achieved using the RS-232 Level Converter. MAX-232 is the most common package.

Fig.8 Typical MAX-232 circuit.

Pin Number / Abbr. / Full Name / Notes
Pin 1 / VDD / + 5v Supply Rail / Connect to supply (VCC +5v)
Pin 2 / NC / Not Connected / Not Connected
Pin 3 / GND / Ground / Ground
Pin 4 / RRD / Receiver Register Disable / When driven high, outputs RBR8: RBR1 are High Impedance.
Pin 5:12 / RBR8:
RBR1 / Receiver Buffer Register / Receiver's Data Bus
Pin 13 / PE / Parity Error / When High, A Parity Error Has Occurred.
Pin 14 / FE / Framing Error / When High, A Framing Error Has Occurred. I.e. The Stop Bit was not Logic 1.
Pin 15 / OE / Overrun Error / When High, Data has been received but the nData Received Reset had not yet been activated.
Pin 16 / SFD / Status Flag Disable / When High, Status Flag Outputs (PE, FE, OE, DR and TBRE) are High Impedance
Pin 17 / RRC / Receiver Register Clock / 16x Clock input for the Receiver Register.
Pin 18 / NDRR / Data Received Reset / Active Low. When low, sets Data received Output Low (i.e. Clears DR)
Pin 19 / DR / Data Received / When High, Data has been received and placed on outputs RBR8: RBR1.
Pin 20 / RRI / Receiver Register In / RXD - Serial Input. Connect to SerialPort, Via RS-232 receiver.
Pin 21 / MR / Master Reset / Resets the UART. UART should be reset after applying power.
Pin 22 / TBRE / Transmitter Buffer Register Empty / When High, indicates that Transmitter Buffer Register is Empty, thus all bits including the stop bit have been sent.
Pin 23 / NTBRL / Transmitter Buffer Load / Strobe / Active Low. When low, data present on TBR8: TBR1 is placed in Transmitter Buffer Register. A Low to High Transition on this pin then sends the data.
Pin 24 / TRE / Transmitter Register Empty / When High, Transmitter Register is Empty, thus can accept another byte of data to be sent.
Pin 25 / TRO / Transmitter Register Out (TXD) / TXD - Serial Output. Connect to SerialPort, Via RS-232 Transmitter.
Pin 26:33 / TBR8:
TBR1 / Transmitter Buffer Register / Data Bus, for Transmitter. Place Data here, which we want to send.
Pin 34 / CRL / Control Register Load / When High, Control Register (PI, SBS, CLS2, CLS1, EPE) is Loaded. Can be tied high, so changes on these pins occur instantaneously.
Pin 35 / PI / Parity Inhibit / When High, No Parity is Used for Both Transmit and Receive. When Low, Parity is Used.
Pin 36 / SBS / Stop Bit Select / A High, selects 2 stop bits. (1.5 for 5 Character Word Lengths) A Low selects one stop bit.
Pin 37:38 / CLS2:
CLS1 / Character Length Select / Selects Word Length. 00 = 5 Bits, 01 = 6 Bits, 10 = 7 Bits and 11 = 8 Bits.
Pin 39 / EPE / Even Parity Enable / When High, Even Parity is Used. When Low, Odd Parity is Used.
Pin 40 / TRC / Transmitter Register Clock / 16x Clock input for Transmitter.

Table 1 Pin description for CDP6402.

3 System Software

3.1 ProgrammingSerialPort

Serial transmission is achieved via the RS-232 standard. Data is sent along the TD line and received by the RD line with a common ground return. In addition, the DTR pin is connected to the Register Select of the LCD. The main registers in RS-232 communications that were used in our system are the Line Control Register (LCR), the Line Status Register (LSR), the Transmit and Receive buffers that share the same addresses and the Modem Control Register (MCR).

Three main functions were used in our software to serve programming the serial port they are:

void send_character (int,int).

int get_character(void).

void setup_serial (void).

The LSR determines the status of the transmitter and receiver buffers. It can only be read from, and all bits are automatically set by hardware. One problem which can occurs when transmitting data is that a new character can be written to the transmitter buffer before the previous character has been sent. This overwrites the contents of the character being transmitted. To avoid this, Bit 6 must tested to determine if there is still a character in the transmitter buffer. To send a character: Test Bit 6 until set; then Send character. A typical C routine was written inside send_character ( ) function as follow:

do

{ status = inportb (LSR) & 0x40;

} while (statuse != 0x40);

When receiving data, Bit 1 must be tested to determine if there is a bit in the receiver buffer. To receive a character: Test Bit 0 until set; then Read character. A typical C routine was written inside get_character ( ) function as follow:

do

{ status = inportb (LSR) & 0x01;

} while (statuse != 0x01);

The LCR sets up the communication parameters. These include the number of bits per character, the parity and the number of stop bits. It can be written to or read from. Bit 7 must be set to a '0' in order to access the transmit and receive buffers, (TX/RX buffer) else if it is set to a '1', the Baud rate divider is accessed. The Baud rate is set by loading an appropriate 16-bit divisor, with the lower 8 bits of the divisor put into the TX/RX buffer address and the upper 8 bits put into the next address after the TX/RX buffer. The value loaded depends on the crystal frequency connected to the IC. A typical Croutine was written inside setup_serial ( ) function as follow:

outportb ( LCR, 0x80 ); // Bit 7 is 1 in LCR

outportb ( PORT1+0, 0x0C ); /* Set Baud rate divisor latch low byte 9600 bps= 12, crystal frequency = 1.8432 MHz*/

outportb ( PORT1+1, 0x00 ); /* Set Baud rate divisor latch high byte*/

outportb ( LCR, 0x03 );/* Set LCR; 8-bit, no parity and 1 stop bit*/

3.2 Programming LCD:

The LCD has the capacity to display a sufficient amount of data. To program any instruction, pin RS in LCD must be tied to logic '0' to select the instruction register. A typical C routine written to achieve this as follows:

outportb ( MCR, inportb ( MCR | 0x01 ) );

To send data to LCD, pin RS must tied to logic '1' to select the instruction register. A typical C routine written as follows:

outportb ( MCR, inportb ( MCR & 0xFE ) );

Table 3 shows some functions that are used in programming LCD:

Functions / Description
InitialLcd ( ); / Initializes LCD, i.e. clears LCD, return the cursor to home position, and make the display on.
CursorOn(), CursorOff ( ); / Cursor either on or off.
DisplayOn ( ), DisplayOff ( ); / Display either on or off.
ShiftOn ( ), ShiftOff ( ); / Display either Shifted or not.
ReturnHome ( ); / Returns the cursor to home position.
LcdLocation ( ); / Specifies cursor's position.

Table 3 Programming LCD Functions

Our software divided into two parts they are: Visitor Access Services and User Access Services.

3.2.1 Visitor Access Services

These are operations that serves the visitor by selecting one of the choices from the menu displayed on the LCD by calling the LcdMenu ( ) function. The menu consists of two choices they are:

  1. LecturesView: It allows the visitor to view lectures been specified for weekdays. This function operates in the following way: it prompts the visitor to enter the required day. This will happen by calling the Day ( ) function, then the list of lectures of the specified day will be displayed by calling the LcdDisWeek ( ) function. Fig.9 shows the operation of LcdDisWeek ( ) function.

A typical C routine was written to achieve the operation of LecturesView ( ) function as follows:

day = Day ( );

LcdDisWeek( day );

  1. Appointments: It allows the visitor to take an appointment, after viewing the allowable times and states. This is done by calling the GetAppoint ( ) function. This function operates in the following way: it prompts the visitor to enter the required.This will happen by calling the Day ( ) function, then the list of appointments and its states will be displayed by calling the ViewAppoint ( ) function. After elapsing a specific period in displaying the list, the visitor will be prompt to enter an appointment and ID number. The entered data will be checked by calling the check ( ) function. If the data is correct, then it will be saved in an appointment file by calling the save ( ) function, and if it is incorrect, an error message will be displayed from the error ( ) function. Fig.10 shows the operation of GetAppoint ( ) function, and fig.11 shows the operation of ViewAppoint ( ) function. In addition to those choices, there is a message button on the keypad that permits the visitor to view if there is a message to him, which was kept by the internal user concerning the appointment.

3.2.2 User Access Services

Designed to aid the main user administrating system from the computer by selecting one of the choices from the main menu. The main menu consists of seven choices they are:

  1. LCD Operation: It operates the LCD by calling the LcdOperation ( ) which is the main function of operation.
  2. View Appointments: It allows the user to view appointments that were taken by visitors by calling the ViewAppointments () function. Fig.12 shows the operation of ViewAppontments ( ) function.
  3. Reset Appointments: Resets all the appointments by calling the ResetAppointments () function. Fig.13 shows the operation of ResetAppointments() function.
  4. Keeps a Message: It permits the user to keep a special message to the person who took an appointment in a special time. Fig.15 shows the operation of KeepMsg ( ) function.
  5. Set Appointments Time: The user must changes or set all the appointment times, besides; all the appointments will resets. This is done by calling the SetAppointments () function. Fig.14 shows the operation of SetAppointments() function.
  6. Change Lectures Time: The user must changes or set all his lectures' time and specifies the name of each lecture. This is done by calling the ChangeLectures ( ) function. Operation of ChangeLectures ( ) function same as SetAppointments ( ) function.
  7. QUIT: Quit the program and turns off the system.

Fig.9 LcdDisWeek ( ).

4. Conclusion and Future Development

Advancement in engineering, technical and computer based application with the availability of cost, viable components has lead to massive steps in the field of automation. One such application is office automation. This work has added one very