Earth Resistivity OCX Notes 08OCT03

If this text is not wrapped, click on EDIT (above) and select WORD WRAP



Since I finalised the Earth Resistivity Logger for publication, reader Joe Farr provided EPE with a specially written program that allows legal access to Visual Basic's own serial control I/O facilities. This option has previously only been available to readers who have a registered version of MSCOMM (as Robert Penfold has discussed many times through his Interface series). Joe's serial OCX facility was published in full in the Sept '03 EPE issue.

A section of Joe's OCX program has been built into this Earth Resistivity and Magnetometer program and replaces the DLL-based download software described in the EPE Earth Resistivity articles. Joe's OCX provides a far more reliable download option than the original DLL option offered.

A further advantage of Joe's OCX program is that it allows a bargraph to display the progress of the data input procedure. It is also likely to be better at detecting input data problems as it uses a handshake procedure to communicate with the PIC, inputting the data in blocks of 256 bytes.

The Magnetometer hardware has been designed to only use Joe's OCX interface and does not need any changes to be made to hardware or software.

However, to use Joe's option with the Earth Resistivity hardware, several changes need to be made to its PCB, without which the facility cannot function and the ER data cannot been downloaded.

MODIFYING EARTH RESISTIVITY

The following changes are required to the Earth Resistivity PCB to suit the use of Joe's OCX:

1. Cut the track (0V) connecting to IC7 (MAX232) pin 13.

2. Connect IC7 (MAX232) pin 13 to 9-pin serial socket SK3 pin 3.

3. Connect IC7 (MAX232) pin 12 to IC5 (PIC) pin 18 (RC7).

This action allows the PIC to receive handshake data from the PC.

To set the PIC program to respond to the correct serial data transmission routine, initiate the following procedure:

1. Before switching on power, press and hold down the Mode switch, S6.

2. The screen will go into serial path change mode, alternating at about one-second intervals between a display saying "SERIAL PORT NORM" and "SERIAL PORT OCX ".

3. Release switch S6 when the OCX mode is shown. This mode becomes the active path mode and is also stored into the PIC's data EEPROM, to be recalled next time the program is run. 

4. On release of switch S6, normal running of the PIC program resumes.

It should be noted that readers who wish to make their own changes to the ER and Magnetometer Visual Basic source code cannot make use of Joe's OCX input option unless they have installated of Joe's full OCX facility according to the details given in EPE Sept '03. Attempting to examine the ER/Mag source code without Joe's OCX fully installed will generate an error condition because of the presence of Joe's sub-program I use.

To repeat - you do not need to make any hardware changes if you are using the Magnetometer.

John Becker 08OCT03




