Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD AND APPARATUS FOR PROGRAMMING A LOGIC BOARD FROM SWITCHING POWER
Document Type and Number:
WIPO Patent Application WO/2000/049262
Kind Code:
A1
Abstract:
A method of programming a controller (500) for a movable barrier operator (20) includes enabling and disabling an input device (32, 132) within a predetermined period of time, a predetermined number of times. This sequence of short activations of an input device (32, 132), such as a switch on a wall unit (32, 132), puts the controller (500) in a learn mode or a programmed state. Thereafter, the controller (500) is responsive to learn any of the various routines that can be programmed for the movable barrier operator (20), such as transmitter code, limits of travel, force settings, and so on.

Inventors:
VALENTE CHRISTOPHER M (US)
FITZGIBBON JAMES J (US)
SIEGLER MARK (US)
RATHGEBER MARTIN (US)
TAM RAMON (US)
Application Number:
PCT/US2000/004024
Publication Date:
August 24, 2000
Filing Date:
February 16, 2000
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
CHAMBERLAIN GROUP INC (US)
VALENTE CHRISTOPHER M (US)
FITZGIBBON JAMES J (US)
SIEGLER MARK (US)
RATHGEBER MARTIN (US)
TAM RAMON (US)
International Classes:
E05F15/16; E05F15/20; (IPC1-7): E05F15/10; G05B19/042
Foreign References:
US4465956A1984-08-14
US4896083A1990-01-23
US4695739A1987-09-22
Other References:
See also references of EP 1161609A4
Attorney, Agent or Firm:
Samples, Kenneth H. (Even Tabin & Flannery Room 1600 120 South LaSalle Chicago, IL, US)
Download PDF:
Claims:
WHAT IS CLAIMED IS:
1. A movable barrier operator, comprising: a motor; a transmission connected to the motor to be driven thereby and to the movable barrier to be moved; a control unit having a first input device and a second input device for providing first and second input commands, respectively; a controller, responsive to activation of the first input device for a first period of time for commanding the motor to operate in a first direction, responsive to activation of the second input device for a second period of time, for commanding the motor to operate in a second direction, and responsive to at least two activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than the first period of time and the second period of time, for enabling a learn mode.
2. The movable barrier operator of claim 1, wherein the control unit couples AC power to the motor upon activation of the first input device and the second input device.
3. The movable barrier operator of claim 1, wherein the controller, responsive to an activation within a defined period of time and having a duration less than the first period of time and the second period of time, stores a count of the activation.
4. The movable barrier operator of claim 3, wherein the controller, responsive to an activation of the first period of time or the second period of time, clears the count.
5. The movable barrier operator of claim 1, wherein the controller, responsive to at least three activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than the first period of time and the second period of time, for enabling a reset mode.
6. The movable barrier operator of claim 1, wherein the controller, responsive to at least three activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than the first period of time and the second period of time, for enabling a group control mode.
7. The movable barrier operator of claim 1, wherein the controller, responsive to at least three activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than the first period of time and the second period of time, for enabling a lock mode.
8. The movable barrier operator of claim 1, wherein the controller, responsive to at least three activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than the first period of time and the second period of time, for enabling a clear memory mode.
9. A movable barrier operator, comprising: a motor; a transmission connected to the motor to be driven thereby and to the movable barrier to be moved; a wall control unit having a first input device and a second input device for providing first and second input commands, respectively; a controller, responsive to activation of the first input device for a delay of at least one half second, for commanding the motor to operate in a first direction, responsive to activation of the second input device for a delay of at least one half second, for commanding the motor to operate in a second direction, and responsive to seven consecutive activations of one of the input devices, wherein each activation is within a defined period of time and has a duration less than one half second, for enabling a learn mode.
10. The movable barrier operator of claim 9, further comprising a counter for storing a count of each activation that is within three hundred milliseconds of another activation and is for a delay less than one half second.
11. The movable barrier operator of claim 10, wherein the controller, responsive to an activation of one half second or more, clears the counter.
12. The movable barrier of claim 9, wherein the controller, responsive to seven consecutive activations of one of the input devices, wherein each activation is within three hundred milliseconds of another activation and is for a delay less than one half second, for enabling a reset mode.
13. The movable barrier of claim 9, wherein the controller, responsive to five consecutive activations of one of the input devices, wherein each activation is within three hundred milliseconds of another activation and is for a delay less than one half second, for enabling a group control mode.
14. The movable barrier of claim 9, wherein the controller, responsive to twenty consecutive activations of one of the input devices, wherein each activation is within three hundred milliseconds of another activation and is for a delay less than one half second, for enabling a lock mode.
15. The movable barrier of claim 9, wherein the controller, responsive to fifty consecutive activations of one of the input devices, wherein each activation is within three hundred milliseconds of another activation and is for a delay less than one half second, for enabling a clear memory mode.
16. A method of programming a controller for a movable barrier operator, comprising: detecting activation of an input device; measuring the period of time of the activation of the input device; changing a count if the measured activation time period is less than a predetermined value and within a defined period of time; enabling a learn mode when the count is equal to a predetermined value; and activating a motor to move the barrier if the measured period of time is greater than the predetermined value.
17. The method of claim 16, further comprising the step of clearing the counter when the measured activation time period is more than the predetermined value.
18. The method of claim 17, wherein the predetermined value of the count is seven, the predetermined value is one half second, and the defined period of time is within three hundred milliseconds of another activation.
19. The method of claim 16, further comprising the step of enabling a reset mode when the count is seven, the predetermined value is one half second, and the defined period of time is within three hundred milliseconds of another activation.
20. The method of claim 16, further comprising the step of enabling a group control mode when the count is five, the predetermined value is one half second, and the defined period of time is within three hundred milliseconds of another activation.
21. The method of claim 16, further comprising the step of enabling a lock mode when the count is twenty, the predetermined value is one half second, and the defined period of time is within three hundred milliseconds of another activation.
22. The method of claim 16, further comprising the step of enabling a clear memory mode when the count is fifty, the predetermined value is one half second, and the defined period of time is within three hundred milliseconds of another activation.
23. A method of operating a controller for a movable barrier operator, comprising: providing a power line; using said power line as a binary data generator; supplying a controller capable of monitoring and decoding said binary data, wherein power on and off states serve as binary ones and zeros; and performing a mode of operation corresponding to the decoded binary data received.
24. The method of claim 23, wherein the mode of operation corresponding to the decoded binary data is a learn mode.
25. The method of claim 23, wherein the mode of operation corresponding to the decoded binary data is a reset mode.
26. The method of claim 23, wherein the mode of operation corresponding to the decoded binary data is a group control mode.
27. The method of claim 23, wherein the mode of operation corresponding to the decoded binary data is a lock mode.
28. The method of claim 23, wherein the mode of operation corresponding to the decoded binary data is a memory clear mode.
Description:
METHOD AND APPARATUS FOR PROGRAMMING A LOGIC BOARD FROM SWITCHING POWER BACKGROUND OF THE INVENTION This invention relates to a method and apparatus for programming and controlling a logic board for an electromechanical device such as a movable barrier operator using a two input command unit.

Many electromechanical devices, such as garage door operators and rolling shutter operators, employ simple wall or transmitter command units having only two types of input (open and close). Control of the operator is provided on a logic board, a board which contains the electronic circuitry (including a controller) for controlling operation of the motor driving the movable barrier. In a garage door operator or rolling shutter operator, commands are provided for open and close. Upon receipt of an open or close command, the controller enables the motor for movement in the commanded direction. In a garage door operator, a simple, momentary press of an open button or switch commands the door to move to the open limit position. In a rolling shutter operator, the user must press the open button or switch while the shutter is moving and release the button or switch when the shutter reaches the desired open position.

Many older garage door installations and rolling shutter installations are controlled by wall units having only open and close switches, which are hardwired into the wall. Newer garage door operators and rolling shutter operators provide additional features and include programming through either the wall switch or the remote transmitter. For example, many operators respond to transmitters with unique identification codes, provided the identification codes are programmed into the controller memory. To program a new transmitter, the

user must typically press a learn switch which places the controller in the learn mode, then activate the transmitter so that the controller receives the unique identification code. Many such units require a separate learn switch on the wall unit. If a user wishes to upgrade to a more advanced garage door operator or rolling shutter operator, i. e., one with additional functionality, the user many not wish to spend the additional cost of having to tear out existing wiring.

In order to change the mode of a logic board (or controller), most systems require the microprocessor to receive an input in the form of a signal. Since some logic boards only have power when the switch is closed (as is the case in rolling shutter operators), there is no power to the board after release of the switch. This creates a problem for entering the program or learn mode when there is no power applied to the logic board. A system which enables the user to enter the program or learn mode by using the AC power lines solves the problem of having to provide additional components or wiring to the board in order to sustain power just for the unit to be able to enter the program or learn mode.

Several manufacturers of rolling shutter operators and garage door operators provide units which can be programmed from the wall unit. However, many of these units require non-retrofit of a special wall switch which operates on low voltage power, not standard AC wall power (such as those by Simu and Jolly). Another manufacturer provides a special wall control unit which operates on AC power, but is a nonstandard switch (Elero).

There is a need for a method of programming a logic board (or controller) for an electromechanical device such as a movable barrier operator using an existing two input command unit. There is a need for a method of programming a controller for an electromechanical device such as a rolling shutter operator or awning operator which operates from the existing standard industry two

switch AC wall unit. There is a need for a method of programming an electromechanical device which generally has no power applied to it.

SUMMARY OF THE INVENTION A method of programming a controller for a movable barrier operator according to the invention includes enabling and disabling an input device within a predetermined period of time for a predetermined number of times. This sequence of short activations of an input device, such as a switch on a wall unit, puts the controller in a learn mode. Thereafter, the controller is responsive to learn any of various characteristics that can be programmed for the movable barrier operator, such as transmitter code, limits of travel, force settings, and so on.

In a movable barrier operator, such as for a rolling shutter, the wall control unit includes two input devices, which may be switches, one for the shutter open direction and one for the shutter close direction. When the user wishes to open the shutter, the user presses the open switch. This causes AC power to be applied to the logic board controlling the power to the motor that operates the shutter. The user must hold the open switch until the shutter reaches the desired open location.

Releasing the open switch removes AC power from the logic board and the motor and stops the shutter. Similarly, when the user desires to close the shutter, the user must press and hold the shutter close switch applying power to drive the motor to close the shutter until the desired close position is reached. Upon reaching the desired close position, the user releases the close button, removing AC power and stopping the motor.

Pressing of the open switch or the close switch is required to apply AC power to the controller. Continued closure of a switch is associated with movement of the

motor and shutter. To enable programming of the controller using the wall switches, the controller checks for a series of pulses from one of the wall switches.

When, for instance, the user presses and releases the open switch, five consecutive times each for less one half second, the controller increments a counter with each press. So long as the duration between press and release is less than a half second, the counter is incremented. When the counter value reaches five, the controller enters a learn mode. If at any time the user presses the switch for longer than one half second, the controller zeroes the counter and responds to a movement command.

In a movable barrier operator such as garage door opener in which the controller unit is powered at all times, the controller unit can also be programmed using the method of the invention. In the case of a garage door operator activated by a single button wall control unit, typically only a momentary activation (press and release) of the switch causes the door to travel to the selected limit (open or close). To implement the method of the invention, the controller for the garage door operator would be programmed to look for a fixed, but longer duration pulse resulting from switch closure for the movement command. For example, if five consecutive pulses produced by press and releases of less than one half second are used to enter the learn mode, a one second pulse from a press of one second could be used to clear the wall control command counter and activate door movement in the desired direction.

Instead of a standard two button wall control unit, some movable barriers have a single switch with three states: up, down, not traveling. The method described above is equally applicable. An advantage of the invention is that no additional wiring is needed for existing installations. All modifications are accomplished in the controller either in circuitry or

software.

If the movable barrier operator includes a receiver for receiving commands from a remote transmitter, the method can also be used. Instead of activating the wall switch the predetermined number and duration of wall control pulses generated by presses and releases, the user would activate the transmitter button the same number and duration of time.

In many applications where the mode of the controller or logic board must be programmed by an external system, such as by pushing a button, through a software interface, or via a physical change in the surrounding environment, etc., programming the controller from AC power line eases the programming scheme for the user, the installer and the manufacturer.

In a further embodiment, the AC power line may also be used to transmit operation instructions to a movable barrier operator. For example, group control of a plurality of rolling shutters may be achieved by using the controller or logic board of the rolling shutter unit to monitor the power line for, and receive, a series of binary digits generated by the activation and release of one of the wall control input switches. More particularly, the wall control input switch can be used to toggle the power line on and off to generate a series of binary ones and zeros, (e. g., power on is a binary one or high signal, and power off is a binary zero or low signal). Upon receipt of such a series of ones and zeros, the controller can decode the binary data and perform the function or operation attributed to such input. In order to limit the risk of accidental data reception, the controller can be designed so that only activations within a defined period of time that last for a duration of time less than the normal motor operation command will trigger the controllers performance of a particular function or operation. In order to achieve group control of a plurality of rolling shutters, the

wall switch may be activated five times with each activation being within three hundred milliseconds of another, and the duration of the activation being below the half second of activation which causes the controller to operate the motor in a specified direction. The number of activations it takes to enter a particular mode of operation is not critical. For example, the learn mode may be entered upon seven activations of the input switch. In some instances, a uniform number of switch activations may be used to perform different operations.

For instance, there may be no need to have the learn mode occur after five switch activations and the reset mode after nine switch activations. Therefore, the controller would both reset the movable barrier operator and enter a learn mode together after seven activations of the input switch.

Similarly, other embodiments of the invention would include entering the movable barrier operator into a lock mode after twenty activations of the input switch. Such a mode of operation would allow the user to lock movement of the movable barrier until the release mode is entered.

The release mode can be entered by simply activating the input switch twenty more times. A memory clear mode could be entered by activating the input switch fifty times. Such a mode of operation would allow a user to clear all memory of such things as up limits and down limits in a rolling shutter.

Additional advantages and features of the invention may be appreciated from the written description set forth below and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a perspective view of a garage door operating system in accordance with an embodiment of the invention; Fig. 2 is a perspective view of a rolling shutter

operating system in accordance with an alternative embodiment of the invention; Fig. 3 is a perspective view of the tubular motor assembly of Fig. 2; Figs. 4 and 5 are two exploded perspective views of the location of the absolute position detector assembly shown in Fig. 3; Fig. 6 is a schematic diagram of the electronics controlling the rolling shutter head unit of Fig. 2; Figs. 7A-7C are a flow chart of an overall routine for operating and controlling a movable barrier operator; and Figs 8A-8C are a flow chart of the timer interrupt routine called in the routine of Fig. 7.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Referring now to the drawings, and especially to Fig. 1, a movable barrier operator embodying the present invention is generally shown therein and identified by reference numeral 10. The movable barrier operator 10 is employed for controlling the opening and closing of a conventional overhead garage door 12 of a garage 13. The garage door 12 is mounted on guide rails 14 for movement between the closed position illustrated in Fig. 1 and an open or raised position. The garage 13 includes a ceiling 16 and a wall 18 defining an opening blocked by garage door 12. As shown, guide rails 14 are mounted to wall 18 and ceiling 16 of the garage 13 in a conventional manner.

A power drive unit or head, generally indicated at 20, is mounted to the ceiling 16 in a conventional manner. A drive rail 22 extends between the power drive unit 20 and the garage wall 18. As can be seen in Fig. 1, one end of the drive rail 22 is mounted to a portion of the garage wall 18 located above the garage door 12. An operator arm 26 is connected at one end to the garage door 12 and at the other end to a trolley 28

mounted for movement back and forth, along the drive rail 22. As will be seen herein, a motor in the power drive unit 20 propels the trolley 28 in a desired manner to raise and lower garage door 12 via the coupling of the trolley 28 and the operator arm 26 to the garage door 12.

A conventional one-button push button wall control unit 32, is coupled by electrical conductors 34 to the power drive unit 20 and sends signals to the power drive unit 20, controlling operation of a drive motor therein.

Preferably, the power drive unit 20 also includes a conventional radio receiver (not shown) for receiving radio signals from a remote control transmitter 38.

Referring now to Fig. 2, a barrier operator system 100 employing an absolute position detector is employed for controlling the opening and closing of a conventional rolling shutter 112. The rolling shutter is mounted on guide rails 114 for movement between the closed position illustrated in Fig. 2 and an open or raised position.

The wall 118 defines an opening that can be blocked or covered by the rolling shutter 112. As shown, guide rails 114 are mounted to wall 118 in a conventional manner.

A power drive unit or head, generally indicated at 120, is mounted to the top of frame 110 in a conventional manner. Although the head unit is shown as being mounted on the exterior, as noted above, in many applications, the head unit is built into the wall so that the user sees only the shutter. In the two views shown in Fig. 2, the head unit 120 is shown mounted on opposite sides of the top of frame 110. As will be seen herein, a motor in head unit 120 propels a shutter carrying sleeve or tube 142 to raise and lower rolling shutter 112 via the connection of sleeve 142 to rolling shutter 112.

Control for head unit 120 may be as described above for garage door operator 20, i. e., using a push button wall control or a keypad mounted at another location on a wall. A conventional two button wall control unit 132 is

connected via three wires: up, down, neutral (built into the wall and shown in dotted form) to head unit 120.

Wall control 132 includes a shutter open button or switch 132A and a shutter close button 132B. Wall control 132 is connected to AC power and provides power to head unit 120 when one of buttons 132A or 132B is pressed and held.

Additionally, head unit 120 may also include a conventional radio receiver (not shown) for receiving radio signals from a remote control transmitter. If desired, the head unit 120 may be mounted on either side of the frame 110. However, a conventional radio receiver requires power in order to receive a signal from a remote transmitter.

As shown in Figs. 3,4 and 5, head unit 120 includes a tubular housing 138 and end sections 122 and 134.

Within the tubular housing 138 is the motor 130 which includes an output shaft 131 coupled at one end to end section 134 and at the other end to driving gear assembly 132. The output from gear assembly 132 is provided to an output ring 140, which is fixedly attached to outer sleeve 142. A rolling shutter is attached to the outer sleeve 142, so that when motor 130 runs, outer sleeve 142 rotates, causing the rolling shutter 120 to open or close (depending on the direction of rotation of motor 130).

Outer sleeve 142 is also fixedly attached to a ring 136. Ring 136 drives position detector assembly 124.

Position detector assembly 124 is electrically coupled to a control board 144. Control board 144 contains the electronics for starting and controlling the motor 130 (see Fig. 6). A capacitor 126 is used to start motor 130 (described below). A brake 128 is provided to slow motor 130 when the rolling shutter is approaching a limit position. Position detector assembly 124 may be a pass point assembly as described in application no. (attorney docket 64234) assigned to the assignee of this application or an absolute position detector assembly as described in application no. (attorney docket 65468)

assigned to the assignee of this application.

A schematic of the control circuit located on control board 142 is shown in Fig. 6. A controller 500 operates the various software routines which operate the rolling shutter operator 120. Controller 500 may be a Zilog Z86733 microcontroller. In this particular embodiment, the rolling shutter is controlled only by a wall or unit mounted switch 132 coupled via a connector J2. Connector J2 has inputs for up switch hot and down switch hot signals. In a rolling shutter apparatus, the motor moves only when the user presses the combination power direction switch connected to connector J2.

Pressing the up or down switch simultaneously applies power to the motor via connector J1 and provides various motor phase and direction information to the controller 500.

However, the control circuit can be modified to include a receiver so that the rolling shutter can be commanded from a remote transmitter (as described above).

Power supply circuit 190 converts AC line power from connector J2 into plus 5 volts to energize the logic circuits and plus 16 volts to energize the motor.

Upon receipt of a rolling shutter movement command signal from either 132A or 132B through J2, the motor is activated. Upon receipt of programming or learn commands from either 132A or 132B (described below), controller 500 enters an appropriate learn routine. Feedback information from the motor and AC power is provided from J1 and applied to U3: A, U3: B, U3: C and U3: D. The outputs from U3: B and U3: D provide up and down phase information to pins P26 and P25 respectively. The outputs from U3: A and U3: C provide up and down direction to pins P21 and P20, respectively.

In this particular embodiment, an absolute position detector comprising three wheels: clock, wheel 31 and wheel 32 is shown in Fig. 6. Crystal CR1 provides an internal clock signal for the microprocessor 500. EEPROM

200 stores the bit stream data, sliding window information, current bit information and lookup table.

The IR signal break from clock wheel drives Q5 which provides it input to P31. Wheel 31 drives Q4 which provides its input to P30. Wheel 32 drives Q3 which provides its input to P33. The inputs from the absolute position detector provide an absolute position of the shutter to the controller.

The preferred method of the invention will be described, for convenience, with reference to a rolling shutter controller, i. e., one which requires activation of the wall control switch for application of power.

Referring to Figs. 7A-7C, the main motor control routine running in controller 500 begins with step 300.

Step 300 begins whenever power on reset or stop mode recovery is enabled, or the watch dog timer times out.

In step 302, the watch dog timer period is set to 100 milliseconds. An internal RC timer circuit is used instead of a looping counter run by the controller to save processing steps. In step 304 all controller ports are initialized. Specifically, referring to Fig. 6, ports or pins P30 (input from wheel 31 in the absolute position detector 124), P31 (input from the clock wheel in the absolute position detector 124) and P33 (input from wheel 32 in the absolute position detector 124).

Absolute position detector 124 provides a signal which is indicative of the absolute position of the shutter in all its travel between limits. If a pass point assembly is utilized instead of an absolute position detector, the ports initialized would receive signals pertaining to whether the pass point had been passed, whether the shutter was above or below the pass point and information about RPM pulse.

In step 306, internal RAM is tested, then cleared to zero. If there is an error in RAM, then the routine loops until the watchdog timer resets in step 310 (100 ms time out from the RC timer). If there is no error, in

step 308 the routine completes a checksum and compares it to a stored sum. If there is no match, the routine loops until the watchdog timer resets in step 310 (100 ms time out from the RC timer). If the sums match, the routine initializes all timers and reinitializes the ports (P30, P31, P33) in step 312.

In step 314 all interrupt priorities are setup, the selected edges of the various input signals for response are initialized and all standard interrupts (RPM and TimerO) are initialized. The RPM interrupt runs every time the motor generates an RPM signal. The TimerO interrupt checks for a pulse indication of a tap (press and release less than one half second) or command input.

In step 316 all variables are set to their initial values. In step 318 the routine reads the stored limits from memory, the current position stored in memory and mode flags (indicating mode of operation, e. g., run or learn) from memory and initializes temporary registers.

In step 320 the routine checks if the reset flag is set. If yes, the routine branches to the pass point reset mode in step 326 if a pass point assembly is installed for 124. If an absolute position detector assembly is installed, step 326 would read the position in the detector and reset the values stored in memory.

If the reset flag is not set, the routine checks if the learned flag is less than 2. The learned flag stores a value indicating the learn mode has been entered. If the learned flag is greater than or equal to 2, the routine checks the value in the tap counter in step 324.

The tap counter, tap counter, is a counter which stores the number of times the counter has received pulses indicating that the user has pressed and released the input switch for the predetermined time period. If the value in the tap counter is not equal to 5 in step 324, this means the user has activated the input device to command a shutter movement and the routine branches to the normal operation loop at step 334.

If the tap counter is equal to 5, the routine stores the learned flag with the value 1 and writes the value to memory at step 336, indicating a learn mode has been entered. Then the routine branches to the learn routine at step 338.

If the learned flag is less than 2 at step 322 the routine checks if the value of the tap counter is equal to 9 at step 328. This means, in Learn mode, the Tap_Counter is read to assure that the count is not at 9 times. If the count is at 9 times, the user is putting the controller in reset mode. The Reset_Flag is set and this flag value is written to memory in step 330. Then in step 336 the routine calls the pass point reset routine in step if a pass point assembly is installed or calls the absolute position routine if that assembly is installed. If the tap counter is not equal to 9, the routine branches to learn mode at step 329.

After initialization as described above, the TimerO interrupt (or TO interrupt) is enabled and occurs once every one millisecond. When the TO interrupt is called each 1 ms, referring to Figs. 8A-8C, it begins at step 342 by incrementing a Delay Timer. The Delay Timer is used to count time in the main loop or other routines.

Then the routine checks if the start flag = 1. If not, the routine returns at step 346. If yes, the routine checks if power input is high in step 348. If power is not high, the routine increments the OFF LFC (the power line off sampler), which measures the time power has been removed, such as by releasing the input switch. In step 356 if the OFF LFC is not greater than or equal to 22, the timerO interrupt is exited at step 358. If the OFF LFC is greater than or equal to 22, the routine clears the OFF LFC and clears the direction debounce flags at step 370. At step 384 the routine checks if the power debounce is greater or equal to 3. If greater than or equal to 3, the routine clears the power debounce and the interrupt returns. If not, at step 388 the routine

clears the power debounce, disables the TimerO interrupt, writes the value in the tap counter to memory, then enables the timerO interrupt, loads the stop flag with 1 and returns to the beginning of the TimerO interrupt.

In step 348, if power input is high, the routine increments the power line sampler and clears the OFF LFC at step 352. Next, at step 354, the routine checks if the motor is on. If yes, the timerO routine ends at step 358. If not, the routine checks if the UP input is high at step 360. If yes, the routine increments the UPLFC and continues to step 368. If not, the routine checks at step 362 if the down input is high. If not, the routine continues to step 362. If yes, the routine increments the DOWN LFC.

At step 368 the routine checks the value of the POWER LFC. If it is not equal to 4, it returns at step 372. Then the routine checks if the power debounce is at 22 at step 376. If yes, it branches to step 390. If not, it increments the power debounce at step 378. The routine then checks if the power debounce is at 3 in step 380. If not, it branches to step 390. If yes, the routine increments the tap counter at step 382 and continues to step 390.

At step 390 the routine checks if the UP LFC (the up direction sampler) is greater than or equal to 4. If not, the routine checks if the DOWN LFC is greater than or equal to 4 at step 392. If not, the routine branches to step 410. If yes, the routine checks if the DOWN DB is at 255 in step 394. If yes, the routine branches to step 410. If not, the routine clears the UP debouncer and decrements the down debouncer in step 398. Then the routine checks if the down debouncer is at 22 in step 4006. If not the routine branches to step 410. If yes, the routine sets the DOWN DB to 255 and clears the TAPCNTR. This indicates the user has pressed the down or close switch long enough to enable a movement command.

If the UP LFC is greater than or equal to 4, the

routine checks if the UPDB is at 255 at step 396. If yes, indicating the user has pressed the up or open switch long enough to enable a movement command, the routine branches to step 410. If not, the routine clears the down debouncer and increments the up debouncer at step 400. At step 402 the routine checks if the UP DB is at 4. If not, the routine branches to step 410. If yes, the routine sets the UP DB to 255 and clears the tap counter at step 404. At step 410 the routine checks if the DOWN DB = 255. If not, the routine checks if the UP DB = 255 at step 414. If yes, the routine sets the UPANDDOWN flag to 1 at step 416 and returns at step 418. If the DOWN DB = 255, the routine sets the UPANDDOWN flag to 2 at step 412 and returns at step 418. The UPANDDOWN flag is used to keep track of which direction is being requested for travel. UP is 1; DOWN is 2.

Exhibit A (pages A1-A13) attached hereto include a source listing of a series of routines used to operate a movable barrier operator in accordance with the present invention.

As will be appreciated from studying the description and appended drawings, the present invention may be directed to operator systems for movable barriers of many types, such as fences, gates, overhead garage doors, and the like.

While there has been illustrated and described a particular embodiment of the present invention, it will be appreciated that numerous multiple embodiments will occur to those skilled in the art, and it is intended in the appended claims to cover all those changes and modifications which followed in the true spirit and scope of the present invention.

EXHIBIT A <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> Last Modified Feb 11, 1999.<BR> <BR> <BR> <BR> i This is the Code for the new Tubular<BR> <BR> <BR> <BR> Motor logic board using a triac.<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <P>*************************************************** *********************<BR> **** ; t Equate Statemeats t ;*********************************************************** ************* **** globals on <BR> <BR> <BR> <BR> <BR> <BR> P01M_INIT .equ 00000100B<BR> <BR> P2MINIT.equ01100011B<BR> <BR> <BR> <BR> <BR> P3 :INIT. equ 00000001B P01S_INIT .equ 00001010B P2SINIT. equ OOOOOOOOB<BR> <BR> <BR> <BR> P3S_INIT. equ OOOOOOOOB P2M_EEOUT .equ 11111011B ; Mask for outputticg data to EEPROM P2M_EEIN .equ 00000100B a Same for input ;----------------------------------------------------------- ------- ---- GLOBAL REGISTERS <BR> <BR> <BR> ------..-----........................................<BR& gt; <BR> <BR> <BR> <BR> <BR> <BR> <P>****<BR> <BR> <BR> <BR> ;**********************************************************& lt;BR> ****<BR> <BR> <BR> ; LEARN EE GROUP REGISTERS FOR LOOPS ECT ;*********************************************************** **** LEARNEE_GRP .equ 20H P2M_SHADOW .equ LEARNEE_GRP+0 ; Mask for mode of P2 TEMP. equ LEARNEEGRP-)-2 HTEMPH .equ LEARNEE_GRP+6 ; memory temp MTEMPL .equ LEARNEE_GRP+7 ; memory temp MTEMP. equ LEARNEE_GRP+B memory temp SERIAL. equ LEARNEEJ3RP+9 ; aerial data to and from nonvol memory ADDRESS .equ LEARNEE_GRP+10 ! address for the serial nonvol memory temp . equ r2; match. equ r6 memory temp mtempl .equ r7 ; memory temp mtemp. equ r8 ; memory temp serial. equ r9 ; serial data to and from nonvol memory address. equ r10 ; address for the aerial oonvol memory ;*********************************************************** MAIN_GRP .equ 30H OP_LIMIT_H. equ MAIN_GRP+0 ; upper limit high byte UP_LIMIT_L .equ MAIN_GRP+1 ; upper limit low byte UPLIMIT. equ MAIN_GRP+0 ; upper limit word DOMHLIMITH. equ MAIMGRP-2 lower limit high byte<BR> <BR> <BR> <BR> DOWN_LIYIT_L. equ MAIN_GRP+3 t lower limit low byte DOWN_LIMIT .equ MAIN_GRP+2 ; lower limit word POS_CNTR_H .equ MAIN_GRP+4 ; position counter high byte POS_CNTR_L .equ MAIN_GRP+5 ; position counter low byte POS_CNTR .equ MAIN_GRP+4 ; position counter PP_DIST .equ MAIN_GRP+6 ; is 180.

HALF_PP_DIST .equ MAIN_GRP+7 ; 80 POS_CNTR_TEMP_H .equ MMNGRPi9 temp counter for FIRST. TIME POS_CNTR_TEMP_L .equ MAIN_GRP+9 ; temp counter for FIMTJTIHE POS_CNTR-TEMP .equ MAIN_GRP+8 ; temp counter for FIRST_TIME UP_AND_DOWN .equ MAIN_GRP+10 ; (A) tells us if up or down or both buttons are pushed.

RESET_FLAG .equ MAIN_GRP+11 ; (B) tells us if reset is pushed UPDEBOUNCER. equ MMNORP+l2 (Ct up debouncer DOWN_DEBOUNCER .equ MAIN_GRP+13 ; (D) down debouncer POWER_DEBOUNCER .equ MAIN_GRP+14 ; (E) power debouncer TAP_CNTR .equ MAIN_GRP+15 ; (F) tap counter<BR> <BR> <BR> AlltntOn .equ MAIN-GRP+16 ; (0) sets up interrupts<BR> <BR> <BR> <BR> <BR> OFFFC.equMMNGRP17(1)offpowerlineMmpler.

LP_TIMER .equ MAIN_GRP+18 ; (2) Line Filter Timer VP_LFC. equ MAmGRP+19 (3) up direction eempler DOWN-LFC equ MAIN_GRP+20 ; (4) down direction sampler POWER_LFC .equ MAIN_GRP+21 ; (5) power line sampler.

MOTOR_FLAG .equ MAIN_GRP+22 ; (6) Used for a counter/timer.

LEARNED .equ MAIN_GRP+23 (7) Tells us if first time<BR> <BR> <BR> PPOINT .equ MAIN_GRP+24 ; (8) high if pass point seen RPM_DEBOUNCER_H .equ MAIN_GRP+25 ; (9) RPM signal high debouncer.

IR_TIMER .equ MAIN_GRP+26 ; (A) timer for triac enable delay STOPFLAO. equ MAIN_GRP+27 ; (B) tells main loop to stop START_FLAG .equ MAIN_GRP+28 ; (C) flag to start power sampling PP_DEBOUNCER_H .equ MAIN_GRP+29 ; (D) pass point signal high debouncer.

PP-DEBOUNCER-L .equ MAIN_GRP+30 ; (E) pass point signal low debouncer.

RPM_DEBOUNCER_L .equ MAIN_GRPt31; (F) RPM atonal low debouncer.

UP_LIMIT_FLAG. equ HAIN GRP+32 hit up limit flag.<BR> <BR> <BR> <BR> <P>MMMLIKITPLAG. equ MAIN_GRP+33 X (1) hit down limit flag.

STALL_FLAG .equ MAIN_GRP+34 ; (2) no pulses for 2 sec.

RPMPULSE. equ MAIN_GRP+35 ; (2) =100ms pulse after travel.

;***************************************************** CHECK_GRP .equ 70H check_sum_value .equ 018H check_sum .equ r0 romdata. equ rl teat_adr_bi equ r2 test_adr_lo. equ r3 test-ad .equ rr2 STACKEND. equ OAOH start of the stock STACKTOP. equ 238 end of the stack<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> csh. equ OOO10000B s chip select high for the 93c46 csl. equ 11101111B ; chip select low for 93c46 clockh .equ 00001000B ; clock high for 93c46 clockl . equ 11110111H ; clock low for 93e46 doh. equ OOOOOl00B t data out bigh for 93c46 dol .equ 11111011B ; data out low for 93c46 pemaak .equ 01000000B ; mask for the program switch csport .equ P2 ; chip select port<BR> <BR> <BR> <BR> dioport equ P2 t data i/o port<BR> <BR> <BR> <BR> <BR> clkport equ P2 ; clock port sport .equ P2 ;program switch port MemaEyTintr<quS6 WATCHDOG_GROUP .equ OFH PCON .qu r0<BR> <BR> <BR> <BR> SMR. equ rll WDTMR .equ r15 FILL .macro <BR> <BR> . byte OFFh<BR> <BR> <BR> <BR> <BR> . endm FILL10macro . byte OFFh . byte OFFh . byte OFFh .byte OFFh . byce OFFh . byte OFFh <BR> . byte OFFh<BR> <BR> <BR> <BR> <BR> . byte OFFh<BR> <BR> <BR> <BR> <BR> . byte OFFh<BR> <BR> <BR> <BR> <BR> . byte OFFh<BR> <BR> <BR> <BR> <BR> .adm FILL50 .macro . byte OFFh .byte 0FFh .byte 0FFh .byte 0FFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh .byte 0FFh . byte OFFh .byte 0FFh .byte 0FFh .byte 0FFh .byte 0FFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh .byte 0FFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh .byte 0FFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh byte 0FFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh . byte OFFh .endm TRAP. macro jp start jp start jp start jp start jp start .endm TRAP10.macro <BR> <BR> <BR> TRAP<BR> TRAP<BR> <BR> TRAP<BR> <BR> <BR> <BR> TRAP TRAP TRAP TRAP TRAMP TRAP TRAP TRAP .enduro ;*********************************************************** ********* <BR> <BR> <BR> <BR> <BR> <BR> *<BR> ;*<BR> <BR> ;* Interrupt Vector Table <BR> <BR> !'<BR> <BR> <BR> <BR> Table<BR> <BR> <BR> ;*<BR> ;*********************************************************** *********** <BR> * <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> . org OOOOH . word TIMER1_INT ;IRQ0, P3.2 . word TIMER1_INT ;IRQ1, P3.3 . word TIMERl. IRQ2. P3.1 . word TIMER1_INT ; IRQ3, P3.0 . word TIHEROIt!T}IRQ4.TO . word TIMER1_INT <IRQ5. T1 .page . org OOOCH ;*********************************************************** ************** <BR> <BR> *<BR> <BR> <BR> <BR> <BR> REGISTER INITILIZATION .

* tart: START: di; turn cff the interrupt for init ld RP.#WATCHDOG_GROUP ld WDM, 000000111B ; re dog lOOmS clr M'tcle)u'th*reaittwrpointer Mut ; kick the dog xor P2, tlOOOOOOOB) i toggle pin 3.

;******************************************************** ******** <BR> <BR> s<BR> <BR> <BR> <BR> <BR> ;* PORT INITIALIZATION<BR> ;*********************************************************** *****<BR> <BR> <BR> * ld P01M, #P01M_INIT ; set mode p00-p03 out p04-p07in ld P3M, #P3M_INIT ; set port3 p30-p33 input analog mode <BR> <BR> <BR> ; p34-p37 outputs<BR> ld p3<-p37outputs<BR> <BR> ld P2M, &num P2M_INIT ; set port 2 mode<BR> <BR> <BR> ld P2M_SHADOW, &num P2M_INIT ; Set readable register ld P0, #P01S_INIT ; RESET all ports ld P2, <P2SINIT ld P3, *P3SINIT; * ;* Internal RAM Test and Reset All RAS = mS * <BR> <BR> <BR> * * jp STACK srp OFOH; POINT to control register group ld rl5, §4; rl5= pointer (minimum of RAM) witeagain: WDT ; kick the dog xor P2, flOO00000B toggle pin 3. ld r14, &num 1 writeagainl: ld #r15, r14 ; write 1, 2, 4. 8, 80 cp r14, #r15; than compare jp ne, ayBt rror rl rl4 jP nc, write_againl clr orles t write RAM(r5) = 0 to memory<BR> <BR> <BR> inc r15 cp r15, #240 jD ult, write_again ;*********************************************************** ******** * <BR> <BR> <BR> <BR> ;* Checksum Test<BR> ;*********************************************************** ***** * CHECKSUMTEST: srp #CHECK_GRP ld test_adr_hi, #0FH ld test_adr_lo, #0FFH ; maximum address=fffh add_sum : <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> WDT ;kick the dog<BR> <BR> <BR> xor P2, &num 10000000B ; toggle pin 3.<BR> <BR> <BR> <BR> ldc rom_data, #test_adr ;read ROM code one by one<BR> <BR> <BR> <BR> add chek_sum, rom_data;add it to checksum register<BR> <BR> <BR> <BR> decw test_adr ;increment ROM address<BR> <BR> <BR> jp nz, add_sum ; address=0 ?<BR> <BR> <BR> <BR> <BR> cp check_sum, &num check_sum_value<BR> <BR> <BR> jp z, system_ok scheik final ckecksum = 00 ? system_error: <BR> <BR> <BR> <BR> <BR> <BR> and P0, &num lllll0llB ; turn on the led<BR> <BR> <BR> <BR> jp system_error .byte 256-check_sum_value <BR> <BR> <BR> <BR> <BR> system_ok :<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> WDT t kick the dog xor P2, #10000000B ; toggle pin 3. ld STACKEND, #STACKTOP ; start at the top of the stack BETSTACKLOOP: ld #STACKEND, #01H , set the value for the stack vector dec STACKEND ; next address cp STACKEND, #STACKEND ; test for the last address jp nz, SETSTACKLOOP ; loop till done _stressrissis r<BR> <BR> <BR> <BR> <BR> ;*STACK INITILIZATION<BR> .*********************************************************** ****<BR> <BR> <BR> *<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> STACK: NDT ß kick the dog xor P2, #10000000B ; toggle pin 3. clr 254 ld 255, &num 238 ; set the atari of the stack<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> esrasi<BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> ;*TIMER INITILIZATION<BR> <BR> <BR> <BR> setessss TIMER: ld PRE0, #00010001B ; set the prescaler to 1/4 for 250Khz ld T0, &num 0PAH ; set the counter to count 250 to 0 {X0s ld PRE1, #11111100B ; set the prescaler to 1/63 for 16Khz ld T1, #0FFH ; set the counter to count 256 to 0 (T1=16ms) ld TMR, #00000111B ; load timers with initial values.

************************************************************ * <BR> <BR> <BR> <BR> ; @PORT INITIALIZATION<BR> ; ************************************************************ *******<BR> <BR> <BR> * ld P01M, #P01M_INIT ; set mode p00-p03 out p04-p07in mode ld P3M, #P3M_INIT ; set port3 p30-p33 input analog mode t p34-p37 outputa ld P2M, #P2M_INIT ; set port 2 mode ld P2M_9HADOW, #P2M_INIT ; Set readable register ld P0, P01S_INIT ; RESET all ports ld P2.ttP2SINITt ld P3,1P39_INIT <BR> <BR> <BR> <BR> <BR> <BR> Id » #P3S-lNlT * INITERRUPT INITILIZATION ;*********************************************************** * <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> *<BR> SETINTERRUPTS : ld IPR, #00101101B ; set the priority to RPM ld IMR, &num 01010000B ; set IMR for TO interrupt only ld IRQ, IOJOOOOOOB 1 set the edoa, clear int ;***************************************************** * ; SET SMR & PCON ;****************************************************** <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> ld RP, &num WATCEDOG_GROUP<BR> <BR> <BR> <BR> <BR> ld SMR, OOOllllOB recovcry source w P2 NOR 0: 7<BR> <BR> <BR> <BR> ld PCON, #10010110B i reset the pcon no comparator output ; STANDARD Mi mode elr RP <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> ;*********************************************************** ***<BR> <BR> <BR> *<BR> <BR> <BR> <BR> <BR> ; VARIALBE INITILIZATION<BR> sEs INITILIZATION<BR> <BR> <BR> <BR> <BR> <BR> *<BR> ;**********************************************************& lt;BR> *<BR> <BR> <BR> <BR> <BR> <BR> <BR> ld UP_LIMIT_H, &num 01<BR> <BR> <BR> ld UP_LIMIT_L, &num 00 ld DOKNHMITH, t255 ld DOWN_LIMIT_L, #00 ld POS_CNTR_H, #00 ld POS_CNTR_L, #00 Id POS_CNTR_TEMP_H, #00 ld POS_CNTR_TEMP_L, #00 ld LF_TIMER, #00 Id OFF_LFC, #00 ld UP_LFC, §00 ld DOWN_LFC, #00 ld POWERLFC, #00 ld MOTORFLAG, 000 ld LEARNED, #02 ld APPOINT. tOO ld IRJTIMER, 100 ld STOP_FLAG, #00 ld STARTFLAG, 100 ld UP_AND_DOWN, #00 ld RESET_PLAG, &num 00 ld UP_DEBOUNCER, #00 ld DOMHDEBOUTJCER. 100 ld POWER_DEBOUNCER, &num 00 Id TAP CNTR. 100 ld UP_LIMIT_FLAG, #00 ld DOMNLIMnFLAG. §00 ld PP_DEBOUNCER_L, #00 ld RPM_DEBOUNCER_L, #00 ld STALL_FLAG, #00 ld RPM_PULSE, #00 ld TEKP. 100 ld MTEMPH. 100 Id HTEMPL, #00 ld MTFMP, #00 ld SERIAL. #00 ld ADDRESS, 100 ld PP_DIST, &num 180 ld HALF_PP_DIST, #79 ld AllIntOn, &num 01010000B ; just enable timer at first ld PP_DEBOUNCER_H, &num 31 ld RPM_DEBOUNCER_H, #11 ;******************************************************** * <BR> <BR> <BR> <BR> <BR> <BR> <BR> ; READ THE MEMORY 2X<BR> <BR> <BR> ;********************************************************< ;BR> ei WAITBEFOREREADING: cp LF_T=tER, §20 jp ne. MAITBEFOREREACINQ WDT t kick the dog xor P2.10000000P I toggle pin 3.. and SNR, 11111101D J, isable tios 0 di ld ADDRESS, §00 this address contains UP_LDAT nop call READMEMORY read the value 2X IX n= nop call READMEMORY I read tha value, ld UP_LIMIT_H, MTEHPH ld DPLIKITL. MTMPL Id ADDRESS, *01 t thia addrett conMicw COKMLIMIT nop call READMEHORY r-read the value ld DOWN-LIMIT-H. MTDIPH ld DOMNLIMIT. L, MTEMPL ld ADDRESS, t02 tthia addr « * eenttiM POS. CMTR nop call READMEMORY t read thé value ld POSCtrrRH. MTEMFH ld POSCNTRL, MTEMPL nop WDT kick the dog xor P2,0100000002 toggle pin 3. nop Id ADDRESS. 04 this address contains LEARNED nop call READMEMORY read the value ld RESET_PLAG, MIEHPR ld LEARNED, MTEndPL ld ADDRESS, t05 this address contains PPOINT nop call READMEMORY; read the value ld PPOINT, MTEMPH nop ld ADDRESS, t06 thia addreaa containa the MMIT. FLAG a nop call READMEMORY i read the value ld OPLIMITFLAG. MTEMPH ld DOWN-LMIT_M (3, MTEMPL nop ld ADDRESS, 03 j this address contains T CNTR nop call READHEMORY read the value ld TAPCNTR, MTENPH clr MTEMPL WDT kick the dog xor P2, #10000000B i toggle pin 3 or TMR. 000000010B enable timer 0 iysrsyst * ;* CHECK IF ANY MODE FLAGS ARE SET. IF SO, JUMP TO THAT MODE.

;* ELSE, CHECK IF TAP_COUNTER HAS REACHED 5 TAPS. IF SO, SET LEARN MODE <BR> <BR> ;* FLAG.<BR> <BR> <BR> <BR> <BR> <P>*************************************************** ***********<BR> *<BR> <BR> <BR> <BR> <BR> <BR> WDT ; kick the dog xor P2, #10000000B ; toggle pin 3. cp RESET_FLAG, #85 ; see if in reset mode jp eq, PASSPOINT_RESET ; if oo, coco passpoint reset<BR> <BR> <BR> <BR> cp LEARNED, &num 02 ; see if learn mode flag set<BR> jp ult. CHECK_FOR_TAP_HIGH ; if so, go check tep count value<BR> <BR> <BR> <BR> <BR> <BR> <BR> Cp TAP_CN'rR, &num 05; see if erase was pushed<BR> <BR> jp eq, NOTE_ERASE ; if so, goto clear limits<BR> <BR> <BR> ld START_FLAG, &num 01 ; set flag for timer<BR> <BR> <BR> jp CLEAR_UP_AND_DOWN<BR> <BR> <BR> <BR> <BR> HOTELERASE: set LEARNED byte to 01 for learn mode ; WRITE TO MEMORY--ltrite LEARNED=1 to E@2 ld ADDRESS, @04 POINT TO ADDRESS THAT CONTAINS LEARNED ld MTEMPH, #00 ; load tamp register with RESET_FLAG byto ld KTEMPL, &num 01 ;load temp register with LEARNED byte nop call WRITEMEMORY< ld LEARNED, &num 01; set LEARNED to 1. jp FIRSTTIME NOTE_RESET: ; WRITE RESET_FLAG = 85 TO E^2.

WDT kick the dog xor P2, &num 10000000B; toggle pin 3. ld ADDRESS, #04 ; POINT TO ADDRESS THAT CONTAINS LEARNED ld MTEMPH, &num 85 ; load temp register with RESET_FLAG byte ld MTEMPL, tOO a load temp register with LEARNED byte nop call WRITEMEMORYt jp PASSPOINT. RESET CHECK_FOR_TAP_RIGH: cp TAP_CNTR, t09 a see if reset mode requested jp eq, NOTE_RESET ; if so, goto clear limits jp ZIST-TEE CLEAR_UP_AND_DOWN: <BR> <BR> <BR> <BR> <BR> <BR> LOOP ; MAIN <BR> <BR> SLOOP<BR> <BR> <BR> <BR> <BR> < THIS PORTION OF THE CODE JUST EXECUTES NORMAL OPERATION OF THE LOGIC BOARD.

; NORMAL OPERATION IS TURNING ON THE TRIAC UNTIL EITHER THE UP OR DOWN LIMIT IS ; REACHED OR POWER HAS BEEN RELEASED.

; ;*************************************************** PASSPOINT_RESET: <BR> <BR> <BR> <BR> <BR> ;****************************************************<BR& gt; <BR> <BR> <BR> <BR> I THIS PORTION OF TRE CODE RESETS THE PASS POINT GEARS TO THERE INITIAL<BR> <BR> <BR> SETTIMG. IN ORDER TO BE IN THIS ROUTINE, THE POWER BUTTON MUST HAVE<BR> <BR> <BR> <BR> <BR> BEEN PRESSED FOR LESS THAN 500 ma AT LEAST 9 CONSECUTIVB TIMS.

AS A RESULT, THE RESET FLAG IS SET.

; AT THE CONCLUSION OP THIS ROUTINE, THE FLAG IS ERASED.

;******************************************************** ********** FIRST_TIME: ;*********************************************************** ** ; THIS PORTION OF TEE CODE LEARNS THE LIMIT OPPOSITE OF THE DIRECTION OF TRAVEL. IN ORDER TO BE IN THIS ROUTINE. THE POWER BUTTON MUST HAVE ; BEEN PRESSED FOR LESS THAN 500 ms BETWEEN 5-8 CONSECUTIVE TIMES.

AS A RESULT, THE LEARNED PLAG IS SET. t AT THE CONCLUSION OF THIS ROUTINE. THE FLAG IS ERASED.

; ;*********************************************************** ****** ------ ; THIS IS THE TIMERO (HEARTBEAT) INTERRUPT ROUTINE THIS ROUTINfi IS ENTERED EVERY ims.

;-------------------------------------------------------- ----------------- TIMEROINT: ld IMR, AllIntOn ; turn on all the interrupts CKECK_START_FLAG: iao DY Tut J increment line filter timer. cpSTARTFLAQ. $01 ready to check inputs? jv no, TnmRC_RETURN IIf not, leave. * tmP2. tOOlOOOOOB it POWER (P2S) high ? jp, DNC_OFF_LFC a lf not, dont temple up/dn pins. incPOWERFC elae. increment TOTAL JFC. elz OFF,C TEaTJtOTORt cpMOTORFLAO, tOAAH it Botor cc ? JPeq, TIMERO. RETURN if to, Jump. ta tOOOOOOlOB it Mp (P2i ! input high ? Jp<t, TMTJBOMNJLye if aet< don't iae UFC. inoOPLPC tiee. ineremene COKHJLFC. j sS_toW~, PC NSTOWNFCt HnP2, $000000016 ri* down (P : 0 ! iaput high ? jp s, TEST_POWER_LRC) lt not, dont lnc VP_X-tC. lnc DOWN_LPC Itlncranent DOWN_tFC JPTESTMKERLPC SNC_OFF tSC: inc OFF_LFC 1'increment OFF COUNTER clr UP_LFC ß elezr uF counter clr DOWtl_LFC t clear down counter clr pOWER-LFC l, clear power counter cp OPF_LFC, 41 l ls counter t 41m82 jpne. TIMERORETURM if to. then jump. j p CRECt_FOR_POWER TEST_POWER_LFC: cp tOWER_LPC, §04 , ls POWER_LFC more than 04 ? jpne, TIMERORETURN'if ao, leave interrupt clr OFP_LFC, cp POWER_DEBOUNCER, §22 l 1 Ds lready at 22 ? jpeq, CHECKUPLFC if to, don't increment lnc POWER_DEBOUNCER Z lse, increDent POWER DB cpPOMERJMSOUNCER. <03 ia UP DB at 3 ? jpae, CHEOUn'. jj'c f'if not. Jump. 4nc tAP_CNTR 0 elon, incr Dant W _COUNSER jpCHECKOPJLFC and Jump. CHECILUP-LFC: cpUPFC, t04 ic UP LFC at 3 ? jpult. CHECKJDOWNJLFC if not, jump. cp! EBOONCER, t2S5 it UP DB aaxed out. jp qf ts » _rza t o. j. clr EBOONCER clear debouaceM inc UP_DEBOUNCER g lncrerent db cpOPJEBODNCER, §22 if at 32. thtn <et high. jp ne, SET_UP_AND DowN_FLAG I lse. sklp. ld UP_PEBOUNCER, §255 g ld DP vlth 255. clr AP_CNTR) clezr TAP_COUN$ER jp CHECK_DOWN_LFC: cp - DOWN_LFC, #04 ; is DOWN_LFC at 37 jp ult, SET_UP_AND_DOWN_FLAG ; if not, jump. cp DOWN_DEBOUNCER, #255 ; 'is DOWN DB aaxod out. jp eq, SET_UP_AND_DOWN_FLAG ; if so, jump. clr UP_DEBOUNCER ; clear debouncers inc DOWN_DEBOUNCER ; 'increment db<BR> cp DOWN_DEBOUNCER, &num 22 ; 'if at 22, th@n set high.<BR> jp n@, SET_UP_AND_DOWN_FLAG ; else, skip.<BR> <P> Id DOWN_DEBOUNCER, &num 255 ; ld DB with 255.<BR> elt TAP-CNTR ; clear TAP_COUNTER<BR> jp SET_UP_AND_DOWN_FLAG CHECK_FOR_POWER: <BR> <BR> <BR> <BR> clr OFF_LFC ; reset off counter<BR> clr UP_DEBOUNCER ; clear DB's<BR> <BR> cirOPJDEBOUNCERclt*rCB'<<BR> alc MMMJOMOOHCtR or P0, #00001000B ; turn off IR's cp POWER_DEBOUNCER, &num 03 ; is DB aready zerc?<BR> <BR> jp uço, CLEAR_LINE_DESN ;'if so, don't write<BR> <BR> <BR> <BR> clr POWER_DEBOUNCER ; clear power debouncer<BR> <BR> <BR> jpTIMEROMTURN; <BR> <BR> <BR> <BR> <BR> CLEAR_LINE_DBS:<BR> <BR> clr POWER_DEBOUNCER ;'clear power debouncer<BR> <BR> ldSTOP_FLAG, &num 01 ; set stop flag.<BR> <BR> lad TMR,1llllllOlB t disable timer 0 1 WRITE TO HEMORY-TAPCMTR ld ADDRESS, §03 POINT TO ADDRESS THAT CONTAINS SAP_CNTR ld MTEMPH, TAPomt t ioad tenp re ? iater with TAPCNTR byte Id YTEMPL, 000 lead temp reaitter with 00. nop call KRITEHEMORYt or TMR, #00000010B ; enable timer 0 jp TIMER0_RETURN SET-UP_AND_DOWN_FLAG: Cp DOWN_DEBOUNCER, #255 ; is DOWN DB high? jp eq, SET_DOWN_FLAG ; if so, set down flag cp OPJDEBOUNCER, t255 ? jp ne, TIMER0_RETURN ; if not, leave inttrrupc ld UP_AND_DOWN, t01 ; else, set direction for up<BR> <BR> jp TIMER0_RETURN ; leave interrupt.<BR> <BR> <BR> <BR> <BR> <BR> sEs-DoWX rzo ld UP_AND_DOWN, #02 ; else, set direction for down <BR> <BR> <BR> . TIMEROJtETORN :<BR> <BR> <BR> <BR> <BR> <BR> iret