BB Port (Breadboard Port)

BBPORT provides support for using all 10 BB port pins as a combined digital input/output port.

Add Input Device

Item

Description

BBPort

Provides support for using all 10 BB port pins as a combined digital input/output port.

The initialization functions have an optional "mask" parameter that allows the use of the subset of the 10 pins.

read_port(): Reads the current values on the input pins of the BB port.
write_port(value): Sets the output pin values to the specified value, where value is between 0 and 1023. Note that the value is also adjusted against the mask value in the var=bbport(mask) operation, if a mask was provided.

Add Output Device

Item

Description

BB Port

Provides functions for programming the TI-RGB Array.

See the details above.

CE products: from bbport import *

TI-Nspire CX II: from ti_hub import *

 

 

The function to create the object is pasted from the menu.

var=bb_port("mask")

Command:

var=bb_port("mask")

Command
Syntax:

var=bb_port("mask")

Range:

Describe:

Creates an object for the BreadBoard port (bb_port).

“mask” is an optional parameter with values between 0 and 1023 and is used to selectively connect specific pins. The mask value may be specified in decimal, binary, or hexadecimal format.

For example, 1023 or 0X3FF selects all 10 pins and is the default internal mask value used by the bb_port() object if a “mask” is not specified.

Result:

Type or
Addressable
Component:

Control

 

var.read_port()

Command:

var.read_port()

Command
Syntax:

var.read_port()

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

bb = bbport()

readval = bb.read_port()

print("BB Port value is: ", readval)

bb.write_port(0x55)

 

CE products:

from bbport import *

bb = bbport()

readval = bb.read_port()

print("BB Port value is: ", readval)

bb.write_port(0x55)

Range:

 

Describe:

Reads the current values on the input pins of the BB port.

Result:

Type or
Addressable
Component:

Control

 

var.read_port(mask)

Command:

var.read_port(mask)

Command
Syntax:

var.read_port(mask)

Range:

 

Describe:

Reads the current values on the input pins of the BB port.

“mask” allows for specifying which pins to read as inputs. Default if not provided = the connected pins mask specified during object initialization. This mask is also verified for valid range and is logically AND'd internally against the connected pin mask.

Result:

Type or
Addressable
Component:

Control

 

var.write_port(value)

Command:

var.write_port(value)

Command
Syntax:

var.write_port(value)

Range:

 

Describe:

Sets the output pin values to the specified value, where value is between 0 and 1023. Note that the value is also adjusted against the mask value in the var=bbport(mask) operation, if a mask was provided.

Result:

Type or
Addressable
Component:

Control

 

var.write_port(value, mask)

Command:

var.write_port(value, mask)

Command
Syntax:

var.write_port(value, mask)

Range:

 

Describe:

Sets the output pin values to the specified value, where value is between 0 and 1023. Note that the value is also adjusted against the mask value in the var=bbport(mask) operation, if a mask was provided.

Optional mask allows for specifying which subset of pins to set as outputs. Default if not provided = the connected pins mask specified during object initialization. This mask is also verified for valid range and is logically AND'd internally against the connected pin mask.

Result:

Type or
Addressable
Component:

Control