SBC66 Ports

Netcruzer SBC66 Ports

All SBC66 Single Board Computers have the two 2x10 pin headers, called the Daughter Board Connector. They make all spare CPU ports and power pins available. These pins are called SBC66 Ports, and are named T0-T7, X0-X11 and Y0-Y11. The Microcontroller port(B0-B15,D0-D7,...) pin names were deliberately not taken seeing that different SBC boards can map different CPU ports to the SBC66 Ports. The picture on the right shows the pinouts of this connector.

Relocatable Ports

The 16-Bit PIC24F Microcontroller used has a feature called PPS (Peripheral Pin Select). This feature allow any one of 22 Relocatable Ports (PPS ports) to be configured to use a number of Microcontroller Peripherals, like PWM, SPI, UART, Timer input, Interrupt.... Ports T5-T7, X0-X2, X4-X11, Y0, Y1 and Y4-Y9 are Relocatable Ports.

Analog Inputs

Ports X0 to X5, and Y0 to Y5 are general purpose I/O ports, and in addition can be configued as Analog Inputs. All SBC66 boards have a precision 2.5V external voltage reference. These ports can be configured to use the internal 3.3V, or the external 2.5V reference. The analog input voltage can range between 0 to 3.3V when configured for the internal reference, or 0 to 2.5V for the external reference is used. The following examples shows how to test if analog input X3 has a value of 2.0V or more:

//Configure X3 as ADC channel (Potentiometer on DB66DEV1 board)

//Test if analog input is above 2.0V (2000mV)
if (adcGetChanMv(ADC_CH_X3) > 2000) {
   //.... Do Something ....

PWM Outputs

All SBC66 boards have 9 hardware PWM channels (more can be implemented in software). They can be assigned to any of the Relocatable Ports. The following example shows how to configure port Y4 as a PWM output, and configure it with a 1kHz signal:

//Configure Y4 (Buzzer on DB66DEV1) as PWM channel 3
pwm3OpenDefault(PPS_OUT_Y4, 0);

//Output a 1kHz tone at 0.1 duty cycle. (use 0.1 so buzzer is not too loud, 0.5 is maximum volume)
pwmSetFreqAndDutyCycle(3, 1000, 0.1);

Serial Ports, UARTs and SPI

All SBC66 boards have 4 UARTs (Serial Ports), and 3 SPI ports. They can be assigned to any of the Relocatable Ports.


SBC66 Ports SC and SD is the default I2C port. It can be configured via solder jumpers for 3.3V or 5V (5V is default). Some boards have additional I2C ports, see "SBC66 Port to CPU Port Mapping" section below. For example, the SBC66EC (revision 2 and higher) has 2, and the SBC66UAL and SBC66ZL have 3 I2C ports.

Digital I/O Ports

All SBC66 Ports can also be used as digital inputs or outputs.

To read a port pin, it must first be configured as an input (is the default condition of all ports). The DIR_PORTNAME defines are used to configured the direction of a port (input or output), and the PIN_PORTNAME defines are used to read a port pin. The following example show how to configure port T4 as an input and read it's value:

DIR_T4 = INPUT_PIN; //Configure port T4 as an input
BOOL myPin = PIN_T4; //Read port T4, and save it's value to variable myPin;

//Example how to check value of T4, and do something if it is set
if (PIN_T4 == 1) {
   //.... Do Something is T4 is set (3.3V)....

To write a port pin, it must first be configured as an ouput. The LAT_PORTNAME defines are used to write a port pin (don't use the PIN_PORTNAME defines!). The following example show how to configure port X5 as an output and set and clear it:

DIR_X5 = OUTPUT_PIN; //Configure port X5 as an output
LAT_X5 = 1; //Set port X5 = 3.3V
LAT_X5 = 0; //Clear port X5 = 0V

5V Tolerant ports, Pull-up and Pull-Down resistors

SBC66 Ports ports T4-T7, and Y6-Y9 are 5V tolerant (all other ports are 0 to 3.3V only). In addition, these ports can also have an external 5V pull-up resistor enabled (via solder jumpers on the the back of the board) to allow them to output 0-5V levels. This can be used to communicate with 5V logic chips.

Additionally weak pull-up or pull-down resistors can be enabled for all SBC66 Ports via software. These are 3.3V pull-up resistors internal to the CPU, and should not be confused with the external (solder jumper) 5V pull-up resistors mentioned above. For pull-up resistors to work the port should be configured as an input, or open collector. The following examples show how to enable pull-up and pull-down resistors for ports Y0 and X6:

PULLUP_Y0 = 1;          //Enable Pull-Up resistor (3.3V) on port Y0
PULLDOWN_X6 = 1;        //Enable Pull-Down resistor on port X6

SBC66 Port to CPU Port Mapping

This section contains the CPU Port to SBC66 Port mapping for all SBC66 boards. The CPU ports are generally not used, seeing that the SBC66 Port names are used in the C Code. This information is mostly usefull for developing custom hardware that should be compatible with multiple SBC66 boards.

It is available in an online version, and an Excel file. Note that the online version does not have all information and features(like comments) of the Excel version. A message box might be displayed in Excel when opening the file saying that it contains macros that could pose a security risk. Please ignore this message, and enable macros. They are needed to enable code required by the buttons contained on page.

  • To download the Excel version, click here.
  • To view the Online version (with limited information!), click here.

The diagram consists of two blocks. The top block is the key for the colours used in the main bottom block. The main bottom block contains columns for different SBC66 and accessory boards. In the Excel version, the buttons on the left can be used to hide or display columns for different boards.

Example SBC66EC with PT66ECI

For example, when using the SBC66EC-R2 board together with the PT66ECI board, click on the "Hide All" button, and then the "SBC66EC-R2" and "PT66ECI" buttons (in Excel version). This will display only the two relevant products. Each row of the main block now shows the SBC66 ports, and the pin it is routed to on the selected boards, and special functions. Some examples are:

  • The T4 "Netcruzer Port" has "F1", "5" and "F" on it's row in the "SBC66EC-R2" column. This means the T4 port is connected to the RF1 port of the PIC Microcontroller, and that this port is 5V tolerant, has 5V pull-up resistors, and is also connected (shared) to the FFC (Flat Flexible Cable) connector. In the PT66ECI there is no special information.
  • The X1 "Netcruzer Port" has "B1", "A" and "P" on it's row in the "SBC66EC-R2" column. This means the X1 port is connected to the RB1 port of the PIC Microcontroller, and that this port has Analog (ADC) capabilities (in addition to standard Digital Port), and is a Relocatable Port. In the PT66ECI column "iMod1-5(INT)" is written, indicating that this port is connected to iMod1 pin 5.