Tuesday, 23 March 2010

AIRBAG PROJECT USING PIC16F877





SCHEMATIC DIAGRAM AIRBAG PROJECT USING PIC16F877





AMOUNT OF ACCELERATION SENSED AND DISPLAYED ON LCD

LIMITS YOU CAN SET ACCELERATION LIMIT THROUGH SWITCHES

IF IMPACT ACCEDS THE LIMIT RELAY IS SWITCHED ON TO FILL AIRBAG

AND PROTECT THE TRAVELLING PERSON IN THE VEHICLE



VIBRATION SENSING AS WELL AS DATA RECORDING





SCHEMATIC DIAGRAM OF VIBRATION SENSING

AS WELL AS DATA RECORDING
USING PIC16F877





  • AMOUNT OF VIBRATION SENSED AND DISPLAYED ON LCD
  • RTC(REAL TIME CLOCK)GIVES REAL TIME INFORMATION
  • LIMITS YOU CAN SET THROUGH SWITCHES
  • TRIP THE LOAD IF VIBRATION EXCEEDS LIMIT




Tuesday, 16 March 2010

REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR

INTRODUCTION

These days most audio systems come with remote controllers. However, no such facility is provided for normal audio amplifiers. Such audio controllers are not available even in kit form. This article presents an infrared (IR) remote-controlled digital audio processor. It is based on a microcontroller and can be used with any NEC-compatible fullfunction IR remote control. This audio processor has enhanced features and can be easily customised to meet individual requirements as it is programmable. Its main features are: 1. Full remote control using any NEC-compatible IR remote control handset. 2. Provision for four stereo input channels and one stereo output. 3. Individual gain control for each input channel to handle different sources 4. Bass, midrange, treble, mute and attenuation control 5. 80-step control for volume and 15-step control for bass, midrange and treble 6. Settings displayed on two 7-segment light-emitting diode (LED) displays and eight individual LEDs 7. Stereo VU level indication on 10-LED bar display 8. Full-function keys on-board for audio amplifier control 9. All settings stored on the EEPROM 10. Standby mode for amplifier power control Circuit description


BLODK DIAGRAM FOR REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR



CIRCUIT DIAGRAM FOR REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR



CIRCUIT DESCRIPTION OF REMOTE-CONTROLLED DIGITAL AUDIO PROCESSOR

Fig. 1 shows the block diagram of the remote-controlled digital audio processor. The system comprises Atmel’s AT89C51 microcontroller (IC1),
TDA7439 audio processor from SGSThomson (IC4) and I2C bus compatible MC24C02 EEPROM (IC5). The microcontroller chip is programmed to control all the digital processes of the
system. The audio processor controls all the audio amplifier functions and is compatible with I2C bus. All the commands from the remote control are received through the IR sensor. The audio amplifier can also be
controlled using the on-board keys.
Microcontroller
the function of the microcontroller is to receive commands (through port P3.2) from the remote handset, program audio controls as per the commands and update the EEPROM. A delay in updating the EEPROM is de-liberately provided because normally the listener will change the value of a
parameter continuously until he is satisfied. The 40-pin AT89C51 microcontrollerhas four 8-bit input/output (I/O) ports. Port 0 is used for indicating through LEDs the various functions selected via the remote/on-board keys. Port 1 drives the 7-segment display using 7-segment latch/decoder/driver IC CD4543. Port 2 is pulled up via resistor network RNW1 and used for manual key control. Pins P3.0 and P3.1 of the microcontroller are used as serial data (SDA) and serial clock (SCL) lines for the I2C bus for communicating with the audio processor (TDA7439) and EEPROM (MC24C02). These two lines are connected to pull-up resistors, which are required for I2C bus devices. P3.2 receives the remote commands through the IR receiver module. Pin P3.4 is used for flashing LED9 whenever a remote command is received or any key is pressed. The microcontroller also checks the functioning of the memory (MC24C02) and the audio processor (TDA7439). If it is not communicating with these two ICs on the I2C bus, it flashes the volume level on the 7-segment displays. Memory. IC MC24C02 is an I2C-bus compatible 2k-bit EEPROM organised as 256×8-bit that can retain data for more than ten years. Various parameters can be stored in it. To obviate the loss of latest settings in the case of power failure, the microcontroller stores all the audio settings of the user in the EEPROM. The memory ensures that the microcontroller will read the last saved settings from the EEPROM when power resumes. Using SCL and SDA lines, the microcontroller can read and write data for all the parameters. For more details on I2C bus and memory interface, please refer to the MC24C02 datasheet. Audio parameters can be set using the remote control handset or the on-board keys as per the details given under the ‘remote control’ section. Audio processor. IC TDA7439 is a single-chip I2C-bus compatible audio controller that is used to control all the functions of the audio amplifier. The output from any (up to four) stereo preamplifier is fed to the audio processor (TDA7439). The microcontroller can control volume, treble, bass, attenuation, gain and other functions of each channel separately. All these parameters are programmed by the microcontroller using SCL and SDA lines, which it shares with the memory IC and the audio processor. Data transmission from the microcontroller to the audio processor (IC TDA7439) and the memory (MC24C02) and vice versa takes place through the two-wire I2C-bus interface consisting of SDA and SCL, which are connected to P3.0 (RXD) and P3.1 (TXD) of the microcontroller, respectively. Here, the microcontroller unit acts as the master and the audio processor and the memory act as slave devices. Any of these three devices can act as the transmitter or the receiver under the control of the master. Some of the conditions to communicate through the I2C bus are:
1. Data validity: The data on the SDA line must be stable during the high period of the clock. The high andlow states of the data line can change only when the clock signal on the SCL line is low.
2. Start and Stop: A start condition is a high-to-low transition of the SDA line while SCL is high. The stop condition is a low-to-high transition of the SDA line while SCL is high.
3. Byte format: Every byte transferred on the SDA line must contain eight bits. The most significant bit (MSB) is transferred first.
4. Acknowledge: Each byte must be followed by an acknowledgement bit. The acknowledge clock pulse is generated by the master. The transmitter releases the SDA line (high) during the acknowledge clock pulse. The receiver must pull down the SDA line during the acknowledge clock pulse so that it remains low during the high period of this clock pulse. To program any of the parameters, the following interface protocol is used for sending the data from the microcontroller to TDA7439. The interface protocol comprises:
1. A start condition (S)
2. A chip address byte containing the TDA7439 address (88H) followed by an acknowledgement bit (ACK)
3. A sub-address byte followed by an ACK. The first four bits (LSB) of this byte indicate the function selected (e.g., input select, bass, treble and volume). The fifth bit indicates incremental/ non-incremental bus (1/0) and the sixth, seventh and eighth bits are ‘don’t care’ bits.
4. A sequence of data followed by an ACK. The data pertains to the value for the selected function.
5. A stop condition (P) In the case of non-incremental bus, the data bytes correspond only to the function selected. If the fifth bit is high, the sub-address is automatically incremented with each data byte. This mode is useful for initialising the device. For actual values of data bytes for each function, refer to the datasheet of TDA7439. Similar protocol is followed for sending data to/from the microcontroller to MC24C02 EEPROM by using its chip address as ‘A0H’. Power supply. Fig. 3 shows the power supply circuit for the remotecontrolled digital audio processor. The AC mains is stepped down by transformer X1 to deliver a secondary outputof 9V AC at 1A. The transformer output is rectified by full-wave bridge rectifier BR1 and filtered by capacitor C42. Regulators IC8 and IC9 provide regulated 5V and 9V power supplies, respectively. IC10 acts as the variable power supplyregulator. It is set to provide 3V regulated supply by adjusting preset VR1. Capacitors C39, C40 and C41 bypass any ripple in the regula ted outputs.This supply is not used in the circuit. However, the readers can use the same for powering devices like a Walkman. As capacitors above 10 μF are connected to the outputs of regulator ICs, diodes D3 through D5 provide protection to the regulator ICs, respectively, in case their inputs short to ground. Relay RL1 is normally energised to provide mains to the power amplifier. In standby mode, it is de-energised. Switch S2 is the ‘on’/‘off’ switch.
Software
The software was assembled using Metalink’s ASM51 assembler, which is freely available for download. The source code has been extensively commented for easier understanding. It can be divided into the following segments in the order of listing:
1. Variable and constant definitions
2. Delay routines
3. IR decoding routines
4. Keyboard routines
5. TDA7439 communication
6. MC24C02 communication
7. I2C bus routines
8. Display routines
9. IR and key command processing
10. Timer 1 interrupt handler
11. Main program On reset, the microcontroller executes the main program as follows:
1. Initialise the microcontroller’s registers and random-access memory (RAM) locations.
2. Read Standby and Mute status from the EEPROM and initialise TDA7439 accordingly.
3. Read various audio parameters from the EEPROM and initialise the audio processor.
4. Initialise the display and LED port.
5. Loop infinitely as follows, waiting for events:
• Enable the interrupts.
• Check the monitor input for AC power-off. If the power goes off, jump to the power-off sequence routine.
• Else, if a new key is pressed, call the DO_KEY routine to process the key. For this, check whether the NEW_KEY bit is set. This bit is cleared after the command is processed.
• Else, if a new IR command is received, call the DO_COM routine to process the remote command. For this, check whether the NEW_COM (new IR command available) bit is set. This bit is cleared after the command is processed.
• Jump to the beginning of the loop.6. Power-off sequence. Save all the settings to the EEPROM, and turn off the display and standby relay. Since the output of the IR sensor is connected to pin 12 (INT0) of the microcontroller, an external interrupt occurs whenever a code is received. The algorithm for decoding the IR stream is completely implemented in the ‘external interrupt 0’ handler routine. This routine sets NEW_COM (02H in bit memory) if a new command is available. The decoded command byte is stored in ‘Command’ (location 021H in the internal RAM). The main routine checks for NEW_COM bit continuously in a loop. Timer 0 is exclusively used by this routine to determine the pulse timings. Decoding the IR stream involves the following steps:
1. Since every code is transmitted twice, reject the first by introducing a delay of 85 milliseconds (ms) and start timer 0. The second transmission is detected by checking for no-overflow timer 0. In all other cases, timer 0 will overflow.
2. For second transmission, check the timer 0 count to determine the length of the leader pulse (9 ms). If the pulse length is between 8.1 ms and 9.7 ms, it will be recognised as valid. Skip the following 4.5ms silence.
3. To detect the incoming bits, timer 0 is configured to use the strobe signal such that the counter runs between the interval periods of bits. The value of the counter is then used to determine whether the incoming bit is ‘0’, ‘1’ or ‘Stop.’ This is implemented in the RECEIVE_BIT routine.
4. If the first bit received is ‘Stop,’ repeat the last command by setting the NEW_COM bit.
5. Else, receive the rest seven bits.Compare the received byte with the custom code (C_Code). If these don’t match, return error.
6. Receive the next byte and compare with the custom code. If these don’t match, return error.
7. Receive the next byte and store in ‘Command.’
8. Receive the next byte and check whether it is complement value of ‘Command.’ Else, return error.
9. Receive ‘Stop’ bit.
10. Set NEW_COM and return from interrupt.
Other parts of the source code are relatively straightforward and self-explanatory. Remote control. The micro-controller can accept commands from any IR remote that uses NEC transmission format. These remote controllers are readily available in the market and use μPD6121, PT2221 or a compatible IC. Here, we’ve used Creative’s remote handset. All the functions of the system can be controlled fully using the remote or the on-board keys. By default, the display shows the volume setting and LEDs indicate the channel selected. LED9 glows momentarily whenever a command from the remote is received or any key is pressed. Function adjustments are detailed below:
1. Volume: Use Vol+/Vol- key to increase/decrease the volume. The volume settings are shown on the twodigit, 7-segment display. Steps can be varied between ‘1’ and ‘80.’
2. Mute and Standby: Using ‘Mute’ and ‘Standby’ buttons, you can toggle the mute and standby status, respectively. If ‘Mute’ is pressed, the display will show ‘00.’ In ‘Standby’ mode, the relay de-energises to switch off the main amplifier. All the LEDs and displays, except LED9, turn off to indicate the standby status.
3. Input Select: To select the audio input source, press ‘Channel’ key until the desired channel is selected. The LED corresponding to the selected channel turns on and the input gain setting for that channel is displayed for five seconds. Thereafter, the volume level is displayed on the 7-segment display.
4. Input Gain set: Press ‘Gain’ key. The LED corresponding to the channel will start blinking and the gain value is displayed. Use Vol+/Vol- key to increase/ decrease the gain for that channel. Note that the gain can be varied from ‘1’ to ‘15.’ If you press ‘Gain’ key once more, and no key is pressed for five seconds, it will exit the gain setting mode and the volume level is displayed.
5. Audio: Press ‘Audio Set’ (Menu) key to adjust bass, middle, treble and attenuation one by one. Each time ‘Audio Set’ key is pressed, the LED corresponding to the selected function turns on and the function value is displayed. Once the required function is selected, use Vol+ and Vol- to adjust the setting. Bass, middle and treble can be varied from ‘07’ to ‘7.’ Values ‘0’ through ‘7’ indicate ‘Boost’ and ‘00’ through ‘07’ indicate ‘Cut.’ Attenuation can be varied from ‘0’ to ‘40.’


COMPONENTS REQUIRED FOR REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR


Semiconductors:
IC1 - AT89C51 microcontroller
IC2, IC3 - CD4543 7-segment decoder/
driver
IC4 - TDA7439 audio processor
IC5 - MC24C02 I2C EEPROM
IC6 - KA2281 2-channel level
meter driver
IC7 - TSOP1238 IR receiver
module
IC8 - 7809 9V regulator
IC9 - 7805 5V regulator
IC10 - LM317 variable regulator
T1 - BC558 pnp transistor
T2, T3, T5 - BC547 npn transistor
T4 - BD139 pnp transistor
BR1 - W04M bridge rectifier
D1-D6 - 1N4004 rectifier diode
DIS1, DIS2 - LTS543 7-segment display
DIS3 - 10-LED bargraph display
LED1-LED8 - Red LED
LED9 - Green LED
Resistors (all ¼-watt, ±5% carbon):
R1 - 8.2-kilo-ohm
R2-R24,
R40-R49 - 1-kilo-ohm
R25, R28,
R50, R53 - 10-kilo-ohm
R26, R29,
R30, R34 - 2.7-kilo-ohm
R27 - 100-ohm
R31, R35 - 5.6-kilo-ohm
R32, R33 - 4.7-kilo-ohm
R36-R39 - 22-kilo-ohm
R51 - 220-kilo-ohm
R52 - 2.2-kilo-ohm
Capacitors:
C1, C2 - 33pF ceramic disk
C3, C10 - 10μF, 16V electrolytic
C4-C6,
C39-C41 - 100nF ceramic disk
C7 - 4.7μF, 16V electrolytic
C8, C9 - 2.2μF, 16V electrolytic
C11, C20 - 5.6nF polyester
C12, C19 - 18nF polyester
C13, C18 - 22nF polyester
C14, C17 - 100nF polyester
C21-C28 - 0.47μF polyester
C29-C32 - 4.7μF, 25V electrolytic
C33, C34 - 10μF, 25V electrolytic
C35 - 1000μF, 25V electrolytic
C36 - 4700μF, 25V electrolytic
C37, C38 - 0.33μF ceramic disk
C42 - 470μF, 25V electrolytic
Miscellaneous:
X1 - 230V AC primary to 12V, 1A
secondary transformer
RL1 - 9V, 160Ω, 2 C/O relay
XTAL - 12MHz crystal
S1- S7 - Push-to-on switch
S8 - On/Off switch
Remote - Creative’s remote (NECcompatible
format)


PCB LAYOUT FOR REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR




COMPONENT LAYOUT FOR REMOTE CONTROLLED DIGITAL AUDIO PROCESSOR




CONSTRUCTION

The circuit can be easily assembled on any PCB with IC base. Before you install the microcontroller, memory and audio processor in their sockets and solder the IR receiver module, make sure that the supply voltage is correct. All parts, except the audio processor (TDA7439), require 5V DC supply. The audio processor is powered by 9V DC.

Monday, 15 March 2010

Remotely Programmable RTC-Interfaced Microcontroller for Multiple Device Control





INTRODUCTION

This project based on Atmel AT89C52 and Dallas real-timeclock (RTC) chip DS12887 can be used to control and remotely program the switching operation of 24 electrically operated devices. The devices can be switched on/off at precise times repeatedly every day, every month. The microcontroller can be programmed for device control using a normal Philips TV remote control.

RC5 CODING

Since the circuit makes use of Philips TV remote for device-switching time parameters, you need to know the fundamentals of the coding format used
in these IR remotes.
The Philips IR format makes use of RC5 code, which is also known as ‘bi-phase coding.’ In RC5-coded signals (Fig. 2), each bit has a uniform duration. A transition in the middle of the time interval assigned to each bit
encodes its logical value (‘0’ or ‘1’). A high-to-low transition assigns the bit a logic value of ‘0,’ and a low-to-high transition assigns the bit a logic value of ‘1.’ We need additional transitions at the beginning of each bit if a stream of equal bits is sent. However, there is no need of additional transitions if the
next bit has a different logic value.Table II shows how all the commands of an RC5 remote control are encoded.
The first two bits are ‘start’ bits, which are used to adjust and synchronise the receiver. These bits are used to calculate and analyse the bit length of the other bits.
The third bit is a ‘toggle’ bit, which is toggled every time a button ispressed at the remote control. This bit is used to identify whether the button is really pressed or whether an obstacle came in between the IR path of the remote and the IR receiver.
The five bits (A4 through A0) immediately following the toggle bit are used to identify the device (see Table III). So, a maximum of 32 devices can be identified to and respond individually to the same type of coding without any disturbance, i.e., one among the 64 devices can be identified uniquely. Addresses of some of the remotes are shown in Table III.
The six bits (C5 through C0) immediately following the five address bits are the control/command bits. Therefore a maximum of 64 commands can be equipped in an RC5-type remote. Some of the command codes (decimal equivalents), as used in this project, are shown in Table IV. When any of the command/control buttons on the remote is pressed, the coded signal is received by the IR receiver-demodulator TSOP1738.
The output of the IR demodulator circuit is normally high, but when any of the buttons in the remote is pressed, a stream of low-going demodulated pulses will appear at its output. These pulses are fed to the external active-low interrupt input pin (INT/0) of 89C52. On receipt of the first low-going pulse, the monitor program of 89C52 will get interrupted and jump to the location ‘0003H,’ where the execution is redirected to ‘receive’ sub-routine of the
program. The outputs from the subroutineare:
1. Toggle bit, which toggles (either ‘0’ or ‘1’) each time the button in a remote is pressed.
2. Address byte, whose value is zero for a normal Philips-type TV remote control (see Table III).
3. Control byte, which has a unique value for each button in the remote control (see Table IV).

CIRCUIT DIAGRAM


THE HARDWARE


Microcontroller AT89C52 is interfaced to DS12887 (RTC), a 16x2 LCD mod-ule and an 8255 programmable peripheral interface (PPI). The address-decoding circuitry comprises NAND gates 74LS00 and 3-to-8 line decoder 74LS138 as shown in Fig. 1. The interfacing circuitry for the external electrical appliances comprises Darlington array IC ULN2803. The addressing range of various peripheral devices is shown in Table I. In 89C52 (IC1), port P0 is used for outputing multiplexed address (lower8-bit) and data. The address is latched into 74LS573 (IC2) octal latch and RTC DS12887 (IC3) with the help of ALE (address latch-enable) output from pin 30 of IC1. Only two address lines from IC2 (A0 and A1) have been used for addressing the four registers of 8255 PPI (IC6) in conjunction with the chipselect signal at pin 6 (from IC4) and read/write signals from IC1. Higher-address bits from port P2 of IC1 (A8, A9 and A10 from output pins P2.0, P2.1 and P2.2) are used for generating the chipselect signals from 74LS138 (IC4) cover INg address ranges 000H-0FFH, 100H-1FF and 200- 2FF for RTC, LCD module and PPI chip, respectively. Quad NAND gate 7400 (IC5) in conjunction with read and write signals from IC1 and chip-select signal from pin 14 of IC4 is used for selecting the LCD module both during read and write cycles of IC1. PPI chip 8255 is configured with port A, port B and port C as output ports for controlling up to 24 electrical appliances via relays RL1 through RL24. Relays are energised through high-current octal Darlington arraysconjunction with the chipselect signal at pin 6 (from IC4) and read/write signals from IC1. Higher-address bits from port P2 of IC1 (A8, A9 and A10 from output pins P2.0, P2.1 and P2.2) are used for generating the chipselect signals from 74LS138 (IC4) covering address ranges 000H-0FFH, 100H-1FF and 200- 2FF for RTC, LCD module and PPI chip, respectively. Quad NAND gate 7400 (IC5) in conjunction with read and write signals from IC1 and chip-select signal from pin 14 of IC4 is used for selecting the LCD odule both during read and write cycles of IC1. PPI chip 8255 is configured with Port A, port B and port C as output ports for controlling up to 24 electrical appliances via relays RL1 through RL24. Relays are energised through high-current octal Darlington arrays inside ULN2803 (IC7 through IC9) in accordance with programmed data stored in the non-volatile RAM (NV RAM) of RTC chip DS12887. There is no need of connecting external freewheeling diodes across relays as inbuilt diodes are provided in ULN2803 ICs. All the 24 devices/electrical appliances are considered as 24 bits (threebytes at locations 200H, 201H and 202H) of the three ports (ports A, B and C) of 8255. The LCD is used for displaying real time (year, month, date, day and time in 24-hour mode) obtained from RTC DS12887 as also some other information during time setting, device programming, searching (device- switching programmed data), password entry, etc, as described later. RTC DS12887 is clock-cum-calendar chip with 128 NV RAM (14 bytes used fo its control registers and 114 bytes as general-purpose RAM). It has an inbuilt lithium battery and can retain stored data for over ten years in the absence of external power. Memory map of DS12887 is shown in Table V. Data stored in location 07FH (decimal 127) indicates the address of the last RAM location used.The relay-switching data that is output from ports A, B and C of the PPI is stored as consecutive bits at 00EH, 00FH and 010H locations of the RAM. The relay/device programming timing data is stored at five consecutive locations for each device. This data includes month, date, hour and minute in first four bytes, while the fifth byte contains 5-bit address of the device with MSB indicating ‘on’/‘off’ status of the device. Bits 6 and 7 of this byte are ‘don’t care’ bits. Address locations 123 through 126 are used for storing the 4-byte long password. Thus only 106 locations are available for storing the 5-byte long device data and as such the program for a maximum of only 21 devices out of 24 devices can be stored. The remaining three devices can be switched on/off through remote key operation as explained below. Bit P1.1 output of IC1 is fed to transistor BC547 (T1) through R5. Transistor T1 acts like a switch for LCD backlight. So you can switch the backlight of LCD ‘on’/‘off’ just by setting/resetting the P1.1 bit of 89C52. Power supply (Fig. 3). While most of the circuit requires regulated 5V for its operation, the relays and Darlington drivers IC7 through IC9 (ULN2803) are oper-ated with unregulated 12V DC supply. A step-down transformer rated at 15V AC secondary voltage at 500 mA is used to supply 12V unregulated and 5V regulated power to the circuit. The secondary output is rectified by 1A rated bridge rectifier BR1 and smoothed by 1000μF, 35V capacitor C10. The output from the capacitor isdirectly fed to all the relays and ULN2803 ICs. The same output is used for regulation by 7805 (IC10). The ripple in the regulator output is filtered by capacitor C11. An actual-size, single-side PCB for the re otely-programmable RTC-interfaced microcontroller for multiple device control and power supply circuits (Figs 1 and 3) is shown in Fig. 4 and its component layout in Fig. 5. The connections for relays are to be extended from the 16-pin FRC connectors on the PCB. Each connector is meant for extending connections to eight relays. The author’s prototype is shown in Fig. 6.

Remote key operations

Refer Table IV for details of remote buttons/keys. The functions of these keys follow: Keys ‘0’ through ‘9’, ‘--’ and ‘sfx’. Used to switch on/off the 24 devices manually. Each time you press any of these buttons, the status of the corresponding device will toggle, i.e., its output will be the complement of the previous state. Button ‘--’ is used as ‘10+’ button. When it is pressed, the system waits for around three seconds before the next button (which should be between ‘0’ and ‘9’ to determine the device between ‘10’ and ‘19’) is pressed. Similarly, ‘sfx’ is used as ‘20+’ key. The button following the ‘sfx’ button should be between ‘0’ and ‘3’ (as the project supports only 24 electrical appliances numbering ‘0’ through ‘23’).RCL. Turns the LCD backlight ‘on’/‘off.’ PWR. Used to change the 4-digit password (initial value ‘0000’). When you press this button, the system will ask for the existing password. If the correct password is entered, it will ask for the new password. If a wrong password is entered, ‘invalid’ message will flash on the LCD. Note that the password can be any 4-digit value, which need not be the numbers from ‘0000’ to ‘9999.’ Other buttons representing various codes are also accepted. Timer. Used to change the real time. As the circuit operations depend on the real (set) time, changing the same is password-protected. A valid 4-digit password will let you change/set the time. When you press ‘timer’ button, the top row on the LCD defines the format ‘Hr:Mn:ScWkDyMnYr.’ You need to enter the valid data as follows: Hr: 00 to 23 (24-hour mode) Mn: 00 to 59 minutes Sc: 00 to 59 seconds Wk: 01 to 07 (01 is Sunday) Dy: 01 to 31 dates Mn: 01 to 12 (01 is January) Yr: 00 to 99 (year) Any value out of the range will not be accepted and message ‘invalid value’ will be displayed on the LCD. Store. Enables/disables the child lock function. You can lock the remote keypad by enabling the child lock. When you press this button, the system will prompt the message ‘Lock?’ or ‘UnLock?’ depending on the present status of the child lock. If ‘1’ is pressed, the child lock feature is enabled/disabled. Any button other than ‘1’ will be treated as zero. PP. Takes you to programming of a task. If the NV RAM is full in DS12887, the message ‘prog memory full’ will flash on the LCD. If the memory is not full, a new device program is accepted by displaying a message in the first line of the LCD as ‘Mn Dt Hr:Mn Dv S’ and a blinking cursor will appear on the second line to take the data. ‘Mn’ indicates ‘month’ (‘01’ to ‘12’), ‘Dt’ indicates ‘date’ (‘01’ to ‘31’), ‘Hr’ indicates ‘hours’ (‘00’ to ‘23’), ‘Mn’ indicates ‘minutes’ (‘00’ to ‘59’), ‘Dv’ indicates ‘device number’ (‘00’ to ‘23’) and ‘S’ stands for ‘programmed status’ (‘1’ for ‘on’ or ‘0’ for ‘off’). Enter the desired data in this format, which will get stored in the NV RAM of the RTC. If month (Mn) is entered as ‘00,’ the same task will repeat every month on the same date and time. If date (Dt) is entered as ‘00,’ the same task will repeat every day on the same time. Search. Shows the existing device programs that are stored in the memory starting from location 011H onwards one by one. Each time, you need to press CH+/CH- button to move forward/ backward. In this mode, you may delete the displayed device program data entry simply by pressing ‘Mute’ button. Then the program that is residing next to this task moves to the location of the deleted task and the whole memory is refreshed. See the example shown above for clarity. The pointer value in memory location 007FH of DS12887 changes accordingly. AC. Deletes the entire programmed data in one stroke. So use this key very cautiously.

PCB LAYOUT FOR MULTIDEVICE CONTROL