Robotics Products Page
Robotics Products



OOPIC MarkIII Support Page

This page attempts to collect all the various bits of information you need to use the OOPIC version of the MarkIII Robot Controller. It is meant to make up for deficiencies in the MarkIII User's Guide, which only documents use with a PIC 16F877, not an OOPIC, even though the MarkIII controller board is designed to support both.

Note: lists "" as my email address. I was getting bombarded with spam at that address, so I have turned it off. Please submit OOPIC MarkIII support questions to the MarkIII list on yahoogroups instead.

OOPIC Installation Tips

There are a few critical things you must do to make the OOPIC work on the MarkIII Controller. These are not directly addressed in the MarkIII User's Guide, resulting in a lot of confusion with many new users. Sorry this has taken me so long to get this page done!

  1. install U4, the 24LC32A (or equivalent) serial EEPROM; this is where the OOPIC stores your program -- it cannot function without it; make sure pin 1 is correctly oriented
  2. set the jumpers on JP1 correctly -- set them so that JP1 pins 3 and 5 are connected to each other, and JP1 pins 4 and 6 are connected to each other; this is required so that the SCL and SDA pins on U4 are connected to the LSDA/A4 and LSCL/A5 pins on the OOPIC -- this must be done so that the OOPIC can access the serial EEPROM; this is mentioned on the MarkIII Controller Schematic
  3. all MarkIIIs sold with OOPIC chips use the OOPIC-II+, which can use either a serial cable or the older parallel port programming cable to upload your program; we highly recommend the serial cable, as the parallel cable is unreliable on newer PCs with Windows2000 or WindowsXP
  4. you CANNOT use Hyperterminal to verify functionality of the OOPIC!!!!!
  5. you CANNOT use BotLoader to upload programs to the OOPIC!!!!
  6. you MUST USE the OOPIC Software!!!
  7. the OOPIC software is available for free here:; select version 5.01.
  8. you DO NOT need to install the port95nt.exe unless you intend to use the older parallel port programming cable

PIC, OOPIC, and MarkIII Expansion Pinout Reference

The following table pulls together information from multiple sources to help you use the standard MarkIII controller and sensor board hardware with the OOPIC.

The Exp Pin column is the pin number of the expansion header on the MarkIII. This is identical to the expansion header pinout of the official OOPIC S style board. Third party accessories, such as the Magnevation Dual PWM Driver and Logic Status Indicator boards will work with this connector.

The PIC Name column shows the official Microchip signal name, as shown in the PIC16F877 datasheet, that this expansion pin connects to.

The PIC Function column indicates what alternate built-in hardware function is available in the PIC16F877. For example, exp pin 1 is both Port A pin 4, a general purpose I/O pin, or can also be the Timer 0 Clock Input (T0CKI) pin if you enable that functionality in the PIC, but because this is connected to the LSDA line on the OOPIC processor, you cannot use this line; the same goes for the LSCL line on exp pin 3..

The MarkIII Controller column shows what each given expansion pin connects to on the controller board. For example, exp pin 15 connects to the Right Line Sensor LineR, whose connector is labeled J5 on the MarkIII controller silkscreen, which is accessible via OOPIC I/O Line 5.

The MarkIII Sensor column indicates what signal on the sensor board connects to each given expansion pin. For example, the Pyroelectric Sensor connects to exp pin 7, which is OOPIC I/O Line 1.

The OOPIC I/O Line column shows the logical I/O line for this expansion pin that you would use in your OOPIC program. For example, to read the Right Sharp GP2D12 IR Ranging Sensor, EyeR, connected to exp pin 11 and I/O Line 3, do this in OOPIC Basic format:

Dim EyeR As New oA2D
Dim Serial As New oSerialPort
Sub Main()
EyeR.IOLine = 3 ' right ranger connects to this I/O line
EyeR.Operate = cvTrue Serial.Baud = cv9600
Serial.Mode = 0
Serial.Operate = cvTrue Do S.String = "Right Eye = " ' just loop and print the current eye value S.String = EyeR.String ' to the serial port Loop End Sub

   Alternatively, you could use the new oIRRange object to read the GP2D12 and convert it to real-world units (in this case, multiples of 1/64 of a foot), rather than the nonlinear values inversely proportional to distance you would see using the oA2D.

Dim EyeR As New oIRRange
Dim EyeRValue As New oByte
EyeR.IOLine = 3
EyeR.Operate = cvTrue
... EyeRValue.Value = EyeR.Value ' since the oIRRange does not have a String method, we must use an oByte S.String = EyeRValue.String ' to convert it to a string

The OOPIC Function column indicates what OOPIC-specific function is used by this pin.

The OOPIC Multibit I/O Group column shows, for many exp pins, which I/O Group can access this pin. This is useful with the OOPIC oDIO4, oDIO8, oDIO16, and oDIO16x objects, which allow you to read and write multiple pins at a time.

Exp Pin PIC Name PIC Function MarkIII Controller MarkIII Sensor OOPIC I/O Line OOPIC Function OOPIC Multibit I/O Group
1 RA4 T0CKI LSDA (OOPIC mode, jumper 3-5)

LSDA, Local I2C Serial Data
2 Vss
Vss, Ground Vss, Ground
Vss, Ground
3 RA5 AN4 SS LSCL (OOPIC mode, jumper 4-6)

LSCL, Local I2C Serial Clock
Vbat switched V+; into regulator Servo, H-Bridge Power
+6v to +18v Power Supply
/RESET I2C connector
/Reset, Active Low
6 RB7 PGD, RBINT RTS (jumper P3-P4) YAxis ADXL202 I/O Line 15
I/O Group 1 bit 7
7 RA0 AN0
Pyroelectric Sensor I/O Line 1 A2D 1
8 RB6 PGC, RBINT CTS (jumper P2-P5) XAxis ADXL202 I/O Line 14
I/O Group 1 bit 6
9 RA1 AN1

I/O Line 2 A2D 2

I/O Line 13
I/O Group 1 bit 5
11 RA2 AN2, Vref- EyeR (J5)
I/O Line 3 A2D 3
PWM4 (U2), servo J4 I/O Line 12
I/O Group 1 bit 4
13 RA3 AN3, Vref+ EyeL (J6)
I/O Line 4 A2D 4
14 RB3 PGM
PWM3 (U2), servo J3 I/O Line 11
I/O Group 1 bit 3
15 RE0 /RD, AN5 LineR (U5)
I/O Line 5
16 RB2
ServoL (J3) PWM2 (U1) I/O Line 10
I/O Group 1 bit 2
17 RE1 /WR, AN6 LineC (U6)
I/O Line 6
18 RB1
ServoR (J4) PWM1 (U1) I/O Line 9
I/O Group 1 bit 1
19 RE2 /CS, AN7 LineL (U7)
I/O Line 7
20 RB0 INT RB0/INT (1K pull up) PCF8574 int on change I/O Line 8
I/O Group 1 bit 0
21 Vdd
Vdd, +5 Volts regulated Vdd, +5 Volts regulated
Vdd, +5 Volts regulated
22 Vdd
Vdd, +5 Volts regulated Vdd, +5 Volts regulated
Vdd, +5 Volts regulated
23 Vss
Vss, Ground Vss, Ground
Vss, Ground
24 Vss
Vss, Ground Vss, Ground
Vss, Ground

I/O Line 16 Timer 1 Xtal I/O Group 2 bit 0
26 RD7 PSP7
J9-8 (47k pullup) I/O Line 31
I/O Group 3 bit 7
27 RC1 T1OSI, CCP2

I/O Line 17 Timer 1 Xtal PWM-2 I/O Group 2 bit 1
28 RD6 PSP6
J9-7 ("") I/O Line 30
I/O Group 3 bit 6
29 RC2 CCP1

I/O Line 18 PWM-1 I/O Group 2 bit 2
30 RD5 PSP5
J9-6 ("") I/O Line 29
I/O Group 3 bit 5
31 RC3 SCK, SCL SCL (24LC32, Jumper 1-3)
I/O Line 19 I2C Serial Clock I/O Group 2 bit 3
32 RD4 PSP4
J9-5 ("") I/O Line 28
I/O Group 3 bit 4
33 RC4 SDI, SDA SDA (24LC32, Jumper 2-4)
I/O Line 20 I2C Serial Data I/O Group 2 bit 4
34 RD3 PSP3
J9-4 ("") I/O Line 27
I/O Group 3 bit 3
35 RC5 SDO

I/O Line 21
I/O Group 2 bit 5
36 RD2 PSP2
J9-3 ("") I/O Line 26
I/O Group 3 bit 2
37 RC6 TX, CK TX
I/O Line 22 Serial Transmit I/O Group 2 bit 6
38 RD1 PSP1
J9-2 ("") I/O Line 25
I/O Group 3 bit 1
39 RC7 RX, DT RX
I/O Line 23 Serial Receive I/O Group 2 bit 7
40 RD0 PSP0
J9-1 ("") I/O Line 24
I/O Group 3 bit 0


Last Updated 5/26/2005