08-16-2017, 09:23 PM
PC-BASED AUTOMATIC TIME MANAGER
[attachment=140]
Many articles have been published
in EFY for control
ling devices through a PC s
parallel port or line printer (LPT)
port. Here is another project for controlling
a school bell or a scheduled
shift-timing alarm of a factory automatically.
The load connected to the
output of the project can be an electric
bell or a hooter. The timing can
be programmed for every day schedule
as per individual requirement.
Hardware interface
Fig. 1 shows the block diagram of the
automatic time manager (ATM) and
Fig. 2 shows the circuit diagram of the
interfacing unit. Here, we are concerned
with only two connections: pin
2 and a ground pin of the parallel port.
Pin 2 corresponds to the first data bit
D0 in 8-bit data bus of the parallel
port.
Software program
In the program, master clock time or
real-time clock is represented by Time,
alarm times are represented by AT1
through AT24, and timer enable/disable
for alarm times are represented as
T1 to T24, respectively. AT1 through
AT24, and T1 through T24, are stored
in a file name called HTIME. This
data is fixed and continuously compared
with the actual time of master
clock.
Testing of software and
hardware interface
1. Install Microsoft Visual Basic 6
on your computer.
2. Fabricate the interface circuit
on the PCB.
3. Connect the male connector
pin 2 (D0) and ground (pins 18
through 25) to female connector
on the PC.
4. Launch Visual Basic from
the desktop and develop the application
as shown in the
screenshot. Save the project file
with extension .vbp
5. Run the program
6. Set master clock time and
alarm time.