Language selection

Search

Patent 2236052 Summary

Third-party information liability

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

Claims and Abstract availability

Any discrepancies in the text and image of the Claims and Abstract are due to differing posting times. Text of the Claims and Abstract are posted:

  • At the time the application is open to public inspection;
  • At the time of issue of the patent (grant).
(12) Patent Application: (11) CA 2236052
(54) English Title: DUMMY PLUG PRESSURE RECORDER
(54) French Title: BOUCHON FICTIF POUR ENREGISTRER LA PRESSION
Status: Deemed Abandoned and Beyond the Period of Reinstatement - Pending Response to Notice of Disregarded Communication
Bibliographic Data
(51) International Patent Classification (IPC):
  • E21B 34/00 (2006.01)
  • E21B 43/12 (2006.01)
  • E21B 47/01 (2012.01)
  • E21B 47/06 (2012.01)
(72) Inventors :
  • GRANDE, RENE SHOAN (Canada)
  • ZILLINGER, FRIEDRICH ERNST (Canada)
(73) Owners :
  • RENE SHOAN GRANDE
  • FRIEDRICH ERNST ZILLINGER
(71) Applicants :
  • RENE SHOAN GRANDE (Canada)
  • FRIEDRICH ERNST ZILLINGER (Canada)
(74) Agent: OGILVIE AND COMPANY
(74) Associate agent:
(45) Issued:
(22) Filed Date: 1998-04-27
(41) Open to Public Inspection: 1999-10-27
Availability of licence: N/A
Dedicated to the Public: N/A
(25) Language of filing: English

Patent Cooperation Treaty (PCT): No

(30) Application Priority Data: None

Abstracts

Sorry, the abstracts for patent document number 2236052 were not found.

Claims

Note: Claims are shown in the official language in which they were submitted.


This page does not belong to this section.

This page does not belong to this section.

This page does not belong to this section.
<IMG>

This page does not belong to this section.
<IMG>

Electronics
This page does not belong to this section.

This page does not belong to this section.
<IMG>

Part Used PartType Designators
1 1 2K low TC R5
2 1 3.6864 MHz-ABC2 X1
3 2 5 PIN J1 J2
4 1 11.8K R7
1 20K R1
6 1 22pF NPO C13
7 3 100K R2 R3 R8
8 1 100 pF NPO C14
9 6 102 NPO C3 C4 C5 C7 C9 C10
3 104 X7R C1 C2 C6
11 1 330 R6
12 1 681 NPO C8
13 1 32768 Hz HT X2
14 1 AD7714 U2
1 BSS84ZXCT T3
16 1 BSS138ZXCT T2
17 1 BZX84C5V6DICT (ITT) Z1
18 1 FMMT491ACT T1
19 1 JUMPER J3
1 LT1019-5 U3
21 1 PIC16C73SOIC U1
22 4 T58A040F U4 U5 U6 U7

This page does not belong to that section

This page does not belong to that section

Description

Note: Descriptions are shown in the official language in which they were submitted.


CA 02236052 1998-04-27
Dummy Plug Pressure Recorder
1.0 Overview. This document presents the implementation of Panther
Corporation's
slim pressure recorder in a new application associated with gas lift mandrels.
2.0 Application. Gas lift is an artificial lift method which inj ects gas from
the annulus into
tubing - the injected gas provides lift to the oil in the tubing. See the
included
Halliburton document for complete description. Typically gas lift
installations have
side pocket mandrels which allow the injection valve to be set from the tubing
side -
see page 23 of Halliburton guide for description of how to set valve. When the
well is
pressure tested or when an individual valve needs to be disabled a dummy plug
is set in
the mandrel. By placing a pressure recorder inside of a standard dummy plug
the
system pressure can be monitored in any side pocket mandrel.
2.1 Improvements. Although devices exists to measure pressure in a side pocket
mandrel
none can be set with standard the wireline procedures used to set plugs and
valves, or
if they can they are mechanical gauges which are not accurate. The electronic
gauges
are either very long and require special setting procedures, or they are
electric line
tools which need a wire to surface to be left in the hole - this is expensive
and
inconvenient.
Panther Corp.'s recorder is the smallest recorder known to the applicants. Its
miniaturization is due to the use of surface mount devices on both sides of
the PCB,
the use of audio flash (T58A040F) and the specific orientation of the (4)
flash chips in
the back to back position ( U4, U5, U6, U7 on the PCB). The applicants note
that a
tool with less memory could be built with only one chip. In that case the
orientation
the processor and the analog to digital converter are critical. Also the use
of a Keller
Series 8 pressure transducer with a direct connect to the PCB reduces overall
length.
The use of tight clearances in the electronic housing allow the use of high
temperature fiberglass tape as a friction fit shock absorber.
The use of the housing to support both the transducer and the electronics is
novel as
opposed to the standard methods of using internal frames with fasteners etc.
This
greatly reduces length as well as provides thicker walls which in turn makes
the tool
capable of withstanding higher pressures. (30000 PSI)
The dimensions of this tool are identical to those of a McMurray Hughes Dummy
Plug.
3.0 Mechanical design. See Panther drawing 1. Housing is constructed of 718
Inconel .
Use packing on the center section of the tool to provide a seal.
3.1 Electronics Design. Use printed circuit board in included drawings.
3.2 Software Design. Use included source code.

CA 02236052 1998-04-27
4.0 Use of device. The tool is programmed using a PC to record the temperature
and
pressure at some user selected frequency. The battery is fitted on to the
electronics
housing and the tool is assembled. Once assembled the tool is attached to a
wireline
placement tool and positioned in the mandrel. The tool is retrieved at some
future date
and the recorded data transferred to a PC.

CA 02236052 1998-04-27
HALLIBURTON
auxiliary equipment, service, and technical assistance.
GAS LI FT SYSTEMS Your Halliburton representative can help you design
the right system for your well. Years of innovative
engineering, along with highly competent field person-
nel trained in the installation and design of gas lift
Gas lift refers to methods using gas to bring oil and gas systems, have made
Halliburton first in gas lift control.
to the earth's surface. Gas lift is one of several types of
artificial lift methods. CHOOSING AN ARTIFICIAL LIFT METHOD
APPLICATIONS To determine which artificial lift method will be most
effective for a particular well, several factors must be
Gas lift techniques may be used to: evaluated:
~ Produce wells that do not flow naturally ~ Production potential
~ Increase production of flowing wells ~ Gas/oil ratios
~ Unload excess fluids from gas wells ~ Wellbore deviation
This method of artificial lift is a viable means of extend- ~ Wellbore size
ing the life of a well. It provides operators with an ideal ~ Corrosion or
erosion potential of produced fluids
answer for older wells that have become partially ' Availability of power
sources, such as electricity or
depleted, wells that have become uneconomical to compressed gas
produce, or wells needing to increase production rate ' Surface facility or
space limitations
without using a conventionalpumping system. ' Service availability
~ Personnel capabilities
~"~ALLIBURTON~S GAS LIFT PRODUCTS Halliburton has trained specialists to help
you design
artificial lift systems, and Halliburton offers total
For years, Halliburton's Otis~ and Merla~ product equipment packages for all
types of wells. Total system
service lines have exhibited world-class artificial lift planning includes
evaluating well data to determine
technology Halliburton provides a complete line of the well's production
potential, choosing artificial lift
compatible equipment and a full range of services and equipment to help
increase production, ensuring
technical support for gas lift and plunger lift applica- product compatibility
and working with you to
dons. Halliburton also serves as an excellent source of maintain effective
operations.
Facilities From Additional
Separation Facilities Volume Chamber Low Pressure
To L.P. Sales ~ If Required ~ Suction System
or Flare
Regulator ~ r~".
~ ~ ,,
__
Orifice Flange
for Gas Measurement I ~~ k .~ i ~.~,~ i t ~'
~ J ~ V/
Separator
Subsurface Choke High Pressure Gas Line\
or Electronic Controller
From Additional as Required
Well or Wells
Orifice Flange f Se arator
~ . /for Gas Measurement
Regulator
H.P. Sales
Gas Lift Valves
Volume Chamber
If Required Liquids
Packer
To Additional
Wells Liquid Dump
Gas Lift Well Packer
Installation
High Pressure Gas
Basic Components For A Gas Lift System Well If Available
GAS LIFT SYSTEMS 2-1

CA 02236052 1998-04-27
HALLIBURTON
GAS LIFT accurate predictions of the valves'
performances under
well conditions. This information
eliminates system
Some oilfields have a high-pressure overdesign and trial-and-error solutions
gas well, which is to gas lift
a readily available energy source installations.
for the gas lift
method. The high-pressure or compressed
gas is
injected into the marginal well to /ARTIFICIAL LIFT ILLUSTRATIONS
help bring the oil or
fluids to the earth's surface. If
sufficient gas pressure
or volume is not available, compressorsSchematic I-Single zone gas lift
can be used to installation
operate a closed system. Lift gas This single string gas lift completion
is recirculated for intermittent
through a compressor facility Only lift applications uses a standing
minor amounts of valve near the bottom
makeup gas are needed to replenish of the tubing to prevent gas pressure
gas lost in separa- surges against the
tion processing or as fuel for compressorreservoir during cycles. A single
facilities. zone continuous lift
installation is almost identical,
but it does not require a
System Design standing valve. Conventional or
side pocket mandrels
To design an efficient gas lift system,may be used in either application.
the Halliburton Halliburton's side
engineers use the latest computer pocket mandrels are designed to
technology and provide a way to
draw from their field experience. remove and replace gas lift valves
In designing gas lift without removing
operations, Halliburton engineers the tubing. These service operations
use Halliburton- are performed
designed software as well as other using wireline, through-flowline
optimization (TFL), or coiled
software recognized within the industrytubing methods depending on the
By combining completion
valve flow performance with verticalconfiguration.
and horizontal
pressure traverse prediction, our
experienced engi-
neering staff can provide some of Wireline installations are usually
the most sophisti- more economical for
Gated tools available to design and servicing vertical wells, especially
troubleshoot gas lift remote, offshore, or
installations. other hard-to-reach locations, since
wireline units are
light and readily portable. TFL
and coiled tubing
Halliburton's approach to gas lift service methods can be used in wells
design includes that require
consideration of the following factorstubing loops, such as ocean floor
where completions, highly
applicable: deviated wells, extremely deep wells,
and any well
that does not allow straight or
vertical access for
Inflow performance-programs that wireline service.
predict inflow at
the wellbore sandface
Pressure traverse-programs for both
vertical and
horizontal mufti-phase flow and pressure
predic-
tion with or without gas lift Flow Contrc
Ualve performance-dynamic flow test Valve
data to
provide predictable injection capabilities
of certain
valves when applicable
Systems analysis-overall systems
analysis pro-
grams used to troubleshoot existing
gas lift systems
and provide feasibility analysis.
Considering the overall system performance for
engineering and economic constraints is important to
gaining maximum profit from artificial lift operations.
Contact your nearest Halliburton representative for
more details of our service capabilities.
Equipment Considerations .ift Gas
Halliburton manufactures a complete
line of gas lift
valves and mandrels, enabling selection'acker
of the proper
equipment to meet the requirements of
your wells.
Halliburton provides gas passage informationStanding Valve
ob-
tamed from extensive dynamic flow tests,Optional)
conducted
on most of the gas lift valves in theirSchematic 1
line. Engineers
use data from these flow tests to developSingle-Zone Gas Lift Installation
highly
2-2 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
Flow Control Flow
Valve Control
Valve
Side Pocket
Mandrels and
Injection Gas Gas Lift Valves
Side Pocket
Mandrels
Side Pocket
Mandrel for
Side Pocket Chamber Lift
Mandrels Dual or Bypass
Packer
Dual String Side Pocket
Packer Mandrel with
Standing Valv
Production Differential Valve
Production
Single String Perforated Pup
Packer ~ ( Joint
Production Z 'Lower Packer
Schematic 2 Schematic 3
Dual-String Gas Lift Installation Chamber Lift Installation
Schematic 2-Dual-string gas lift installation from wells with a high
productivity index and low to
This dual string installation illustrates gas lift valves medium bottomhole
pressure.
lifting fluids from two zones using gas from a common
annulus. If proper well information is available, an Schematic 4-Chemical
injection/Gas lift installation
installation can be designed to produce and carry both In certain cases, it
may be desirable to couple chemical
zones to depletion. Casing size, distance between injection with gas lift.
Side pocket mandrels may be
zones, wellbore deviation, need for continuous or run at predetermined depths
for gas lift valves to be
intermittent lift, and operator preference influence installed. An additional
mandrel with a chemical
dual string completion designs. Gas lift valves should injection valve and
injection line may also be run to the
be proportional response or production desired depth on the same tubing
string. The tubing/
pressure-operated for the best results. the casing annulus can be used for gas
injection and
the injection line for chemical injection.
Schematic 3-Chamber lift installation
Chamber lift systems normally have
two packers, a
standing valve, a perforated pup above Injection
the bottom Gas
packer and a differential vent valve
just below the top
packer plus the gas lift valves neededInjection Line Side Pocket
to unload and
produce the well. While the bottom (Control Line) Mandrel
injection pressure- with
Gas Lift
Valve
operated valve is closed, the standing
valve is open.
Fluids fill both the tubing and annular
chamber Side Pocket
between the two packers. The differential Mandrel
valve is with
open, which allows gas in the top of Chemical
the annular
chamber to bleed into the tubing as Injection
the space fills. Valve
When the liquid in the chamber is near
the differential
valve, the operating gas lift valve Locator
opens. A calculated and
gas volume enters the top of the chamber, Seal Assembly
which closes
the bleed valve and standing valve
and forces accumu-
lated liquids to the U-tube from the Packer
chamber to the
tubing. Liquids are produced as a slug
to the surface. Production
As the tubing is cleared, the operatingo Fluid
gas lift valve
closes, the standing valve and bleed o
valve open, and Z
liquids again fill the chamber. The
cycle then repeats. A
properly planned chamber lift system Schematic 4
permits a larger
volume of fluid to be produced by intermittentChemical InjectionlGas
lift Lift Injection
GAS LIFT SYSTEMS 2-3

CA 02236052 1998-04-27
HALLIBURTON
Lubricator
Electronic Controller
Motor Valve
Flow Control
Valve Flow Tee I
Arrival Sensor
Catcher
Master Switch Gauge
Valve
G.
F
Packer Plunger
(Expanding Pad
with Bypass)
Packer
Bumper Spring
Tubing or Collar Stop
Schematic 5 Schematic 6
Macaroni Installation Single-Zone Plunger Lift Installation
Schematic 5-Macaroni installation Schematic 6-Single zone plunger lift
installation
Macaroni tubing installations work well in either Halliburton's plunger lift
systems can effectively
intermittent or continuous gas lift systems. The produce high GOR wells, water-
producing gas wells,
macaroni installation is similar to a single zone or very low bottomhole
pressure oil wells (used with
installation except the size of the macaroni string is the gas lift). Surface
and subsurface equipment varies with
limiting factor because of ultra-slim hole conditions. individual well
requirements. Installations may or may
Macaroni gas lift is an ideal method of artificial lift for not require a
packer and/or additional lift gas. The
slim hole completions. completion illustrated shows a simple installation
without packers for unloading fluids in a gas well.
2-4 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
GAS LEFT VALVES and a differential exists. Further reduction in tubing
pressure results in a reduced upward force on the ball,
and the spring moves the ball proportionally closer to
Halliburton has four different varieties of gas lift the seat until the valve
closes at 300 psi.
valves: proportional-response, production pressure-
operated, injection pressure-operated, and pilot- Two basic factors control
the proportional response of
operated gas lift valves. these valves:
PROPORTIONAL-RESPONSE GAS LIFT VALVES ' Aspring causes the ball to move toward
the
seat at a rate proportional to the spring's com-
Halliburton features two series of proportional- pressed length.
~ Forces created by tubing and casing pressure hold
response gas lift valves: the L and LN series. These the ball off the seat.
Since the casing pressure is
valves help regulate the amount of gas that enters held constant, tubing
pressure controls the ball
the tubing. movement. As tubing pressure decreases, the
upward force is reduced, and the force exerted by
A series of dynamic flow rate tests conducted under the spring moves the ball
downward, which
simulated well conditions help engineers to under- throttles the valve. When
the liquid gradient in the
stand the operating characteristics and limits of these tubing increases, the
valve allows more gas to
valves. The following graphs illustrate the test results. maintain the desired
gradient. It restricts the gas as
the fluid gradient decreases.
1400
.
0 Fksvr~ R~t~ Gurrre
far ii4" ~rEfiice
V1200
cn ~~,. ~ 0
10
1000
U
8 ~
~ ~
800 Ftaw R~tB ~urtre ,
':
~
Llffi~i BR Yalrr~s ~' :
. ~
os0o Medium Trim ~ ;
~
6
400 k o
-
~
u.
4
200
N N~2
0 o~
2
0 100 200 300 400 700 800
500 600
Ppd, Tubing Pressure (psi) P~~
0
Figure 1 0 0 2 4 s 8 10 12 14
z
Figure 1 - Curve A illustrates a typical gas flow rate V Ppd, Tubing Pressure
(psi x 100)
curve from an orifice with a constant casing pressure Figure 2
of 800 psi (5516 kPa) with a variable tubing pressure.
When the tubing pressure is less than one half the Figure 2 - This graph
illustrates the flow rate charac
casing pressure, the flow is a constant at critical flow teristics of the LN-
21R valve with different trim sizes
as determined by flow tests. The valve in this example
Curve B was generated during the flow tests of an L- is adjusted for an
operating casing pressure of 1400 psi
series valve. In this test, the valve is adjusted to open (9653 kPa) and is
set to close when the tubing pressure
at an operating casing pressure of 800 psi (5516 kPa) reaches 400 psi (2758
kPa). As shown, the valve with
and close when the tubing pressure falls to 300 psi medium trim will allow 3.8
mmcf/d of gas when
(2068 kPa). During the test, the casing pressure is tubing pressure equals 800
psi (5516 kPa).
constant, and the tubing pressure varies. When the
tubing pressure is 800 psi (5516 kPa), the valve is open,
but no flow exists since there is no pressure differential
across the valve. As tubing pressure decreases, the
flow increases to a peak since the valve is fully open
GAS LIFT SYSTEMS 2-5

CA 02236052 1998-04-27
H A L L I B U R T O N
L SERIES VALVES
Halliburton Energy Services' Merla~ L series valves
help adjust the required gas injection rate in response
to changes in tubing pressure at the valve by injecting
more gas for a heavy gradient fluid than for a light
fluid. This proportional response allows the injection
of the optimum volume of gas to maintain the desired ng
fluid lifting capabilities. LT series valves are designed
for high-temperature applications.
The L series valve opens when casing pressure acts on
the bellows area, less the area of the seat, and adds to Ns
the tubing pressure on the seat area, which overcomes
the preset spring force holding the ball on the seat.
When the casing and tubing pressures are equal, the
valve is open but there is no flow. As tubing pressure
decreases, the flow peaks since the valve is fully open
and a differential exists. Further reduction in tubing
pressure lowers the ball to close the valve. o
Z
Spring-loaded, proportional-response L series valves
are designed for continuous flow operations. Tempera- Open
ture does not affect the operation of these valves.
Information from dynamic flow tests helps predict the
actual gas flow rate through the valve under various
well conditions.
Applications
~ Continuous flow gas lift
Features
~ Temperature-independent operation
~ Wireline retrieval
~ Spring-loaded throttling operation ling Ball
~ Tungsten carbide ball and seat
~ Large-diameter back check valve
Benefits
~ Optimum volume of gas can move from the ing
annulus to the tubing in response to changes in
production pressure
~ Increased valve service life
0
~ Protects from production intrusion into annulus ~ ient Seal
~ Uses full operating gas pressure to bottom valve
~ Minimal erosion of the ball and seat Closed Check Valve
~ Positive valve closure
Options
Standard series models include
~ LM-16R: a 1-in. diameter wireline-retrievable valve
for installation in a TM Mandrel with a BK-2 or M
Latch LN Series Proportional Gas Lift Valve
~ L-12R: a 1'/z-in. diameter wireline-retrievable valve
for installation in a TG, RK, RM or T2 Latch
2-6 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
SELECTION GUIDE
Wireline-Retrievable
Subsurface
Valves
Selection
Guide
Valve MandrelIntermittentContinuous MaximumMaximum4Maximum
SeriesOD (in.)Type Lift Lift Latches pro PTRO P (psi)
(psi) (psi)
Gas
Lift
Valves
Proportional
Response
Valves
LM-16R1.0 TM , BK-2, M 1800
L-12R 1.5 T , TG, RK, 1600
RM,T2
LN-21 1.5 T , TG, RK, 3000
R RM,T2
LNM-311.0 TM , BK-2, M 3000
R
LT-12R1.5 T , TG, RK, 1200
RM,T2
LTM-15R1.0 TM , BK-2, M 1500
Production Normally
Pressure-Operated Tubing
Valves Pressure)
(
RV-15R1.5 T , , TG, RK, 2500
RM,T2
RVM-16R1.0 T , , BK-2, M 2500
Iri
ection
Pressure-O
rated
Valves
Normall
Casin
Pressure
N-16R 1.5 T , , TG, RK, 2000
RM,T2
NfVFI6R1.0 TM , , BK-2, M 2300
L-20R 1.5 T , , TG, RK, 2200
RM,T2
Pilot-Operated
Valves
WF-14R1.5 T, TE , TG, RK, 1500
RM,T2
W FM-14R1.0 TM, , W FBK 1300
THE
Orifice
Valves
OM-14R1.0 TM , BK-2, M
OS-14R1.5 TS ~ TG P, RKJP,
TFA
OSM-14R1.0 TMS , BKP
O-20R 1.5 T , TG, RK,
RM, T2
OM-20R1.0 TM , BK-2, M
Shear fice
Ori Valves
S02-21R1.5 T , TFA 3000
S02M-14R1.0 TM , BKP 3000
S-16R 1.5 T TG, RK, 4000
RM, T2
SM-14R1.0 TM BK-2, M 4000
S2-15R1.5 T TG P, RKP, 4000
TFA
S2M-14R1.0 TM BK-2, M 4000
Chemical
In'ection
Valves
or
Pressure
Relief
Valves
C-30R 1.0 T TG, RK, 2500
RM, T2
CM-30R1.5 TM BK-2, M 2500
CN-20R1.0 T TG, RK, 3500
RM, T2
Dumm
and
E
ualizin
Dumm
Valves
D-14R 1.5 T TG, RK,
RM, T2
DM-14R1.0 TM BKJ-2,
M
DT-14R1.0 T TG, RK,
RM, T2
DTM-14R1.5 TM BK-2, M
ED-30R1.0 T TGP, RKP,
TFA
EDM-30R1.5 TM BKP
BWPD 4Min.
P
Liquid Min. Max. (psi)
Flow
Regulators
(2500
psi
Max.
P)
F-12R 1.5 TS TG P, RKP,30 2100 62.5310
TFA
FM-14R1.0 TMS BKP 100 475 150
FA-16R1.5 SPCL Special 30 1340 62.310
Note: Many of the valves listed above are available in configurations suitable
for conventional tubing-retrievable installations.
GAS LIFT SYSTEMS Z-7

CA 02236052 1998-04-27
HALLIBURTON
LN SERIES VALVES
Halliburton Energy Services' Merla~ LN series valves
allow for very high valve set pressures and improved Charged Dome
throttling characteristics. The proportional response of
these valves enables Halliburton engineers to calculate
the gas injection volumes throughout the anticipated
range of operating conditions of the well. The operat- Spring
ing capabilities of these valves have been determined
by dynamic flow tests in simulated well conditions.
In the LN series valves, a dome nitrogen charge
applied to the external area of the bellows provides a
downward force, which holds the valve on its seat.
This dome pressure is preset at the reference tempera-
ture and corrected to operating temperature. The
casing pressure acting on the internal area of the
bellows, less the area of the seat, combined with the
tubing pressure acting on the seat area work to open Bellows
the valve. Once the valve is open, it remains open until
the tubing pressure falls to the predetermined closing
pressure.
0
Applications
~ High gas volume and high-pressure continuous
flow installations Open
Benefits
Optimum volume of gas moves from Entry Points
the annulus
to the tubing as production pressure
changes
Predictable proportional response
Throttling Ball
operating characteristics
Valve service life increased Seat
Valve closing pressures set to 2500
psi (17 237 kPa)
LN-21R valve can inject maximum gas
volumes of
over 10 mmcf/d Packing
Minimal erosion
Positive valve closure
Protects from intrusion of production
fluids into annulus o 0
Back Check Valve
0 0
U "
Options
Standard series wireline-retrievableClosed
models are
LN-21R: 1 '/z-in. valve for a TG
or T mandrel with a
TG, RK, RM or T2 latch
LN
Series
Proportional
Response
Gas
Lift
Valve
LNM-31R: 1-in. valve for a TM mandrel
with a
BK-2 or M latch
2-8 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
PRODUCTION-PRESSURE-OPERATED GAS Performance Data and Valve Specifications for
RV
LIFT VALVES-RV SERIES VALVES Series Valves
The maximum flow rate can be calculated using the
following formula. Use C~ for the particular valve and
Halliburton Energy Services' Merla~ RV series valves choke size.
use internal orifices to control maximum gas passage.
Flow performance curves obtained from dynamic flow
tests enable Halliburton engineers to calculate gas Omax = ~ X80 C~ (Pcf - Pt)
Pt
injection volumes in the anticipated well conditions. G
where
In the RV series valves, tubing pressureQ - MCF/Day
is sensed
below the seat and communicated via G - Specific Gravity (Air
a hole in the = 1)
valve stem up to the bellows. The valveT~ - Valve Temperature
opens when (460+F)
the tubing pressure acting on the bellowsC~ - Coefficient of Flow
exceeds the (Discharge)
spring preload. The opening pressure P~ f - Flowing Casing Pressure
is not affected by of Valve
the casing pressure because it is balancedPt - Tubing Pressure
between the
ball and stem. Gas then flows from the casing through
a sized orifice and exits through the seat port. The
valve continues to be sensitive to tubing pressure and
will close when the tubing pressure drops.
Applications
~ For deep, high flowing pressure gas lift wells Bellows
~ Use tubing pressure to control opening and closing
of the valve
~ Installations with fluctuating line pressures
~ Continuous flow operations
~ Dual-string installations
Features
~ Spring-loaded
~ Wireline-retrievable o
~ Throttling-type closure ~ Spring
~ Spring and bellows design Open
~ Liquid-charged Monel bellows
~ Integral back check valve
~ Full range of internal orifice sizes available
Benefits Packing
~ Valve is controlled by preset spring tension
~ Valve is not affected by downhole temperatures Ball
~ Pressure settings to 2500 psi (17 237 kPa)
are possible Entry Ports
~ Protection from production fluid flow into casing
~ Protection from high hydrostatic pressures Seat
~ Valve is almost independent of casing pressure
~ Suitable for a wide range of operating conditions
Options Packing
Standard series retrievable production-pressure- ;° o
operated valve models include Z o Back Check Valve
~ RV-15R: 1 '/z-in. (3.81-cm) diameter valve for a TG
or T mandrel with a TG, RK, RM, or TZ latch Closed
~ RVM-16R: 1-in. (2.54-cm) diameter valve for a TM
mandrel with a BK-2 or M latch RV Series Gas Lift Ualve
GAS LIFT SYSTEMS 2-9

CA 02236052 1998-04-27
H A L L I B U R T O N
INJECTION PRESSURE-OPERATED GAS LIFT ~ NM-16R: 1-in. (2.54-cm) diameter
wireline-retrievable injection pressure-operated
VALVES-N SERIES VALVES valve for TM mandrels with BK-Z or M latches
Halliburton Energy Services' Merla~ N series valves
are designed for continuous or intermittent flow
applications. They are especially suitable for use as
unloading and operating valves in areas with high gas
lift pressures. These valves are temperature-sensitive,
so accurate operating temperature information must
be used to ensure correct set pressure design.
The N series valves use a nitrogen-charged Nitrogen Charged
dome and
bellows configuration. The dome nitrogen Dome
charge
applied to the external area of the
bellows provides the
downward force to hold the valve on
its seat. This
dome pressure is preset at the reference Bellows Expansion
temperature
and corrected to operating temperature. Control Spring
Casing
pressure acting on the internal area
of the bellows (less
the area of the seat) combined with
the tubing pressure
acting on the seat area work to open
the valve. Once
the valve is open, it stays open until Externally Charged
the casing pres-
sure is reduced to the predetermined Bellows
closing pressure.
The difference between the opening
and closing casing
pressure is controlled by the tubing
sensitivity of the
valve. The larger the seat port area,
the more tubing
0
sensitive the valve.
Applications Open Valve System
~ Continuous flow
~ Intermittent flow
~ As unloading and operating valves in areas where
high gas lift pressures are available Packing
~ Wireline-retrievable and conventional installations
Features Ball
~ Nitrogen-charged dome and bellows configuration
~ Temperature-sensitive operation Entry Ports
~ Tubing-sensitive operation
~ 3-ply Monel bellows Seat
~ Multiple port sizes available
~ Reversible seat available in several materials
Benefits
~ Vibration protection Packing
~ Can withstand hydrostatic pressures to 5000 psi
~ Bellows life is prolonged-nitrogen dome charge,
acting on OD of the bellows, permits bellows to
expand uniformly without stacking ~ Z Back Check Valve
~ Appropriate for many operating conditions ' "
Options Closed
Standard series models include N Series Gas Lift Ualve
~ N-17R: 1 '/z-in. (3.81-cm) diameter
wireline-retrievable, injection pressure-operated
valve for TG or T mandrels with TG, RK, RM, and
T2 latches
2-10 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
H A L L I B U R T O N
PILOT-OPERATED GAS LIFT VALVES- Set pressures
are
independent
of
WF SERIES VALVES downhole
temperatures
Full
utilization
of operating
pressure
to bottom
valve
Halliburton Energy Services' Merla~. Protection
WF series valves from
intrusion
of production
are pilot-operated, large-ported fluids
valves designed into
annulus
specifically for intermittent lift Can use
applications. This any
combination
of surface
gas
design provides a large port for control-choke,
maximum gas con- time-cycle
controller,
and
sumption with controlled spread pressure
for minimum gas regulator
consumption and maximum surface Maximum
gas control lift
efficiency
flexibility. They can be tailored Controlled
to use any type or spread
for
minimum
gas
consumption
combination of surface gas control:and maximum
choke, time-cycle surface
gas
control
flexibility
controller, or pressure regulator.
This flexibility makes
them useful in both high- and low-productivitypptions
wells
or chamber lift applications. The standard
series
wireline-retrievable
pilot-operated
The WF series valve features a pilotvalve
section and a models
include
WF-14R:
1 '/z-in.
(3.81-cm)
diameter
valve
for
TG
power section. When the casing pressureor T
acting on the mandrels
with
TG,
RK,
RM,
or T2
latches
area of the bellows and tubing pressure
acting on the WFM-14R:
1-in.
(2.54-cm)
diameter
valve
for
TM
area of the seat are sufficient, mandrels
the spring force is with
BK-2
or M
latches
exceeded, and the pilot ball moves
off seat. This action
allows gas to enter the area above
the power piston,
overcoming the tubing pressure,
and causing the
power section to snap open and to Bellows
remain open as long
as the pilot is open. When the pilot
closes, the pressure
above the power piston is reduced
to tubing pressure
through the vent port. The differential
across the
power piston causes the power piston
to snap up and
close the main valve.
The tubing sensitivity of the valve is controlled by the Spring
pilot ball and seat size. Since the spring exerts a
constant closing force and is opposed by two opening
forces, the larger the seat, the more sensitive the valve
to tubing pressure. The spread may be controlled as o
needed without affecting the port size of the power
section, which gives this valve a distinct advantage for Open
intermittent lift. Packing
Pilot Ball
Applications Pilot Section Entry
~ Intermittent lift applications Ports
~ High- and low-productivity wells
~ Chamber lift Power Piston
Features
Entry Ports
~ Large port for maximum lift efficiency Main Valve with
~ Adjustable tubing sensitivity Resilient Seal and
~ High slug lifting capacity Integral Back Check
~ Large port area allows maximum gas passage
~ Preset spring tension Packing
~ Back check valve with resilient seals
Benefits
~ Capable of maximum production Closed
~ Accurate and predictable set pressures
WF Series Gas Lift Valve
GAS LIFT SYSTEMS 2-11

CA 02236052 1998-04-27
HALLIBURTON
ORIFICE VALVES options
Standard series wireline-retrievable orifice valve
models include
Halliburton Energy Services' selection of orifice valves . OM-14R: 1-in. (2.54-
cm) diameter valve for TM
includes: mandrels with BK-2 or M latches
~ OM-20R: 1-in. (2.54-cm) diameter valve with larger
~ O Series standard orifice valves capacity than the OM-14R design for TM
mandrels
~ S Series shear orifice valves with BK-2 or M latches
~ O-21R: 1 1/z-in. (3.81-cm) diameter valve for TG or
~ SERIES VALVES T mandrels with TG, RK, RM, and T2 latches
~ OSM-14R: 1-in. diameter valve used with TMS
Halliburton Energy Services' Merla~ O series valves series mandrels and BKP
latches primarily for
are designed for installation in side pocket mandrels to waterflood
applications
establish communication between annulus and tubing ~ OS-14R: 1 '/z-in.
diameter valve used with TGS or
during circulating operations. TS series mandrels and TGl? RKP and TFA latches
primarily for waterflood applications
Injection fluid or gas enters through the entry ports
and through an orifice. Injection pressure moves the
back check valve off the seat, which allows gas or
fluids to enter the tubing. Reverse flow pushes the Packing
check valve onto the seat to prevent flow into the
casing. This action allows the flow to enter from the
top, passing through the valve via the back check
valve and out the bottom of the valve and into the
tubing/casing annulus. The valve is installed in a
mandrel with a type-S pocket, which vents to the
casing/tubing annulus but does not have ports be-
tween the seal bore.
Orifice sizes available for this valve design
range from'/e through'/~s in. (3.175 through 11.11
mm) in the 1-in. (2.54-cm) size and from'/s through
5'/sa in. (3.175 through 20.24 mm) in the 1 '/z-in.
(3.81-cm) size. Open Entry Points
Applications
~ Installed in side pocket mandrels to establish
communication between the tubing and annulus
during circulating operations
~ Waterflood operations (OS14-R models)
Choke
0
Benefits o ~ Spring
Z
~ Orifice size determined with ISA procedures to
provide accurate sizing for proper injection rates Closed
~ Large flow capacities
~ Protection from intrusion of production fluids into O Series Circulating
Ualve
casing annulus
2-12 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
SHEAR ORIFICE VALVES-S SERIES VALVES
Halliburton Energy Services' Merla~ S series shear
orifice valves provide a controlled means of communi-
cation between tubing and casing/tubing annulus.
Communication is established by applying a
preselected pressure differential from the casing to the
tubing. The back check feature included in some
valves prevents flow from the tubing. The S series
valve incorporates a replaceable draw bar that is
designed to break when a defined differential pressure
is applied from casing to tubing.
Tubing pressure applied equally to both the
piston and lower draw bar carrier makes the valve
opening action solely dependent on the differential
between the tubing and the casing pressures. When
casing pressure is applied to create the predetermined
differential pressure, the draw bar separates, and
the lower seat portion of the bar is free to open.
The injected gas passes through a specially sized
orifice, past the large diameter check valve, and into
the tubing. o
0
z
Applications
~ For controlled communication between tubing and Open
casing/tubing annulus
Features
~ Replaceable draw bar
~ Built-in large-diameter back check valve
~ Orifice sized to allow optimal gas injection volume
Packing
Piston
Benefits Draw Bar
Allows accurate control of valve response
to
differential pressure between casing Entry Ports
and tubing
Allows setting a predetermined draw Valve Seat
bar separation point
Upper Check
Protects annulus from intrusion of Guide
production fluids
Options Orifice
Standard series wireline-retrievable orifice valve
models include Packing
~ S02-21R: 1 '/z-in. (3.81-cm) valve for TG or T
mandrels with TGP or TFA latches; with two back
check valves o
~ S02M-14R: 1-in. (2.54-cm) valve for TM mandrels ~ Back Check Valve
with BKP latches; with two back check valves
~ S-16R: 1 '/z-in. (3.81-cm) valve for TG or T man-
drels with TG, RK, RM and T2 latches
~ SM-14R: 1-in. (2.54-cm) valve for TM mandrels Closed
with BK-2 or M latches
~ S2-15R: 1 '/z-in. (3.81-cm) valve for TG or T man- S Series Shear Orifice
Ualve
drels with TGP, RKP, or TFA latches
~ S2M-14R: 1-in. (2.54-cm) valve for TM mandrels
with BKP latches
GAS LIFT SYSTEMS 2-13

CA 02236052 1998-04-27
HALLIBURTON
NOVATM SERIES GAS LIFT VALVES
The NOVA'M series valves allow an orifice valve to
reach maximum flow potential (critical flow) with a
differential equal to 10% or more of the upstream
pressure.
Applications
~ Maximize gas lift well stability
Inlet Ports
Features
~ Available from '/a to 3/a in. in the 1'/z-in.
valve size Converting Section
Throat (Orifice)
Benefits
~ Enables a constant injection rate with constant
injection pressure Diverging Section
~ Increases production flow stability
Packing
Check Valve
Outlet Ports
Nova Ualve
2-14 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
C H EM I CA L I N J ECT 1 O N VA LV ES ~ CN-20R: 1 ' /z-in. (3.81-cm) diameter
valve for TG
or T mandrels with TG, RK, RM, or T2 latches that
operate using a specific injection pressure rather
C SERIES VALVES than differential pressure; has a nitrogen dome
charge that is adjustable to 3,500 psi (24 132 kPa) at
Halliburton Energy Services' Merla~ C series valves 60°F
(16°C)
are designed to control injection of chemicals, fluids, or
water to minimize corrosion, emulsion formation, and
scale accumulation on tubing and downhole tools.
Injection rates are controlled by adjusting the spring
tension or port size before installation.
C series valves are designed to open when the pressure Packing
differential across the stem and seat exceeds the preset
spring force. Rates of chemical flow are controlled by
adjusting the chemical pump output at the surface.
When the injection pressure differential exceeds the
preset differential opening pressure, the valve opens
and allows fluid to enter the tubing string.
Port
Applications Tapered Stem
~ For systematic control of injection of chemicals,
fluids, or water Valve Seat
~ Intermittent injection
~ Continuous injection
~ Standard or sour service o
~ With amine-based chemicals
Features Open
~ Adjustable spring tension or port size
~ Built-in back check valve
Benefits
~ Injection fluids can be pumped into the system
intermittently or continuously Adjusting Screw
~ Rates of from one quart to 600 gal (0.95 to 2271
liters) per day may be injected
~ Protection against back flow into the casing
annulus Packing
~ Designed to help minimize corrosion, emulsion
formation, and scale accumulation on tubing and
downhole tools
~ Valve opens at a preset pressure
Options
Standard series models of wireline-retrievable chemi- Back Check Valve
cal injection valves include
~ C-30R: 1'/z-in. (3.81-cm) diameter valve for TG or T
mandrels with TG, RK, RM, or T2 latches ° '
o C
~ CM-30R: 1-in. (2.54-cm) diameter valve for TM
mandrels with BK-Z or M latches
Closed
C Series Chemical Injection Ualve
GAS LIFT SYSTEMS 2-15

CA 02236052 1998-04-27
HALLIBURTON
DUMMY AND EQUALIZING VALVES
D SERIES VALVES
Halliburton Energy Services' Merla~ D series valves
are installed in side pocket mandrels by wireline to
block the mandrel's injection gas ports. Dummies can
be run before or after completion for testing tubing,
packers, and other equipment. In new installations,
dummies can be retained in the mandrel until gas lift
valves are required to maintain production. Then,
dummies are pulled and gas lift valves installed by
wireline. Also during the life of the well, gas lift valves
installed above the fluid level can be replaced with
dummies to block off injection gas. They are available
in 1 and 1 '/z-in. (2.54 and 3.81-cm) sizes.
Applications
~ Block the mandrel's injection gas ports for testing
tubing, packers, and other equipment
~ For new installations, dummies can be used in the
mandrel until gas lift valves are needed
~ Replacement for gas lift valves above the fluid level
to block injection gas
Benefits
~ Pulled by wireline
~ Can be run before or after completion
Options
Standard series wireline-retrievable dummy valve
models include
~ D-14R: 1'/z-in. (3.81-cm) valve for TG or T man-
drels with TG, RK, RM, and T2 latches
~ DM-14R: 1-in. (2.54-cm) valve for TM mandrels
with BK-2 and M latches
~ DT-14R: 1 ~/z-in. (3.81-cm) high-temperature valve
for TG or T mandrels with TG, RK, RM, and T2
latches
~ DTM-14R: 1-in. (2.54-cm) high-temperature valve
for TM mandrels with BK-2 and M latches
1 1/2-in.
Dummy Ualve
2-16 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
ED SERIES VALVES
Halliburton Energy Services' Merla~ ED series equaliz-
ing valves with integral latches are designed to equal-
ize tubing and casing and/or circulate before pulling
the valve. They are also available in both 1 and 1 '/z-in.
(2.54 and 3.81-cm) sizes.
To equalize pressure, a pulling tool pushes the inner
core of the ED series valves downward, which shears a
pin and allows circulation or equalization. When the
core moves down, the pulling tool collets latch over
the fish neck, and the valve is pulled as usual. This tool
is designed so that both equalizing and pulling opera-
tions can be performed in one wireline run. It is also
possible to leave the valve in the side pocket mandrel
for continued circulation by shearing down on the
inner core with a special tool. The valve may be pulled
at a later date with a standard pulling tool.
Applications
~ Equalize tubing and casing pressure and/or
circulate before pulling the valve
Features
~ Integral latches to equalize tubing and casing
Benefits
~ Both equalizing and pulling operations can be
performed in one wireline run
~ Shear the inner core with a special tool
~ Pull with a standard pulling tool
Options
Standard series wireline-retrievable equalizing
dummy valve models include
~ ED-30R*: 1 '/z-in. (3.81-cm) valve for TG or T
mandrels with an integral latch
~ EDM-30R*: 1-in. (2.54-cm) valve for TM mandrels
with an integral BK-2 latch
The ED Series valves may be equalized and pulled
with one wireline run.
1-in.
Equalizing Dummy Ualve
GAS LIFT SYSTEMS 2-17

CA 02236052 1998-04-27
H A L L I B U R T O N
LATCHES FOR VALVES IN SIDE
POCKET MANDRELS
Halliburton Energy Services' Otis~ and Merla~ latches
are used with retrievable gas lift and circulation valves
installed in side pocket mandrels. These latches are
designed to be installed with a minimum of force,
which is very important in deviated wells where
forceful downward jarring may be difficult. Hallibur-
ton side pocket mandrels feature two types of pocket
latch profiles: G-type and A-type. G- and A-type
latches are not interchangeable; however, valves and
other flow control devices can be adapted from one
profile to the other by selecting the correct latch.
G-TYPE LATCHES
Four different latches are available for use in G-type
pocket mandrels: TG, M, RK, and BK-2. The 1'/z-in.
(3.81-cm) TG and 1-in. (2.54-cm) M latches have a set
of collet-type locking dogs that move up and into a 1 1/2-in. 1-in.
recess in the locking mandrel as the latch engages the TG Latch BK2 Latch
pocket profile. When an upward pull is exerted on the
latch, the full diameter of the locking mandrel moves
behind the dogs to lock them in the set position. To
retrieve the valve and latch, an upward force is used to
shear a pin. This action moves the locking mandrel up
and allows the dogs to retract as the valve and latch
are pulled.
The 1'/z-in. (3.81-cm) RK and 1-in. (2.54 cm) BK-2
latches use a locking ring held in position by spring
force. As the latch enters the side pocket profile, the
locking ring moves up and into the recessed area of the
latch. When the latch seats, the ring is positioned in the
locking recess of the pocket. To retrieve the latch, a pin
is sheared by upward force allowing the locking ring
mandrel to move up and out of the way. The ring is
then freed to disengage from the locking recess as the
valve and latch are retrieved.
Features
~ 180° eccentric latch ring profile
~ No-go surface near the lower end of the latch
~ Collet-type locking dogs (TG and M latches)
~ Spring-loaded locking ring (RK and BK-2 latches)
1 1 /2-in. 1-in
RK Latch M Latch
2-18 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
H A L L I B U R T O N
A-TYPE LATCHES
Two latches are available for use in A-type pocket
mandrels: T2 and RM.
The 1'/z-in. (3.81-cm) T2 latches use a set of collet-type
locking dogs configured inside a slotted sleeve. As the
latch enters the pocket, the dogs move up and into a
recess into the locking mandrel. After reaching the
no-go position, an upward pull causes the dogs to
move over the locking mandrel and lock into the
pocket recess. To release the locking dogs, an upward
force is applied which shears a pin, moving the locking
mandrel up. The latch and valve are then free to be
retrieved.
The 1'/z-in. (3.81-cm) RM latches have a set of
spring-loaded locking dogs that move up into a
recessed area on the latch core when run into the latch o
profile of the mandrel. The valve is lowered into the
pocket until the no-go shoulder is reached. The spring
force moves the locking lug ring downward, forcing 1 1/2-in.
the dogs to move over and onto the large OD of the T2 Latch
inner mandrel thus locking the valve in place. To
release the latch, a pin is sheared by upward force
allowing the inner mandrel to move up and out of the
way The locking dogs are then free to return to the
recess area as the latch and valve are retrieved.
Applications
~ With retrievable gas lift and circulation valves
being installed in side pocket mandrels
~ Deviated wells
~ Wells where downward jarring would be difficult
Features
~ 360° latch profile
~ No-go surface above the locking mechanism
~ Collet-type locking dogs (T2 latches)
~ Spring-loaded locking dogs (RM latches)
Benefits
~ Can be installed with minimum force
~ Selecting the correct latch profile allows valves and
other flow control equipment to be adapted from "
one profile to another 1 1/Z-in.
RM Latch
GAS LIFT SYSTEMS 2-19

CA 02236052 1998-04-27
HALLIBURTON
SIDE POCKET MANDRELS
This section covers the T and TM series side pocket
mandrels , the High-Strength Tru-Guide side pocket
mandrels, and wireline positioning tools.
T ANDTM SERIES MANDRELS
Halliburton Energy Services' Otis~ and Merla~ side
pocket mandrels feature a tapered oval cross-section to
help guide the valve toward the pocket as it is in-
stalled. The pocket is offset to clear the tubing bore,
which maximizes the flow area and allows tools to
pass through the mandrel without restriction. The
external shape allows dual string installations without
requiring a reduced mandrel ID. Internal tool deflec-
tors protect the latch by helping prevent tools larger
than the pulling/running tool from entering the latch
recess. A positioning sleeve provides positive mandrel
location and orientation for inserting the valve into the
offset pocket.
Applications
~ Dual string installations
~ Gas lift, chemical injection, circulation, and water-
flood (TM series)
Features
~ Tapered oval cross-section to guide the valve 'r'
toward the pocket
~ Offset pocket
~ Nonrestricted tubing bore
~ Positioning sleeve locates mandrel for inserting T and TM
the valve Mandrel Profile
~ Internal tool deflectors
Benefits
~ Maximum flow area allows tools to pass through
the mandrel without restriction
~ Dual string installations without a reduced
mandrel ID
Options
~ End connections are available in both EU and/or
premium box thread configurations.
~ The T series mandrels for 1'/z-in. (3.81-cm) valves
are available for tubing sizes up to 7-in.
0
(17.8-cm) OD.
~ The TM series for 1-in. (2.54-cm) valves is available
for tubing sizes to 4 ' /z-in. (11.4-cm) OD. Both External Shape Allows TMP
Side Pocket
series feature multiple porting variations to accom- Dual Installations
Mandrel
modate wireline installation of valves for gas lift, Without Reduced IDs
chemical injection, fluid circulation, or waterflood
injection. They can be run in the initial string of a
flowing well completion so that it can be converted
to gas lift later.
2-20 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
A ~C
o ~ I II II Ill ICI I ~~ I, g
I I~I~,, D
Drift
T Series for 1 %-Inch OD Valves
T
Series
Mandrel
S
ecifications
for
1
112
Inch
OD
Valves
Tubing M~drel Dimensans Weight
OD
BRDEUE p g C D E F
in. cm. T Sha in. cm. in. cm. in. cm. in. cm. in.cm. in. cm. Ib k
a a
2 6.03T Oval101 256.54.7512.064.0010.161.9014.831.5583.961.4963.80130 58.9
3B
2 6.03TP Oval110 279.44.7512.064.0010.161.9004.831.5583.961.4963.80130 58.9
3B
2 7.30T Oval100 254 5.46013.874.2510.802.34705.961.5583.961.4963.80165 74.8
7/8
2 7.30TP Oval110 279.45.46013.874.2510.802.3475.961.5583.961.4963.80175 79.4
718
3 7.62T Oval100 254 5.96015.144.5511.562.8677.281.5583.961.4963.80215 79.4
1
rZ
31/L7.62TP Oval110 279.45.96015.144.5511.562.8677.281.5583.961.4963.80225
102.2
4 10.16TP Round115 292.16.47016.436.3016.003.3518.511.5583.961.4963.80257
116.5
4 11.43TP Round112 284.57.03017.866.8217.323.8339.741.5583.961.4963.80320
145.2
1/2
12.7TP Oval114 2.89.67.48019.006.5616.664.28010.871.5583.961.4963.80295 133.8
512 13.97TP Round116 294.67.90020.477.7419.664.65011.811.5583.961.4963.80420
190.5
7 17.78TP Round116 294.68.38021.298.3321.165.00012.701.5583.961.4963.80480
217.7
A C
~r>~; i
1; 4 I D
Drift
TM Series for 1-Inch OD Valves
TM-Series
Mandrel
S
ecifications
For
1-Inch
OD
Valves
TubingOD M~drel Dimens'rons
Weight
SRDEUE p g C D E F
in. cm. T Sha in. cm. in. cm. in. cm. in. cm. in.cm. in, cm. Ib k
a
2 6.03TM Oval63 160 4.25010.802.917.391.9014.831.0272.611.0272.6164 29.0
3/B
2 6.03TMPOval73 185 4.25010.802.917.391.9014.831.0272.611.0272.6174 33.5
3/8
2 7.30TM Oval63 160 4.79012.173.508.892.3475.961.0272.611.0272.6190 40.6
7/8
2 7.30TM Oval73 185 4.79012.173.508.892.3475.961.0272.611.0272.61106 48.9
7l8 P
31127.62TM Oval64 163 5.62014.274.2510.802.8677.281.0272.611.0272.61117 53.9
3 7.62TM Oval86 218 5.62014.274.2510.802.8677.281.0272.611.0272.61156 70.3
12 P
4 10.16TMPRaund90 229 5.80014.735.6914.453.3518.511.0272.611.0272.61210
94.6
4 11.43TMPRound86 218 6.50016.516.3316.083.8339.741.0272.611.0272.61185
84.5
1!2
GAS LIFT SYSTEMS 2-21

CA 02236052 1998-04-27
HALLIBURTON
HI STRENGTH TRU-GUIDE~ SIDE POCKET
MANDRELS
Halliburton Energy Services' Otis~ Hi Strength
Tru-Guide~ side pocket mandrels offer a practical
solution to handling high fluid rates and downhole
pressures. These mandrels feature a round cross-
,.
section and are available for tubing sizes up to 5'/z-in.
(14-cm) OD. Many of these mandrels are designed to
have pressure ratings equivalent to the corresponding
tubing.
Applications
~ High fluid rates and downhole pressures
Features
~ Round cross-section
~ Full-opening side pocket mandrel
~ Uniform material properties-entire mandrel is
fully quenched and tempered before threading
~ Patented positioning sleeve alignment assembly
~ No sharp shoulders
~ No longitudinal welds
~ Pressure ratings equivalent to tubing
Benefits
~ Greater structural integrity
~ Improved engagement and orientation of
kickover tool
~ No hindrances of wireline tools
~ Can complete a well without severely limiting
injection and production pressures
Hi Strength Tru-Guide~
Side Pocket Mandrels
Hi
Stren
th
Tru-Guide
Mandrel
S
ecifications
Tubing W
OD A D E F G H eight
in.mm in. mm in. mm in. mm in. mm in. mm in. mm Ib kg
1-inch
OD
Valve
2 60.3382.422093.471.90148.291.02726.091.02726.094.25107.954.14105.2895 43.13
3/8
2 73.0382.232088.642.34759.611.02726.091.02726.094.76120.904.72119.8916072.64
7/8
3
88.9083.522121.412.86772.821.02726.091.02726.095.54140.725.44138.18227103.06
1
/2
4
114.3087.482221.993.83397.361.02726.091.02726.096.62168.156.46164.08280127.14
1
/2
1
1/2-inch
OD
Valve
2
73.03111.882841.752.34759.611.55739.551.49537.975.44138.185.44133.93295133.93
7/8
3
88.90112.432855.722.86772.821.55739.551.49537.975.96150.375.85148.59345156.63
1
/2
4
114.30114.122898.653.83397.361.55739.551.49537.977.10180.346.97177.04420190.68
1
/2
139.70116.392956.314.570116.081.55739.551.49537.977.78197.617.65194.44480217.92
1
/2
2-22 GAS LIFT SYSTEMS

CA 02236052 1998-04-27
HALLIBURTON
W I RE L I N E POS IT ION I N G Only
TOO LS the
brass
shear
pin
must
be
replaced
after
each
wireline
run
Halliburton Energy Services' Merla~Shear
wireline position- pin
can
be
replaced
with
the
tool
projecting
ing tools are designed to allow from
selective location of the the
lubricator
mandrel when two or more mandrels ' Reduced
are installed in a swabbing
effect
during
setting
or
well. The tool orients in the properpulling
position and offsets operations
the valve or pulling tool into positionDesigned
over the pocket to
prevent
accidental
kicking
over
during
for setting or retrieving. insertion
and
withdrawal
Tool
can
be
locked
in
the
in-line
or
offset
positions
To illustrate the operation of wirelineas
positioning tools, needed
schematic 1 shows the tool run below
the mandrel.
Since the tool is locked in a rigid
position, it is de-
signed not to kick over accidentally
In schematic 2, the tool has been
raised until its key E
engages the sleeve in the mandrel.
Continued upward
movement rotates the tool until
its key enters a slot. c
When the key reaches the top of
the slot, the weight
indicator shows increased weight
signaling that the
tool is properly oriented.
1
Schematic 3 shows that the pivot
arm is designed to
swing out and lock in position with
additional pull.
This action locates the valve or
pulling tool above the
pocket or latch on the gas lift
valve.
In schematic 4, the mandrel is guiding
the valve or
pulling tool to accurately land t t
the valve or engage the
latch on the valve.
Schematic 5 illustrates straight, upward pull shearing a
pin when the key reaches the top of the slot. This
action allows the trigger to glide freely out of the slot
and through the tubing. When the pivot arm reaches
the small upper section of the mandrel, it is designed
to snap back and lock into its vertical running position,
reducing drag on the tool and valve as it is removed.
Applications
~ Selective location of a mandrel in a well with two
or more mandrels installed
Features
~ Pivot arm
~ Locked in rigid position
~ Spring-loaded trigger key
~ Large internal and external bypass flow area
Benefits
~ Operator sees weight increase when the mandrel is
properly positioned Schematic 1 Schematic 2 Schematic 3 Schematic 4 Schematic
5
GAS LIFT SYSTEMS 2-23

CA 02236052 1998-04-27
HALLIBURTON
ORDERING INFORMATION
Side Pocket Mandrel Gas Lift, Chemical
Injection,
Specify: Shear Relief, Orifice
Valve
Tubing (Size, Weight, Specify:
Thread)
BoxlBox or BoxlPin Valve Size (1.0 ",
1.50 ")
Valve Type (i.e., N-16R,
Valve Size (l . 0 ", LN-21R,
1.50 ")
etc.)
Porting Type (Standard,Bellows Type (optional-standard
Casing Flow,
Side String, Water Flood,bellows used if applicable
Chamber and not
Lift, Pump-down, Chemical
Inj., specified)
Twin Flow, Other)
Port Size (inches)
Side String Threads
(Size, Packing Type (i.e.,
Nitrite, Viton,
Weight, Thread) Teflon, Peek, etc.)
Dimensions (Max Run Valve Material (i.e.,
OD Required, stainless, money
Height, Width) carbide, etc.)
Shape (Oval, Round, Spring Type (optional-standard
Oval available
only in sizes Z-3/8" spring used if applicable
through 3-1/2") and not
Positioning Sleeve and specified)
deflectors
required (Yes or No) Elastomer Type (i.e.,
Viton, Aflas,
Material Type (4130/4140etc. Nitrite is standard
Alloy, if not
9CR-1M0, 410SS-13CR specified)
Service (%HzS, %CO~ Pressures (Max. Upstream,
Min.
Casing (Size, Weight, Downstream)
Thread)
Special Processing (referenceType Service (%HZS,
%COZ)
Customer specification Flow rate through valve
no.) (them. inj.
& shear relief bpd)
Special Processing
Req'd (i.e., API
llVl, Customer Specification,
etc.)
Shear Relief Pressure
Required
2-24 GAS LIFT SYSTEMS

Firmware

CA 02236052 1998-04-27
assembly code for Dummy Plug Tool
program RC mode, no watchdog, no startup timer, no brownout
list p=16c73A
#define _C STATUS,O
#define _Z STATUS,2
#define _PAGE STATUS,S
#define _BF SSPSTAT,O
#define _SSPOV SSPCON,6
#define WCOL SSPCON,7
INDF equ 0x00 ; Indirect Address
TMRO equ 0x01
OPT equ 0x01
PC equ 0x02 ; Program counter
STATUSequ 0x03
FSR equ 0x04 ; File Select Register
PORTA equ 0x05
TRISA equ 0x05
PORTB equ 0x06
TRISB equ 0x06 ; Data Direction register for
portB
PORTC equ 0x07
TRISC equ 0x07 , Data Direction for PortC
PORTD equ 0x08 ;
TRISD equ 0x08 ; Data Direction register for
portD
ADCONlequ OxlF
TRISE equ 0x09
INTCONequ OxOb
PIEl equ OxOc ; Peripheral interrupt enable
PIRl equ OxOc ; Peripheral interrupt flags
OPTREGequ 0x01 ; OPTION Register
TMR1L equ OxOe ; Timerl Low byte
TMR1H equ OxOf ; Timerl High byte
T1CON equ 0x10 ; Timerl control register
TMR2 equ 0x11

CA 02236052 1998-04-27
T2CON equ 0x12 ; Timer2 control register
PR2 equ 0x12 ; Timer2 Period register bank 1
SSPBUFequ 0x13 ; SPI Buffer
SSPCONequ 0x14 ; Sync Serial Port Control Register
SSPSTATequ 0x14 ; Sync Serial Port Control Register
CCPR1Lequ 0x15
CCPR1Hequ 0x16
CCP1CONequ 0x17
RCSTA equ 0x18
TXSTA equ 0x18
TXREG equ 0x19
SPBRG equ 0x19
RCREG equ Oxla
TempW equ 0x20 ; for interrupt stacking W
Temps equ 0x21 , for interrupt stacking Status register
TempFSRequ 0x22 ; for interrupt stacking FSR
TH equ 0x23 ; 24 bit temperature count storage
TM equ 0x24
TL equ 0x25
PH equ 0x26 ; 24 bit pressure count storage
PM equ 0x27
PL equ 0x28
PCmd equ 0x29 ; command number from packet
CSUM equ Ox2a , CRC value
Res1 equ Ox2b ; return value ack packet
Res2 equ Ox2c ; return value ack packet
TMV equ Ox2d ; time 23-16
TMH equ Ox2e ; time 15-8
TML equ Ox2f ; time 7-0
AMV equ 0x30 ; alarm time 23-16
AMH equ 0x31 ; alarm time 15-8
AML equ 0x32 ; alarm time 7-0
DLl equ 0x30 ; delay counter used at start only
DL2 equ 0x31 ; delay counter used at start only
DL3 equ 0x32 ; delay counter used at start only
SMV equ 0x33 ; program change time 23-16
SMH equ 0x34 ; program change time 15-8
SML equ 0x35 ; program change time 7-0
AINCH equ 0x36 , alarm increment 15-8
AINCL equ 0x37 ; alarm increment 7-0

CA 02236052 1998-04-27
PPtr equ 0x38 ; packet pointer
FTl equ 0x39 ; temporary storage FSI routines
FBLOCK Ox3a ; current block
equ
FPAGE a Ox3b
a , current page
q
FCHIP equ Ox3c ; current chip
SOUT equ Ox3d ; temporary storage format routines
LC equ Ox3e ; loop counter
FTEMP equ Ox3f , temp storage flash routines
FORMAT 0x40
equ
LC1 equ 0x41
FMASKl 0x42
equ
NCPY equ 0x43
SRC equ 0x44
DEST equ 0x45
PDATA equ 0x46
PROGRAM 0x47
equ
SCNTR equ 0x48
PMODE equ 0x49 ; mode = 0 comm, = 1 log
PSEG equ Ox4a
TCHIP equ Ox4b
TBLOCK Ox4c
equ
TPAGE equ Ox4d
TOGGLE Ox4e
equ
PH1 equ Ox4f
PM1 equ 0x50
PL1 equ 0x51
TH1 equ 0x52
TM1 equ 0x53
TLl equ 0x54
GAINO equ 0x55
GAINl equ 0x56
FOLO equ 0x57
FOHI equ 0x58
F1L0 equ 0x59
F1HI equ OxSa
XV equ Ox5b
XH equ OxSc
XL equ OxSd
SCISpeed OxSe
equ
TMODE equ Ox5f
FBUF equ 0x60 , flash buffer address
FPTR equ OxBO ; bad block table address

CA 02236052 1998-04-27
RBUF equ OxCO
RINPTRequ Oxal
ROUTPTRequ Oxa2
Templ equ Oxa3
FSRl equ Oxa4
FMASK equ Oxa5
TINPTRequ Oxa6
TOUTPTRequ Oxa7
org 0 ;start address 0
goto Start
org 0x04
goto Isr
Isr movwf TempW ; Save Working register could be page 0 or
1
swapf STATUS,O ; Get swapped status in working register
(No Z)
bcf _PAGE ; all other stacking page 0
movwf Temps ; Save swapped status
movf FSR,O ; get FSR
movwf TempFSR ; save fsr
btfsS PIR1,5 , incomming SCI
goto RTCInt ; process RTC
SCIInt bsf _PAGE ; page 1
movf RINPTR,O ; get in pointer
movwf FSR ; setup indirect
bcf _PAGE ; page 0
movf RCREG,O ; get data clear interrupt
bsf _PAGE ; page 1
movwf INDF ; save data
incf RINPTR,O ; increment in pointer
andlw Ox3f ; max length
iorlw OxcO ; base address
movwf RINPTR ; save updated inptr
bcf _PAGE ; page 0
goto EINCO ; cleanup interrupt
RTCInt bcf PIR1,0 ; Acknowledge interrupt
btfss TOGGLE,? turn LED On ?
;

CA 02236052 1998-04-27
goto Noted ; no
bcf TOGGLE,7 , clear flag
bsf TOGGLE,6 ; flag for turn off
bsf PORTC,7 ; turn it on
goto DoRTC
Noted btfss TOGGLE,6
goto DoRTC
bcf TOGGLE,6
bcf PORTC,7
DoRTC btfss TMODE,O
goto LowTemp
HighTemp
movlw Oxlf ; 57600 counts per overflow
iorwf TMR1H,1 ; one second for next intreval
btfss TMODE,l ;
goto Tog ;
bcf TMODE,l
bsf TMODE,2
incf TML,1 ; Increment byte 0 of time counter
btfss _Z ; was there a carry
goto EINCO ; if not done
incf TMH,l , account for byte 0 carry i.e. increment byte
1
btfss _Z ; was tere another carry
goto EINCO ; if not done
incf TMV,1 ; account for carry from byte 1
goto EINCO
Tog bsf TMODE,1
goto EINCO
LowTemp
movlw 0x80 ; bit 15 of timer to be set
iorwf TMR1H,1 ; one second for next intreval
incf TML,1 ; Increment byte 0 of time counter
btfss _Z , was there a carry
goto EINCO ; if not done
incf TMH,1 ; account for byte 0 carry i.e. increment byte
1
btfss _Z ; was tere another carry
goto EINCO ; if not done
incf TMV,l ; account for carry from byte 1
EINCO movf TempFSR,O ; Read address in FSR
movwf FSR ; Save Address

CA 02236052 1998-04-27
swapf TempS,O ; restore status to W
movwf STATUS ; restore status
swapf TempW,1 ; swap ( No Z )
swapf TempW,O ; restore W
retfie
SPISend macro outbyte
movlw outbyte
call SPITAD
endm
SPITAD ;bcf PORTB,6
bcf _WCOL
movwf SSPBUF ; send on Spi
bsf _PAGE
ZT: btfss _BF
goto ZT
bcf _PAGE
movf SSPBUF,O
;bsf PORTB,6
return
SPITrans:
bcf _WCOL
movwf SSPBUF ; send on Spi
bsf _PAGE
WFT: btfss _BF
goto WFT
bcf _PAGE
movf SSPBUF,O
return
SPITransRDY:
bcf _WCOL
movwf SSPBUF ; send on Spi
bsf _PAGE
WFT1: btfss _BF
goto WFTl
bcf _PAGE
movf SSPBUF,O
WFT2: btfss PORTC,4
goto WFT2

CA 02236052 1998-04-27
return
SPIInit:
bsf PAGE ; bank 1
bsf _ ; SDI as input
TRISC,4
bcf TRISC,5 , SDO as output
bcf TRISC,3 ; SCK as output
bcf PAGE ; bank 0
movlw 0x31 ; SPI enabled clk=osc/64, clock idle low,
master
movwf SSPCON ; set SPI on
return
FBufInc
incf FSR,1
btfss _Z
return
movlw RBUF
movwf FSR
return
SCIGet bsf _PAGE ; SCI data structure in page
1
movf ROUTPTR,O ; get pointer to next read
subwf RINPTR,O ; is available data past it
bcf _PAGE ; back to page 1
btfsc _Z ; if zero no available data
goto SCIGet ; keep checking
bsf _PAGE ; to page 1 data
movf ROUTPTR,O ; get read pointer
movwf FSR ; for future indirect read
incf ROUTPTR,O ; add 1 put in W
andlw Ox3f ; modulo 32
iorlw RBUF ; base address
movwf ROUTPTR , save updated pointer
movf INDF,O ; read byte
bcf -PAGE , back to page 0
return
SCISendChar
bsf _PAGE ; SCI register in page 1
WTx btfss TXSTA,l ; is TX empty

CA 02236052 1998-04-27
goto WTx ; wait for empty
bcf _PAGE ; page 0
movwf TXREG ; send data byte
return
SCISendRes
movwf Res1 , save working register
movlw Oxff ; preamble byte 1
call SCISendChar ; send it
movlw Oxff ; preamble byte 2
call SCISendChar , send it
movlw 0x37 ; packet id
movwf CSUM ; initialize checksum
call SCISendChar ; send it
movf Resl,O , acknowledge command
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
movf Res2,0 ; acknowledge command
xorwf CSUM,l , update checksum
call SCISendChar ; send it
movlw 0x01 ; length
xorwf CSUM,1 , update checksum
call SCISendChar ; send it
movf CSUM,O ; update checksum
call SCISendChar ; send it
bsf _PAGE , page 1
WTx1 btfss TXSTA,l , TX empty ?
goto WTx1 ; wait for empty
bcf -PAGE ; reset page 0
return ; done
SCIData
movf PPtr,O ; address of start of
packet
movwf FSR ; setup indirect
call FBufInc ; increment packet pointer
call FBufInc ; increment packet pointer
bsf _PAGE , page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwf FOHI ; load FCHIP
call FBufInc , increment packet pointer
bsf -PAGE , page 1 has data

CA 02236052 1998-04-27
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwfFOLO ; load FBLOCK
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwfGAINO ; load FPAGE
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwfF1HI ; load FPAGE
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwfF1L0 ; load FPAGE
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE , page 0 has variables
movwfGAIN1 , load FPAGE
call FBufInc ; increment packet pointer
call ADSlow ; get pressure
movlwOxff ; preamble byte 1
call SCISendChar ; send it
movlwOxff ; preamble byte 2
call SCISendChar ; send it
movlw0x37 ; packet id
movwfCSUM ; initialize checksum
call SCISendChar ; send it
movlwOxbl ; acknowledge command
xorwfCSUM,l ; update checksum
call SCISendChar ; send it
movlwOxbl ; acknowledge command
xorwfCSUM,1 ; update checksum
call SCISendChar ; send it
movlw0x07 ; length
xorwfCSUM,l ; update checksum
call SCISendChar ; send it
movf TH,O ; get temperature 23-16
xorwfCSUM,l ; update checksum

CA 02236052 1998-04-27
call SCISendChar ; send it
movf TM,O ; get temperature
15-8
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
movf TL,O ; get temperature
7-0
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
movf PH,O , get pressure 23-16
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
movf PM,O ; get pressure 15-8
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
movf PL,O ; get pressure 7-0
xorwf CSUM,1 ; update checksum
call SCISendChar ; send it
movf CSUM,O ; check sum
call SCISendChar ; send it
return
SCIErase
movf PPtr,O ; packet pointer
movwf FSR ; setup indirect
call FBufInc ; advance packet pointer
call FBufInc ; advance packet pointer
bsf _PAGE ; page 1
movf INDF,O ; get packet data
bcf _PAGE ; page 0
movwf FCHIP , set FCHIP
call FBufInc , advance packet pointer
bsf _PAGE ; page 1
movf INDF,O ; get packet data
bcf _PAGE ; page 0
movwf FBLOCK , set FBLOCK
clrf FPAGE ; clear FPAGE not relavent
movf OCK,O
FBL
btfsc
_Z
nop
call FLASHErase ; Erase block FCHIP, FBLOCK
call SCISendRes ; send acknowledge
return , done

CA 02236052 1998-04-27
SCIGetPck
clrf CSUM ; clear check sum
Pl call SCIGet ; see if there is an available character
movwf Resl ; save for future
bsf PAGE ; ROUTPTR is page 1
movf _ ; get inptr
ROUTPTR,O
bcf _PAGE ; back to page 0
movwf PPtr ; PPtr is start of this packet
movf Resl,O ; data byte
movwf CSUM ; initial value for CRC
sublw 0x37 ; inticates start packet
btfss _Z ; if zero then start processing
goto P1 ; wait for start of packet
call SCIGet ; get cmd character
movwf PCmd ; save for future processing
xorwf CSUM,1 ; update checksum
call SCIGet ; get cmd character
movwf LC , length of data
xorwf CSUM,1 ; update checksum
CLoop call SCIGet ( get first data charcter
xorwf CSUM,1 ; update checksum
decf LC,l ; decrement byte counter
btfss _Z ; is loop done
goto CLoop ; continue
call SCIGet ; get checksum
subwf CSUM,O ; check packet
btfss Z ; packet ok
goto _ ; no so look for next one
SCIGetPck
return , packet ok
SCIFormat
movlw 0x00 ; chip 0
movwf FCHIP , set for FormatChip
call SCIFormatChip ; format it
movlw 0x01 ; chip 1
movwf FCHIP ; set for FormatChip
call SCIFormatChip , format it
movlw 0x02 ; chip 2
movwf FCHIP ; set for FormatChip
call SCIFormatChip ; format it
movlw 0x03 ; chip 3

CA 02236052 1998-04-27
movwf FCHIP ; set for FormatChip
call SCIFormatChip ; format it
return
SCIFormatChip
call FLASHFormat ; format the flash
clrf FBLOCK ; set block 0
clrf FPAGE ; set page 0
call FLASHFindNext ; find first good block
movf FBLOCK,O ; get block no
movwf FORMAT ; save block no
incf FBLOCK,1 , move to next block
call FLASHFindNext ; find cal block no
movf FBLOCK,O ; get cal block
movwf DEST ; temp storage for cal block
incf FBLOCK,1 ; move to next block
call FLASHFindNext ; find program block no
movf FBLOCK,O ; get program block
movwf SRC ; temp storage for program block
movf PPtr,O ; get packet pointer
movwf FSR ; setup indirect
call FBufInc , advance pointer
bsf PAGE ; page 1
movf _ ; get packet length
INDF,O
bcf PAGE ; page 0
movwf _ ; save packet length
LC1
movlw 0x04 ; number of bytes at end of packet
subwf LC1,1
call FBufInc ; advance packet pointer
movf FSR,O ; get current packet pointer
movwf FSRl ; save source pointer
movlw FBUF ; base address flash buf
movwf Templ ; save destination pointer
FLp movf FSR1,0 ; source pointer in W
movwf FSR ; setup indirect
bsf PAGE , page 1
movf _ ; get data
INDF,O
bcf PAGE ; page 0
movwf _ ; save data
SOUT
call FBufInc ; advance packet pointer
movf FSR,O ; get updated FSR
movwf FSR1 ; save source pointer
movf Templ,0 ; get dest pointer

CA 02236052 1998-04-27
movwf FSR ; setup indirect
movf SOUT,O ; get data
movwf INDF ; save data in FBUF
incf Templ,l ; increment destination pointer
decf LCl,l ; update loop counter
btfss _Z ; = done ?
goto FLp
movf DEST,O ; get cal block
movwf INDF ; store in FBUF
incf FSR,l ; advance pointer
clrf INDF : 0 byte for PC
incf FSR,1 ; advance pointer
movf SRC,O ; get program block
movwf INDF ; save data
incf FSR,1 ; advance pointer
clrf INDF ; 0 byte for PC
movf FORMAT,O ; get format block
movwf FBLOCK
clrf FPAGE
call FLASHWritePage , write ID info to block 0, page 0
movlw 0x10 ; number of bytes to copy
movwf LC ; save in loop counter
movlw FPTR ; address of data in page 1
bsf PAGE , page 1
movwf _ ; save address
FMASK
bcf PAGE ; page 0
movlw _ ; address of flash buffer
FBUF
movwf FTEMP ; save address in var
CLoopl bsf PAGE ; page 1 for format data
movf _ ; get source address
FMASK,O
movwf FSR ; setup indirect addressing
incf FMASK,l ; advance source pointer
movf INDF,O ; get bad block data
bcf PAGE ; page 0
movwf _ ; temporary storage
LC1
movf FTEMP,O ; get destination pointer
movwf FSR ; setup indirect storage
incf FTEMP,1 ; advance destination pointer
movf LC1,0 ; get bad block data
movwf INDF ; save data
decf LC,1 ; next byte

CA 02236052 1998-04-27
SCIInit
btfss Z ; done ?
goto _ ; not done
CLoopl
movlw 0x01 ; page 1 is bad block
movwf FPAGE ; set up for FLASHWritePage
call FLASHWritePage ; write bad block table
movlw Oxal ; acknowledge response
call SCISendRes ; send response package
return , done
bsf PAGE ; SCI data in page 1
movlw _ ; base address of receive data buffer
RBUF
movwf RINPTR ; initialize inptr
movwf ROUTPTR ; initialize outptr
movlw OxOb ; 19200 baud at 4Mhz
movwf SPBRG ; initit SCI
bcf TXSTA,4 ; asyncronous
bsf TXSTA,2 , BRGH =1 for high speed
bsf TXSTA,5 ; transmit enable
bcf PAGE ; page 0
bsf _ ; receive enable
RCSTA,4
bsf RCSTA,7 ; SCI enable
bsf PAGE ; page 1
bsf _ ; receive interrupt enable
PIE1,5
bcf PAGE ; page 0
bsf _ ; peripheral interrupts enabled
INTCON,6
bsf INTCON,7 ; general interrupts enabled
return
flash defines
#defineCSF1 PORTB,4
#defineCSF2 PORTB,5
#defineCSF3 PORTB,3
#defineCSF4 PORTB,2
#defineCSAD PORTB,6
#defineSCLK PORTC,3
#defineMISO PORTC,4
#defineMOSI PORTC,5
ADDelayO

CA 02236052 1998-04-27
SPISend Oxlc
SPISend 0x00
andlw OxeO
btfss Z
goto _
ADDelayO
return
ADDelayl
SPISend Oxld
SPISend 0x00
andlw OxeO
btfss Z
goto _
ADDelayl
return
ADWaitO SPISendOxOc ; read communications CHO
SPISend Oxff ; dummy for read
andlw 0x80 , isolate bit 7
btfss Z ; is it set
goto _ ; not set so wait
ADWaitO
return ; set so done
ADWaitl SPISendOxOd ; read communications CHl
SPISend Oxff ; dummy for read
andlw 0x80 ; isolate bit 7
btfss Z ; is it set
goto _ ; not set so wait
ADWaitl
return ; set so done
ADSlow movlw 0x22 ; SPI enabled clk=osc/64, clock idle low,
master
movwf SSPCON ; set SPI on
bcf CSAD ; select A/D
SPISend Oxff
SPISend Oxff
SPISend Oxff
SPISend Oxff
SPISend 0x24 ; setup write to filter high CHO
movf FOHI,O
call SPITAD
SPISend 0x34 , setup write to filter low CHO
movf FOL0,0
call SPITAD
SPISend 0x14 ; setup write to mode CHO
movf GAIN0,0

CA 02236052 1998-04-27
iorlw 0x20
call SPITAD
call ADDelayO
call ADWaitO ; wait for cal CHO
SPISendOxSC ; read data CHO
SPISend0x00 , dummy read
movwf PH ; high byte pressure
SPISend0x00 ; dummy read
movwf PM ; medium byte pressure
SPISend0x00 ; dummy read
movwf PL ; low byte pressure
SPISend0x25 ; setup write to filter high CHl
movf F1HI,0
call SPITAD
SPISend0x35 ; setup write to filter low CH1
movf F1L0,0
call SPITAD
SPISend0x15 , setup write to mode CH1
movf GAIN1,0
iorlw 0x20
call SPITAD
call ADDelayl
call ADWaitl ; wait for cal CH1
SPISendOxSd ; read data
SPISend0x00
movwf TH
SPISend0x00
movwf TM
SPISend0x00
movwf TL
bsf CSAD ; select A/D
movlw 0x32 ; SPI enabled clk=osc/64, clock idle low,
master
movwf SSPCON ; set SPI on
return
ADSample
bsf PORTC,2
call ADSlow
call RTCOff
movf SCNTR,O ; get sample counter
movwf FSR ; setup indirect addressing
movf TMH,O ; get low byte of time

CA 02236052 1998-04-27
movwf INDF ; save in buffer
incf FSR,1 , increment pointer
movf TML,O ; get high byte of time
movwf INDF ; save
incf FSR,1 ; increment pointer
movf PH,O ; get high byte of pressure
movwf INDF ; save
incf FSR,l , increment pointer
movf PM,O ; get middle byte of pressure
movwf INDF ; save
incf FSR,l ; increment pointer
movf PL,O ; get low byte of pressure
movwf INDF ; save
incf FSR,l ; increment pointer
movf TH,O , get high byte of temp
movwf INDF ; save
incf FSR,1 ; increment pointer
movf TM,O ; get middle byte of temp
movwf INDF ; save
incf FSR,1 ; increment pointer
movf TL,O ; get low byte of temp
movwf INDF ; save
incf FSR,1 ; increment pointer
movlw 0x08 ; record length
addwf SCNTR,l ; add to sample counter
movlw 0x80 , end of buffer
subwf SCNTR,O ; SCNTR - End
btfss Z ; if zero store and reset SCNTR
return _ ; not end
movlw FBUF , start of buffer
movwf SCNTR ; reinitialize sample counter
call FLASHSetAdd ; set flash address FCHIP,FBLOCK,FPAGE
call FLASHShiftIn , shift buffer in
call FLASHWrite ; write flash
btfsc GGLE,3 ; do verify and flash
TO
goto cFlash
In
movlw 0x60 ; get source address
movwf SRC ; save source address
movlw OxeO ; get dest address
movwf DEST ; save dest address
movlw 0x20 ; 16 bytes to copy
movwf NCPY ; initialize loop counter
call COPYToPagel ; copy to page 1

CA 02236052 1998-04-27
call FLASHReadPage
movlw FBUF
movwf FSR
VL37 movf INDF,O
bsf _PAGE
bsf FSR,7
subwf INDF,O
bcf FSR, 7
bcf _PAGE
btfss _Z
goto NoVerify
incf FSR,l
btfss FSR,7
goto VL37
incf TOGGLE,1
bsf TOGGLE,7
NoVerify
nop
IncFlash
nop
incf FPAGE,l ; next page
movlw 0x80 ; last page +1
subwf FPAGE,O ; pages from end
btfss Z ; if at end
return _ ; no so return
clrf FPAGE ; page 0
incf FBLOCK,1 ; next block
call FLASHFindNext : find next good block
call FLASHLabelData ; label first record of block
return ; done
FLASHSelect - Drop the CS line on the flash selected by FCHIP
FLASHSelect
movf FCHIP,O ; update Z bit in status
btfss _Z ; if not zero then look at next device
goto Try2 ; next device
bcf CSFl ; select flash 1
return ; done
Try2 movlw 0x01 ; test value

CA 02236052 1998-04-27
subwf FCHIP,O ; do test
btfss Z
goto _ ; no so next device
Try3
bcf CSF2 ; select flash 2
return ; done
Try3 movlw 0x02 ; test value
subwf FCHIP,O ; do test
btfss Z
goto Try4 , no so next device
bcf CSF3 ; select flash 3
return ; done
Try4 bcf CSF4 ; select flash 4
return ; done
FLASH Deslect - Raise the CS line on the flash selected by FCHIP
FLASHDeselect
movwf FTEMP , save working register from SPITrans
movf FCHIP,O ; update Z bit in status
btfss Z
goto _ ; no - so next device
Trys2
bsf CSF1 ; deselect flash 1
movf FTEMP,O ; restore W
return ; done
Trys2 movlw 0x01 ; test value
subwf FCHIP,O ; do test
btfss Z
goto _ ; no - so next device
Trys3
bsf CSF2 ; deselect flash 2
movf FTEMP,O ; restore W
return ; done
Trys3 movlw 0x02 ; test value
subwf FCHIP,O , do test
btfss Z % _
goto _ ; no - so next device
Trys4
bsf CSF3 ; deselect flash 3
movf FTEMP,O ; restore W
return ; done
Trys4 bsf CSF4 ; deselect flash 4
movf FTEMP,O ; restore W
return ; done

CA 02236052 1998-04-27
FLASHStatus - returns the status byte (of FCHIP) in W
FLASHStatus
call FLASHSelect ; select FCHIP
movlw 0x80 ; status command
call SPITrans ; send
movlw 0x00 ; dummy
call SPITrans ; get status in
W
call FLASHDeselect ; deselect
return ; done
FLASHEnable - enables write mode (of FCHIP)
FLASHEnable
call FLASHSelect ; select FCHIP
movlw OxeO ; enable command
call SPITrans , send
movlw 0x00 , dummy
call SPITrans ; get status in
W
call FLASHDeselect ; deselect
return ; done
FLASHStatus - disables write mode (of FCHIP)
FLASHDisable
call FLASHSelect ; select FCHIP
movlw Oxe8 ; disable command
call SPITrans ; send
movlw 0x00 ; dummy
call SPITrans ; get status in W
call FLASHDeselect ; deselect
return ; done
FLASHSetAdd - sets address of flash (FCHIP) state machine
FBLOCK 126 max
FPAGE 127 max

CA 02236052 1998-04-27
FLASHSetAdd
call FLASHSelect ; select FCHIP
movlw 0x88 ; set address command
call SPITrans ; send
movf FBLOCK,O ; block to set
call SPITrans ; send
movf FPAGE,O ; page to set
call SPITrans ; send
movlw 0x00 , dummy
call SPITransRDY ; send
call FLASHDeselect ; deselect FCHIP
return ; done
FLASHShiftIn
call FLASHSelect ; select FCHIP
movlw OxbO ; set shiftin command
call SPITrans ; send
movlw Oxff ; no of bits to shift
call SPITrans , send
movlw 0x20 ; 32 bytes = 256 bits = 1 page
movwf LC ; byte counter
movlw FBUF ; location to store data
movwf FSR ; for indirect addressing
d1 movf INDF,O ; get data
incf FSR,1 , increment pointer
call SPITrans ; send data
decf LC,l ; decrement loop counter
btfss _Z ; = done ?
goto dl ; no
call FLASHDeselect ; deselect FCHIP
return ; done
FLASHShiftOut
call FLASHSelect ; select FCHIP
movlw Oxb8 ; set shift out command
call SPITrans : send
movlw Oxff ; no of bits to shift out
call SPITrans ; send
movlw 0x20 ; 32 bytes = 256 bits = 1 page
movwf LC ; byte counter

CA 02236052 1998-04-27
movlw FBUF ; location to get data
movwf FSR ; for indirect addressing
d2 movlw 0x00 ; dummy byte
call SPITrans ; send
movwf INDF ; get data
incf FSR,1 ; increment pointer
decf LC,l ; decrement loop counter
btfss Z ; = done ?
goto _ ; no
d2
call FLASHDeselect ; deselect FCHIP
return
FLASHWrite
call FLASHSelect ; select FCHIP
movlw OxaO ; write command
call SPITrans ; send
movlw 0x55 ; confirm command
call SPITrans ; send
movlw 0x00 ; dummy
call SPITransRDY ; send and wait
call FLASHDeselect ; deselct FCHIP
return
FLASHErase
call FLASHSelect ; select FCHIP
movlw Oxa8 ; write command
call SPITrans ; send
movf FBLOCK,O ; block no
call SPITrans ; send
movlw 0x55 ; confirm
call SPITrans ; send
movlw 0x00 ; dummy
call SPITransRDY ; send and wait
call FLASHDeselect , deselect FCHIP
return
FLASHRead
call FLASHSelect ; select FCHIP
movlw 0x98 ; read command
call SPITrans ; send
movlw 0x00 ; dummy
call SPITransRDY ; send and wait

CA 02236052 1998-04-27
call FLASHDeselect ; deselect FCHIP
return
FLASHReadPage
call FLASHSetAdd ; set address with FBLOCK, FPAGE
call FLASHRead ; read flash
call FLASHShiftOut ; transfer data to FBUF (0x60)
return ; done
FLASHFillBuf
movwf SOUT , save fill value
movlw 0x20 ; number of bytes in buffer
movwf LC ; byte counter
movlw FBUF ; buffer base address
movwf FSR ; setup pointer
movf SOUT,O ; get fill value
fq movwf INDF ; store in buffer
incf FSR,1 ; advance pointer
decf LC,l , decrement counter
btfss _Z , = done ?
goto fq , no
return , done
FLASHChkBuf
movwf SOUT ; save check value
movlw 0x20 ; number of bytes in page
movwf LC ; loop counter = no of bytes
movlw FBUF ; base address of buffer
movwf FSR ; setup pointer
fr movf INDF,O ; get value
subwf SOUT,O ; compare to check value
btfss Z ; val = check ?
goto _ ; no so abort
err
incf FSR,1 ; advance pointer
decf LC,l , decrement loop counter
btfss Z ; = done ?
goto _ ; no so continue
fr
bsf Z ; done ( -Z set no error )
return _ ; done
err bcf Z , _Z clear = error
return _ , done

CA 02236052 1998-04-27
check block all values = W
FBLOCK to
ensure
FLASHChkBlock
movwf SOUT ; save check value
clrf FPAGE ; start at page 0
ChkLoop call FLASHSetAdd ; address = FBLOCK, FPAGE
call FLASHRead ; read flash
call FLASHShiftOut; transfer data to FBUF (0x60)
movf SOUT,O ; get check value
call FLASHChkBuf ; check page = SOUT
btfss Z ; if not -Z - error
goto _ ; process error
ChkErr
incf FPAGE,l ; next page
movlw 0x80 ; last page = 7f
andwf FPAGE,O ; compare
btfsc Z ; -Z set not done
goto _ ; continue next page
ChkLoop
bsf Z ; _Z set no error
return _ ; done
ChkErr bcf Z ; _Z clear error
return _ ; done
FLASHWritePage
call FLASHSetAdd ; set page address in FBLOCK
call FLASHShiftIn ; transfer data from FBUF to SR
call FLASHWrite ; write flash
return
FLASHFillBlock
clrf FPAGE ; start at page 0
WrLoop call FLASHSetAdd ; set page address in FBLOCK
call FLASHShiftIn ; transfer data from FBUF to SR
call FLASHWrite ; write flash
incf FPAGE,1 ; next page
movlw 0x80 ; last page = Ox7f
andwf FPAGE,O ; comare
btfsc Z ; result != 0 done
goto _ ; continue
WrLoop
return ; done
FLASHVerifyBlock
call FLASHErase , erase FBLOCK

CA 02236052 1998-04-27
movlw Oxff ; check value
call FLASHChkBlock ; check FBUF
btfss _Z ; if clear error
goto BadBlock ; process error
movlw Oxaa ; fill value
call FLASHFillBuf ; fill FBUF
call FLASHFiIlBlock ; write FBUF to FBLOCK
movlw Oxaa , check value
call FLASHChkBlock ; check FBUF
btfss _Z ; if clear error
goto BadBlock ; process error
call FLASHErase ; erase FBLOCK
movlw Oxff ; check value
call FLASHChkBlock ; check FBLOCK
btfss _Z ; if clear error
goto BadBlock ; process error
movlw 0x55 ; fill value
call FLASHFiIIBuf ; fill FBUF
call FLASHFiIlBlock ; write FBUF to FBLOCK
movlw 0x55 ; check value
call FLASHChkBlock , check FBUF
btfss _Z , if clear error
goto BadBlock ; process error
call FLASHErase ; erase FBLOCK
movlw Oxff ; check value
call FLASHChkBlock ; check FBUF
btfss _Z ; if clear error
goto BadBlock ; process error
BSF _Z ; set
Z ( no error)
return _
; done
BadBlock
bcf _Z ; error
return ; done
FLASHBadBlock
movf FB LOCK,O ; block number to test
movwf FT EMP ; save for shifting
rrf FT EMP,l ; fblock /2
rrf FT EMP,l ; fblock /4
rrf FT EMP,O ; fblock /8
andlw Ox Of ; W has byte offset for BB
addlw FPTR ; address of byte in page
1

CA 02236052 1998-04-27
movwf FSR ; for indirect addresing
bsf _PAGE , page 1
movf INDF,O ; data byte
bcf _PAGE ; page 0
movwf FTEMP ; save for testing
movf FBLOCK,O ; block number to check
andlw 0x07 ; block number mod 8
movwf LC1 ; number of shifts
movlw 0x80 ; initial mask
movwf FMASK1 ; save mask
TLoopmovf LC1,0 ; get bad block table data
btfsc Z ; = 0 ?
goto _ ; =0 so done shifting
TestBit
bcf _C ; clear carry for logical shift
rrf FMASK1,1 ; rotate right
decf LC1,1 ; decrement loop counter
goto TLoop ; continue shifting mask
TestBit FTEMP,O ; get data
movf
andwf FMASK1,0 , and with mask set
Z accordingly
return _
, done
FLASHFindNext
Looplmovlw Ox7f ; last block
subwf FBLOCK,O ; test flblock
btfss -Z ; if clear continue this chip
goto ChkBlk
incf FCHIP,1 ; next chip
movlw ; last chip
0x04
subwf P,O
FCHI
btfss
Z
_
goto NEnd
Fullnop ; all flash are full stop recording
sleep
nop
nop
nop
goto Full
NEndcall FLASHLoadBB; load new bad block table
movlw
0x01
movwf FBLOCK ; block 1
clrf FPAGE ; page 0

CA 02236052 1998-04-27
ChkBlkcall FLASHBadBlock ; check block
btfss _Z ; if set block bad
goto Foundl ; this block good
incf FBLOCK,l ; check next block
goto Loopl ; continue searching
Foundlreturn ; done
FLASHFormat
clrf FBLOCK ; start with block zero
bsf _PAGE ; page 1
movlw 0x80 ; initial mask value
movwf FMASK ; set mask
bcf _PAGE ; page 0
movlw FPTR ; points to storage area
movwf FSR ; set for indirect addressing
bsf _PAGE ; page 1
ZLoop clrf INDF
zero data
incf FSR,1 , next byte
movlw OxcO , end of data to be zeroed
subwf FSR,O ; test
btfss _Z ; at end?
goto ZLoop , no so continue zeroing
bcf _PAGE ; back to page 0
movlw FPTR ; points to storage area
movwf LC1 ; pointer
VLoop call FLASHVerifyBlock ; verify block in FBLOCK
btfss _Z ; if its set block was OK
goto NoBitS ; not OK so don't set bit
movf LC1,0 ; current byte
movwf FSR ; setup indirect
bsf _PAGE ; page 1
movf FMASK,O ; get mask
iorwf INDF,l ; or with bad block table
data
NoBitSbsf _PAGE ; page 1 if NoBitSet
bcf _C ; clear carry bit for rrf
rrf FMASK,l ; rotate to next bit position
btfss _C ; is mask bit in carry
goto NoInc , not last bit
rrf FMASK,l ; bit 7 now set again
bcf _PAGE ; page 0
incf LCl,l , increment byte pointer

CA 02236052 1998-04-27
NoInc bcf _PAGE ; back to page 0
incf FBLOCK,1 ; next block
movlw Ox7f ; last block to test + 1
subwf FBLOCK,O ; test
btfss _Z ; if < 127 continue
goto VLoop ; continue
return
FLASHIncrement
incf FPAGE,O ; increment page
btfss FPAGE,7 , - 128 ?
return ; not 128 so return
incf FBLOCK,l ; next block
movlw Ox7f ; last block
subwf FBLOCK,O ; test block no
btfss _Z ; if set last block
goto FIl ; dont change chip
incf FCHIP,l ; next chip
call FLASHLoadBB ; load new bad block table
incf FBLOCK,l ; block 1
clrf FPAGE ; page 0
FI1 call FLASHFindNext ; find next
return ; done
FLASHLoadBB
clrf FBLOCK
movlw 0x01 ; bad block in page 1 block
0
movwf FPAGE ; initialize page for read
call FLASHReadPage ; read page
movlw FBUF ; get source address
movwf SRC ; save source address
movlw FPTR ; get dest address
movwf DEST ; save dest address
movlw 0x10 ; 16 bytes to copy
movwf NCPY ; initialize loop counter
call COPYToPagel ; copy to page 1
return ; done
FLASHFindFirst
clrf FPAGE ; start at page 0
movf PDATA,O ; program block

CA 02236052 1998-04-27
movwf FBLOCK ; set FBLOCK
FFL incf FBLOCK,1 ; next block
call FLASHFindNext , find next good block
call FLASHSetAdd ; address = FBLOCK, FPAGE
call FLASHRead ; read flash
call FLASHShiftOut ; transfer data to FBUF (0x60)
movf FBUF,O ; get byte 0 of block
sublw 0x37 ; test byte
btfsc _Z ; if set not blank
goto FFL ; continue searching
movlw FBUF
movwf SCNTR
return ; done
FLASHLabelData
movlw FBUF ; start of buffer
movwf FSR , setup indirect
movlw 0x37 ; used block label
movwf INDF ; initialize block
incf FSR,1 , increment pointer
movf TMV,O , high byte time
movwf INDF ; initialize block
incf FSR,l ; increment pointer
movf TMH,O ; high byte time
movwf INDF ; initialize block
incf FSR,1 ; increment pointer
movf TML,O ; high byte time
movwf INDF ; initialize block
movlw 0x08 ; record length
addwf SCNTR,1 ; add to sample counter
return ; done
FLASHInit
clrf FCHIP , clear chip
call FLASHEnable , write enable
call FLASHStatus ; get status
incf FCHIP,1 ; chip 2
call FLASHEnable ; write enable
call FLASHStatus ; get status
incf FCHIP,l ; chip 3
call FLASHEnable ; write enable
call FLASHStatus ; get status
incf FCHIP,1 ; chip 4

CA 02236052 1998-04-27
call FLASHEnable , write enable
call FLASHStatus ; get status
clrf FCHIP ; clear chip
call FLASHEnable ; write enable
call FLASHStatus ; get status
return
COPYToPagel , needs DEST, SRC, NCPY
LdLoop movf SRC,O ; get source pointer
movwf FSR ; setup indirect
movf INDF,O , get data
movwf SOUT ; save data
movf DEST,O ; get destination pointer
movwf FSR ; setup indirect
movf SOUT,O ; get data
bsf _PAGE ; page 1
movwf INDF , store data
bcf _PAGE ; page 0
incf SRC,1 ; advance source pointer
incf DEST,1 , advance dest pointer
decf NCPY,1 ; decrement loop counter
btfss Z ; = done ?
goto _ ; continue
LdLoop
return ; done
COPYFromPagel ; needs DEST, SRC, NCPY
LdLp movf SRC,O ; get source pointer
movwf FSR ; setup indirect
bsf _PAGE ; page 1 data
movf INDF,O ; get data
bcf _PAGE ; page 0
movwf SOUT ; save data
movf DEST,O ; get destination pointer
movwf FSR ; setup indirect
movf SOUT,O ; get data
movwf INDF ; store data
incf SRC,l ; advance source pointer
incf DEST,1 ; advance dest pointer
decf NCPY,l ; decrement loop counter
btfss Z ; = done ?
goto _ ; continue
LdLp
return ; done

CA 02236052 1998-04-27
routine to load FCHIP, FBLOCK, FPAGE from packet data
FSCILdAdd
movf PPtr,O ; address of start of packet
movwf FSR ; setup indirect
call FBufInc ; increment packet pointer
call FBufInc ; increment packet pointer
bsf _PAGE , page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwf FCHIP ; load FCHIP
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE ; page 0 has variables
movwf FBLOCK ; load FBLOCK
call FBufInc ; increment packet pointer
bsf _PAGE ; page 1 has data
movf INDF,O ; get data point
bcf _PAGE , page 0 has variables
movwf FPAGE , load FPAGE
call FBufInc , increment packet pointer
return ; done
routine to ite a page from FCHIP, FBLOCK, FPAGE
wr SCI -
FSCIWrite
call FSCILdAdd ; load address from SCI Packet
call FBufInc ; advance packet pointer
call FBufInc , advance packet pointer
call FBufInc ; advance packet pointer
movf FSR,O ; get pointer to first value
movwf FTl ; save in temp storage
movlw FBUF ; get address flash buffer
movwf LC ; start address in LC
Gd movf FT1,0 , get pointer to next data
point
movwf FSR , set up pointer
bsf _PAGE , page 1
movf INDF,O ; get data
bcf _PAGE ; page 0
movwf Resl ; save data

CA 02236052 1998-04-27
movf LC,O , get page 0 pointer
movwf FSR ; setup indirect page 0
movf Resl,O ; get data
movwf INDF ; put data in flash buf
incf FTl,l ; increment page 1 pointer
btfss _Z ; wrap around
goto Gdl ; no wrap - continue
movlw RBUF , start after wrap
movwf FTl ; reinitialize page 1 pointer
Gdl incf LC,l ; increment FBUF pointer
btfss LC,7 ; = done ?
goto Gd ; continue
call FLASHWritePage ; done write data
call SCISendRes ; send acknowledge
return ; done
FSCIRead
call FSCILdAdd ; load FCHIP, FBLCCK, FPAGE
CALL FLASHReadPage , read
movlw Oxff ; preamble byte 1
call SCISendChar , send it
movlw Oxff ; preamble byte 2
call SCISendChar ; send it
movlw 0x37 ; packet id
movwf CSUM ; initialize CRC
call SCISendChar ; send it
movf Resl,O ; acknowledge command
xorwf CSUM,1 ; update CRC
call SCISendChar ; send it
movf Res2,0 ; acknowledge command
xorwf CSUM,1 ; update CRC
call SCISendChar ; send it
movlw 0x21 ; length
xorwf CSUM,l ; update CRC
call SCISendChar ; send it
movlw FBUF ; flash buf address load
movwf FSR ; setup indirect addressing
SLP movf INDF,O ; get first data point to
send
xorwf CSUM,1 , update checksum
call SCISendChar ; send it
incf FSR,1 , increment FBUF data pointer
btfss FSR,7 ; = done ?

CA 02236052 1998-04-27
goto SLP ; continue
movf CSUM,O , check sum
call SCISendChar ; send it
return ; done
FSCIBlock
call FSCILdAdd ; load FCHIP, FBLOCK, FPAGE
clrf CSUM
clrf FPAGE
BLP CALL FLASHReadPage ; read
movlw FBUF , flash buf address load
movwf FSR ; setup indirect addressing
FLP movf INDF,O ; get first data point to send
xorwf CSUM,l ; update checksum
call SCISendChar ; send it
incf FSR,l ; increment FBUF data pointer
btfss FSR,7 ; = done ?
goto FLP continue
incf FPAGE,1 ; advance page
movlw 0x80
subwf FPAGE,O
btfss
Z
_
goto BLP
movf CSUM,O ; check sum
call SCISendChar ; send it
return ; done
FSCISpeed
movf PPtr,O ; address of start of packet
movwf FSR , setup indirect
call FBufInc , advance packet pointer
call FBufInc ; advance packet pointer
movf INDF,O
movwf SCISpeed
nop
call SCISendRes
MOVLW 0x10
MOVWF DL3
DY2: MOVLW Ox7f

CA 02236052 1998-04-27
MOVWF DL2
DY3:MOVLW Ox7f
MOVWF DL1
DYl:DECF DLl,l
BTFSC
Z
_
GOTO DY4
GOTO DYl
DY4:DECF DL2,1
BTFSC
Z
_
GOTO DY5
GOTO DY3
DY5:DECF DL3,1
BTFSS
Z
_
GOTO DY2
bsf _PAGE ; SCI data in page 1
movlw RBUF ; base address of receive data buffer
movwf RINPTR ; initialize inptr
movwf ROUTPTR ; initialize outptr
movlw 0x01 ; 19200 baud at 4Mhz
movwf SPBRG ; initit SCI
bcf TXSTA,4 , asyncronous
bsf TXSTA,2 , BRGH =1 for high speed
bsf TXSTA,5 , transmit enable
bcf _PAGE ; page 0
bsf RCSTA,4 , receive enable
bsf RCSTA,7 ; SCI enable
bsf _PAGE , page 1
bsf PIE1,5 , receive interrupt enable
bcf _PAGE ; page 0
bsf INTCON,6 ; peripheral interrupts enabled
bsf INTCON,7 ; general interrupts enabled
call SCISendRes
movlw 0x01
subwf SCISpeed,0
btfss
Z
_
call SCIInit
return
InitPorts

CA 02236052 1998-04-27
movlw OxfC ; set port B default
movwf PORTB ; do it
movlw 0x00
movwf PORTA
movlw 0x00
movwf PORTC
bsf _PAGE ; TRIS registers in page
1
movlw 0x00
movwf TRISA
movlw 0x03 ; B7-B3 Output B2-BO ut
Inp
movwf TRISB ; set port B directions
movlw 0x93 ; C6(TX) C5(MOSI) C3(SCLK)C2(TOOL_ON)
Outpu
; C7(RX) C4(MISO) Input
movwf TRISC ; set port C directions
bcf -PAGE ; page 0
return , done
RTCAlarm
movf TMV,O ; get byte 2 of time
subwf AMV,O ; ala rm byte 2 - current time2
byte
btfss _C ; is >=0 ?
goto Update ; <0
btfss ; _ ?
Z
_ ; not equal so no alarm
goto NoAlarm
movf TMH,O ; get byte 1 of alarm
subwf AMH,O ; ala rm byte 1 - current time1
byte
btfss
C
_
goto Update
btfss ; _ ?
Z
_ ; not equal so no alarm
goto NoAlarm
movf TML,O , get byte 0 of alarm
subwf AML,O ; ala rm byte 0 - current time0
byte
btfss
C
_
goto Update
btfss , - ?
Z
_ , if not no alarm
goto NoAlarm
Update movf AINCL,O ; get LSB of alarm inc
addwf AML,l , add to alarm time
btfss _C ; was there an overflow
goto Alarm ; no overflow
incf AMH,1 ; inc rement byte 1 for over
flow
btfsc Z ; did this over flow

CA 02236052 1998-04-27
incf AMV,1 ; increment byte 2 if over flow
movf AINCH,O , get MSB of alarm increment
addwf AMH,l ; add to alarm byte 1
btfsc _C ; overflow ?
incf AMV,l ; add to alarm time
Alarm bsf _Z ; alarm set
return ; done
NoAlarm bcf _Z ; no alarm
return ; done
RTCSwitch
movf AINCH,O ; msb of alarm increment
btfss _Z ; is it zero
return ; not zero so no switching
movlw OxOa ; is incremet > 10
subwf AINCL,O ; lsb of alarm increment
btfss _C ; if set inc is 10 or less
return
movf AMV,O
movwf XV
movf AMH,O
movwf XH
movf AML,O
movwf XL
MOVE TML, 0
SUBWF XL, 1
MOVF TMH, 0
BTFSS _C
INCFSZ TMH, 0
SUBWF XH, 1
MOVE TMV, 0
BTFSS _C
INCFSZ TMV, 0
SUBWF XV,1
movf XV,O
btfss _Z
return
movf XH,O
btfss _Z
return

CA 02236052 1998-04-27
movlw 0x05
subwf XL,O
btfsc C , is result positive
return
Switch BSF PORTC,2
return ; done
RTCOff
movf AINCH,O ; msb of alarm increment
btfss _Z ; is it zero
return ; not zero so no switching
movlw OxO a ; is incremet> 10
subwf AIN CL,O ; lsb of alarm increment
btfss _C ; if set inc s 10 or less
i
return
SOff BCF TC,2
POR
return ; done
RTCProgram
movf TMV,O , get byte 2 of time
subwf SMV,O ; prog change time
btfss Z ; _ ?
return _ ; not equal so no change
movf TMH,O ; get byte 1 of time
subwf SMH,O ; change - current
time
btfss Z ; _ ?
return _ ; not equal so no change
movf TML,O ; get byte 0 of time
subwf SML,O ; change - current
time
btfss Z ; _ ?
return _ ; if not no alarm
movf FCHIP,O ; current chip
movwf TCHIP ; push
movf FBLOCK,O ; current block
movwf TBLOCK ; push
movf FPAGE,O ; current page
movwf TPAGE ; push
movlw RBUF ; page 1 buffer (SCI
Buf)
movwf DEST ; set destination
movlw FBUF ; flash buffer
movwf SRC ; set source
movlw 0x20 ; length of flash buffer
movwf NCPY ; set copy length

CA 02236052 1998-04-27
call COPYToPagel ; save flash buffer
clrf FCHIP ; chip 0
movf PDATA,O ; program block
movwf FBLOCK ; set block
incf PSEG,1 , increment prog segment
bcf _C ; clear carry for rotate
rrf PSEG,O ; PSEG/2
movwf FPAGE , set page
call FLASHReadPage ; get page
movlw FBUF ; buffer base
movwf FSR ; setup indirect
movlw 0x00 , offset in FBUF
btfsc PSEG,O ; odd or even
movlw 0x10 ; second half of page
addwf FSR,l ; set up indirect
incf FSR,1 ; advance pointer
movf INDF,O ; get high byte
movwf SMV ; update change time
incf FSR,l ; advance pointer
movf INDF,O ; get middle byte
movwf SMH ; update change time
incf FSR,1 , advance pointer
movf INDF,O ; get low byte
movwf SML ; update change time
incf FSR,1 ; advance pointer
movf INDF,O ; get high byte inc
movwf AINCH ; update increment
incf FSR,l , advance pointer
movf INDF,O , get low byte inc
movwf AINCL ; update increment
incf FSR,l ; advance pointer
movf INDF,O ; get low byte inc
movwf FOHI , update FOHI
incf FSR,l ; advance pointer
movf INDF,O ; get low byte inc
movwf FOLO ; update FOLO
incf FSR,1 ; advance pointer
movf INDF,O ; get low byte inc
movwf GAINO ; update GAINO
incf FSR,1 ; advance pointer
movf INDF,O ; get low byte inc
movwf F1HI ; update F1HI
incf FSR,1 ; advance pointer

CA 02236052 1998-04-27
movf INDF,O ; get low byte inc
movwf F1L0 ; update F1L0
incf FSR,1 ; advance pointer
movf INDF,O ; get low byte inc
movwf GAINl , update GAIN1
movlw RBUF ; page 1 buffer
movwf SRC ; set source
movlw FBUF ; flash buffer
movwf DEST ; set source
movlw 0x20 ; length of flash buffer
movwf NCPY ; set copy length
call COPYFromPagel ; save flash buffer
movf TCHIP,O ; pull
movwf FCHIP ; restore
movf TBLOCK,O ; pull
movwf FBLOCK ; restore
movf TPAGE,O ; pull
movwf FPAGE ; restore
return ; done
RTCInitialProg
call FLASHLoadBB , get bad block table
clrf FBLOCK , block 0
clrf FPAGE ; page 0
call FLASHReadPage , get page 0
movlw 0x02 ; address of program block
movwf FBLOCK ; set to program block
movwf PDATA ; save for future
call FLASHReadPage ; read program page
movf 0x61,0 ; get first program change bits
23-16
movwf SMV ; initialse program time bits 23-16
movf 0x62,0 ; get first program change bits
15 - 8
movwf SMH ; initialize program time bits 15
- 8
movf 0x63,0 ; get first program change bits
7 - 0
movwf SML ; initialize first programtime bits
7 - 0
movf 0x64,0 ; get bits 15 - 8 alarm change time
movwf AINCH ; initialize alarm increment bits
15 - 8
movf 0x65,0 ; get bits 7 - 0 alarm change time
movwf AINCL ; initialize alarm increment bits
7 - 0
movf 0x66,0 ; FOHI

CA 02236052 1998-04-27
movwf FOHI
movf 0x67,0 ; FOLO
movwf FOLO
movf 0x68,0 ; GAINO
movwf GAINO
movf 0x69,0 ; F1HI
movwf F1HI
movf Ox6a,0 ; F1L0
movwf F1L0
movf Ox6b,0 ; GAINl
movwf GAIN1
movf c,0
Ox6
movwf
TMODE
clrf AMV ; initialize alarm time bits 23
- 16
movf AINCH,O , get bits - 8 arlarm increment
15
movwf AMH ; initialize alarm tim bits 15
- 8
movf AINCL,O ; get bits - 0 arlarm increment
7
movwf AML ; initialize alarm tim bits 7
- 0
clrf PSEG
return ; done
RTCInit
NoRTC
clrf TML ; initialize low byte time
clrf TMH ; initialize middle byte time
clrf TMV ; initialize high byte time
clrf TMR1H ; clear counter
clrf TMR1L , clear counter
btfsc
TMODE,O
goto TC
NoR
movlw OxOf ; external oscillator
movwf T1CON ; it running
bcf PIR1,0 ; clear any pending interrupts
bsf INTCON,7 ; enable interrupts
bsf INTCON,6 ; enable peripheral interrupts
bsf _PAGE ; page 1
bsf PIE1,0 , enable overflow interrupts
bcf -PAGE ; page 0
return ~ done
movlw 0x31 ; external oscillator
movwf T1CON ; it running
bsf INTCON,7 ; enable interrupts
bsf INTCON,6 , enable peripheral interrupts

CA 02236052 1998-04-27
bsf -PAGE ; page 1
bsf PIE1,0 ; enable overflow interrupts
bcf -PAGE ; page 0
return ~ done
SelectMode
MOVLW 0x10 ; number of outer loops
MOVWF DL3 ; initialize outer loop counter
D2: MOVLW Ox7f ; number of middle loops
MOVWF DL2 ; initialize middle loop counter
D3: MOVLW Ox7f ; number of inner loops
MOVWF DL1 ; initialize inner loop
Dl: DECF DL1,1 ; decrement counter
BTFSC Z ; = done ?
GOTO _ ; done
D4
GOTO Dl ; countinue inner loop
D4: DECF DL2,1 ; decrement counter
BTFSC Z ; = done ?
GOTO _ ; done
D5
GOTO D3 , continue middle loop
D5: DECF DL3,1 , decrement counter
BTFSS Z ; = done ?
GOTO _ ; continue outer loop
D2
movlw 0x01 ; default value PMODE (log)
movwf PMODE ; initialize pmode
btfss PORTB,l ; test extra pin
clrf PMODE , set comm mode
return
done
Start
call InitPorts ; setup ports for either mode
call SelectMode ; check extra pin
btfss PMODE,O ; mode = ?
goto CmdMode ; do SCI only
LogMode call SPIInit , initializes master mode
clrf TOGGLE
bsf PORTC,2
bsf PORTB,7

CA 02236052 1998-04-27
call FLASHInit ; enables all write mode
call RTCInitialProg ; gets the initial program
call FLASHFindFirst , find first unused data block
call RTCInit , sets up real time
call FLASHLabelData , label first record of block
bsf _PAGE ; page 1 for TRIS
bcf TRISC,7 ; set as output
bcf _PAGE ; restore
Main: btfss TMODE,O
goto UseRtc
WaitTime:
btfss TMODE,2
goto WaitTime
bcf TMODE,2
goto MCommon
UseRtc: nop
sleep ; wait for interrupt
nop ; saftey
MCommon
call RTCProgram ; check if program requires change
call RTCSwitch , check if power on is required
call RTCAlarm ; check if alarm is set
btfss _Z ; if zero alarm is set
goto Main ; no alarm
call ADSample ; sample
goto Main ; continue
CmdMode bsf PORTC,2
bsf PORTB,7
clrf SCISpeed
call SPIInit
call FLASHInit
call SCIInit
CmdLoop callSCIGetPck ; get packet
movlw Oxa1 ; acknowledge response
call SCISendRes ; send packet
btfss PCmd,O ; PCmd = 0x01
goto N1 , No so continue searching
movlw Oxal ; acknowledge response
call SCISendRes ; send packet
goto CmdLoop , get next packet

CA 02236052 1998-04-27
Nl btfss PCmd,l
goto N2
call SCIData
N2 btfss PCmd,2
goto N3
call SCIErase
N3 btfss PCmd,3
goto N4
call SCIFormat
N4 btfss PCmd,4
goto N5
call FSCIRead
N5 btfss PCmd,S
goto N6
call FSCIWrite
N6 btfss PCmd,6
goto N7
call FSC IBlock
N7 btfss PCmd,7
goto N8
call FSC ISpeed
N8 goto CmdLoop
end

Representative Drawing
A single figure which represents the drawing illustrating the invention.
Administrative Status

2024-08-01:As part of the Next Generation Patents (NGP) transition, the Canadian Patents Database (CPD) now contains a more detailed Event History, which replicates the Event Log of our new back-office solution.

Please note that "Inactive:" events refers to events no longer in use in our new back-office solution.

For a clearer understanding of the status of the application/patent presented on this page, the site Disclaimer , as well as the definitions for Patent , Event History , Maintenance Fee  and Payment History  should be consulted.

Event History

Description Date
Inactive: IPC deactivated 2012-01-07
Inactive: IPC deactivated 2012-01-07
Inactive: IPC expired 2012-01-01
Inactive: IPC from PCS 2012-01-01
Inactive: IPC from PCS 2012-01-01
Inactive: IPC expired 2012-01-01
Inactive: IPC from MCD 2006-03-12
Inactive: IPC from MCD 2006-03-12
Inactive: IPC from MCD 2006-03-12
Application Not Reinstated by Deadline 2001-02-16
Inactive: Dead - Application incomplete 2001-02-16
Deemed Abandoned - Failure to Respond to Maintenance Fee Notice 2000-04-27
Deemed Abandoned - Failure to Respond to Notice Requiring a Translation 2000-02-16
Inactive: Correspondence - Formalities 1999-12-10
Inactive: Incomplete 1999-11-16
Application Published (Open to Public Inspection) 1999-10-27
Inactive: Cover page published 1999-10-26
Inactive: First IPC assigned 1998-07-28
Classification Modified 1998-07-28
Inactive: IPC assigned 1998-07-28
Inactive: Filing certificate - No RFE (English) 1998-07-09
Filing Requirements Determined Compliant 1998-07-09
Application Received - Regular National 1998-07-08

Abandonment History

Abandonment Date Reason Reinstatement Date
2000-04-27
2000-02-16

Fee History

Fee Type Anniversary Year Due Date Paid Date
Application fee - small 1998-04-27
Owners on Record

Note: Records showing the ownership history in alphabetical order.

Current Owners on Record
RENE SHOAN GRANDE
FRIEDRICH ERNST ZILLINGER
Past Owners on Record
None
Past Owners that do not appear in the "Owners on Record" listing will appear in other documentation within the application.
Documents

To view selected files, please enter reCAPTCHA code :



To view images, click a link in the Document Description column. To download the documents, select one or more checkboxes in the first column and then click the "Download Selected in PDF format (Zip Archive)" or the "Download Selected as Single PDF" button.

List of published and non-published patent-specific documents on the CPD .

If you have any difficulty accessing content, you can call the Client Service Centre at 1-866-997-1936 or send them an e-mail at CIPO Client Service Centre.


Document
Description 
Date
(yyyy-mm-dd) 
Number of pages   Size of Image (KB) 
Drawings 1999-10-26 9 122
Abstract 1999-10-26 1 2
Description 1998-04-26 70 3,618
Claims 1998-04-26 9 122
Representative drawing 1999-10-19 1 5
Filing Certificate (English) 1998-07-08 1 174
Reminder of maintenance fee due 1999-12-29 1 113
Courtesy - Abandonment Letter (incomplete) 2000-03-07 1 171
Courtesy - Abandonment Letter (Maintenance Fee) 2000-05-24 1 184
Correspondence 1999-11-08 1 12
Correspondence 1999-12-09 4 197
Correspondence 1998-07-13 1 25