Summary of Miniature Real-Time Controller using PIC16F84
The F84 MRTC is a low-power miniature real-time controller using a PIC16F84 microcontroller with a 32,768Hz crystal. It features a fixed 6-channel scheduler stored in EEPROM, driven by open-collector outputs capable of handling 30mA loads. The system includes a dual-battery backup for clock retention and uses a single button to set the time once at 19:00.
Parts used in the F84 MRTC:
- PIC16F84 Microcontroller
- 32,768Hz Low Power X-tal Crystal
- 74LS07 Open Collector Buffer
- D1 Diode (1N914 or 1N4148)
- D2 Ge Diode
- S1 Momentary Switch
- LED Indicator
- Two AA Size Batteries
- Homemade Opto-triac
Introduction
The F84 MRTC was my second design of a miniature real-time controller. This version uses PIC16F84 running with a low power X-tal 32,768Hz. The scheduler for 6-channel output was saved in EEPROM. No terminal for serial downloading of the scheduler. It’s suitable for fixed scheduler job. Two AA size battery provides +3V backup for clock operation when main power has failed. Time setting at 19:00 is set only once by pressing S1 button. The 6-channel open collector output provides max. 30mA @30V load.
Hardware
A circuit diagram of the F84 MRTC is shown in Figure 1. The controller is PIC16F84, Flash based RISC uController running with a low-power X-tal 32,768Hz. The 6-channel output is RB2 to RB7 connected to a 74LS07 open collector buffer providing approx. 30mA @30V suitable for driving a homemade opto-triac shown in Miniature Real-time Controller 2051 version. D1 and D2 forms a simple switch between main supply and +3V battery. As can be seen, D1 may be silicon signal diode 1N914 or 1N4148. D2, however, can use a Ge diode having lower V forward. S1 is a momentary switch when pressed, it set current time to 19:00. The small LED at RB0, indicates functioning of the controller, after reset the blink rate is 1Hz, after press S1 set time to 19:00, it will blink at 1/3Hz or every 3 second.
Software
The original source program for the F84 MRTC was written using ‘C’, RTC.C with header file RTC.H. The hex file, RTC.HEX was compiled by PICC PCW V2.666. Daily scheduler is resided in 64-byte EEPROM data space. Editing for your scheduler can be made under PicPro by Nigel Goodwin. As shown in Figure 2, each byte may edit and enter into Nigel’s Picpro buffer before write the code and EEPROM data into the F84 chip. See details of setting scheduler in RTC.C
For more detail: Miniature Real-Time Controller using PIC16F84
-
What microcontroller does the F84 MRTC use?
The controller uses a PIC16F84 Flash based RISC uController. -
How is the scheduler data stored in this project?
The daily scheduler is saved in the 64-byte EEPROM data space. -
Can I download the scheduler via a serial terminal?
No, there is no terminal for serial downloading of the scheduler as it is suitable for fixed scheduler jobs only. -
What happens when the main power fails?
Two AA size batteries provide +3V backup for clock operation. -
How do I set the current time on the device?
Time setting is done only once by pressing the S1 button which sets the time to 19:00. -
What is the maximum load capacity for the output channels?
The 6-channel open collector output provides a max of 30mA @30V load. -
Which diodes are recommended for D1 and D2?
D1 can be a silicon signal diode like 1N914 or 1N4148, while D2 should use a Ge diode with lower V forward. -
How does the LED indicate the controller status?
The LED blinks at 1Hz after reset and slows to 1/3Hz every 3 seconds after the time is set via S1.
