Thursday, July 18, 2024

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages

Microcontroller-Based School Timer

In run mode if you press ‘Bell’ key once, the display shows the bell’s various operating timings one after the other, in the same order in which these had been previously stored. In case you want to discontinue seeing all the bell timings, you may press ‘Time’ key at any stage to revert back to the display of real time.

The output section. Seven-segment displays are used for data display. As LEDs are brighter, these have been used in the system. There are two techniques for driving the displays: (i) driving each display using a separate driver (like 74LS47 or CD4511) and (ii) using multiplexed displays.

The first technique works well, but practically it has two problems: it uses a large number of IC packages and consumes a fairly large amount of current. By using multiplexed display both the problems can be solved. In multiplexing only one input is displayed at any given instant. But if you chop or alter inputs fast enough, your eyes see the result as a continuous display. With LEDs, only one digit is lighted up at a time. This saves a lot of power and also components, making the system economical.

Generally, displays are refreshed at a frequency of 50 to 150 Hz. Here, displays are refreshed at a frequency of 100 Hz (after every 10 ms). The display-refreshing program is an interrupt service routine program. BCD-to- 7-segment decoder/driver 74LS47, along with transistor 2N2907, and 3-line-to-8-line decoder 74LS138 are used for driving common-anode displays.

In multiplexed display, the current through the segments is doubled to increase the display’s brightness. 74LS47 is rated for sinking a current of up to 24 mA. As the current persists for a very small time in multiplexed display, it is peaky and can be as high as 40 mA per segment.

- Advertisement -

The decimal point is controlled individually by transistor BC547, as 74LS47 does not support the decimal point. PA0 and PA1 bits of port A are used for controlling the electro-mechanical relay and buzzer, respectively.

A1B_fig---3Power supply and battery backup. The microcontroller and the associated IC packages require a 5V DC supply, while the relay and the buzzer require 12V DC supply. A simple rectifier along with zener diode-regulated power supply is used. The microcontroller is fed through a battery-backed power supply, so that in the case of power supply, so that in the case of power failure the functioning of the controller’s timer section is not affected. During power failure the timer is taken to ‘low power’ mode (called ‘wait’ mode). In this mode the controller draws a very small current. So small Ni-Cd batteries can provide a good backup.

A simple diode-resistance (27-ohm, ¼-watt) charger maintains the charge of the battery at proper charging rate.

- Advertisement -

Freescale offers Integrated Development Environment (IDE) software for programming its microcontroller and complete development of the system. The development board comes with Editor, Assembler, and Programmer software to support Freescale’s device programmer and software simulator. The ICS05 in-circuit simulator and non-real-time I/O emulator for simulating, programming, and debugging code for a MC68HC705J1A/KJ1 family device.

When you connect the pod to your host computer and target hardware, you can use the actual inputs and outputs of the target system during simulation of the code. You can also use the ISC05 software to edit and assemble the code in standalone mode, without input/output to/from pod. The pod (MC68HC705J1CS) can be interfaced to any Windows 3.x-or Windows 95-based IBM computer using serial port.

The software for the timer has been so developed that the system becomes as user-friendly as possible. The main constraint is read/write memory (RAM) space. As mentioned earlier, the microcontroller has only 64 byte RAM. About twenty bell operating timings are required to the stored. So the efficient use of RAM becomes essential.

The software routines for the timer, along with their Assembly language codes, are listed in a folder. (Note: This folder, containing source code (.asm) and listing file (.lst) are included in the CD. As files are quite large, it is not feasible to include them here.) Basically, the following functions are performed by the software program:

  1. Initialisation of ports and the timer.
  2. Reading of keypressed data.
  3. Storing of real time and bell timings.
  4. Comparison of real time and bell time. If the two match, the bell rings.
  5. Display of data.
  6. Time-keeping.

For a user-friendly system, the associated software is required to perform many data manipulation tricks and internal branching. The operation and logic can be understood from the Assembly language listings. The software is mainly divided into the following modules:

Keyboard. When a key is pressed, CD4532 sends the corresponding data. After reading the data, the controller decides on the action. ‘Set/ Run’ key (S6) is connected to port PA4.



Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components