Technic Pack Wiki
Advertisement
Logo pickaxe The article IO Expander is still unfinished and may be lacking detailed general information, screenshots, and crafting recipes. Please expand the article and remove the {{unfinished}} tag once the article can be considered complete.
Redpower-logo1 IO Expander contains information about the RedPower mod.
IO Expander
Block IO Expander
Type Computer Peripheral
Tool Grid Screwdriver
Stackable Yes
Included in RedPower


Crafting[]

Crafting GUI

Wooden Planks

Wooden Planks

Wooden Planks

Bundled Cable

Red-Doped Wafer

Ribbon Cable

Wooden Planks

Wooden Planks

Wooden Planks

IO Expander



Usage[]

IO Expanders are connected to the CPU by Ribbon Cable on one side, and to redstone input and output by Bundled Cable. One side will only connect to Ribbon Cable, and the opposite only to Bundled Cable; the Ribbon Cable side is facing the player when the IO Expander is placed. On the Ribbon Cable side, there is a monochromatic red display; active output bits (but not input ones!) are lit.

The computer can read and set redstone signals for each individual cable colour in the Bundled Cable attached to the IO Expander. Multiple IO Expanders can be used; in this case it becomes necessary to make sure that they have different Redbus IDs. If the same Redbus ID is used, generally only the closest IO Expander with that ID will be functional. To check or change the ID, one must shift-right-click with a Screwdriver or Sonic Screwdriver to reveal the Redbus dialog. The computer can read and write to only one I/O Expander at a time, but they maintain their output states while the computer uses a different one.

FORTH control[]

Colour Swatch Numerical value (2n) n
White
    
1 0
Orange
    
2 1
Magenta
    
4 2
Light Blue
    
8 3
Yellow
    
16 4
Lime
    
32 5
Pink
    
64 6
Gray
    
128 7
Light Gray
    
256 8
Cyan
    
512 9
Purple
    
1024 10
Blue
    
2048 11
Brown
    
4096 12
Green
    
8192 13
Red
    
16384 14
Black
    
32768 15

The redstone state of each colour of redwire can be read and set. The state is read or set as a single unsigned integer, with each colour of redwire corresponding to one bit in that integer (the nth bit of the integer). In other words, the value of the integer is the sum of the values of the active colours, as illustrated in the adjacent table.

FORTH IO commands and variables[]

IOX!
Sets the IO output to the top number in the stack. Note that there is no space between "IOX" and "!".
Example: 11 IOX!
Turns on the white, orange and light blue wires, turns off the rest
IOX@
Returns the integer corresponding to connected active wires. Note that an active output to some coloured wire will cause an active input for that colour, if a wire of that colour is connected. Note that there is no space between "IOX" and "@".
Example: IOX@ U.
Prints the number corresponding to the input as an unsigned integer
IOXSET
Sets to active wires corresponding to the top number in the stack; wires without bits active in that integer will not be set or reset.
Example: 11 IOXSET
Turns on the white, orange and light blue wires, ignores the rest
IOXRST
Resets to inactive wires corresponding to the top number in the stack; wires without bits active in that integer will not be set or reset.
Example: 11 IOXRST
Turns off the white, orange and light blue wires, ignores the rest
IOXADDR
This is a variable; it sets the control for I/O to the IO Expander with the Redbus ID to which it is set. To change it, use IOXADDR ! to set it to the top number in the stack. To retrieve it, use IOXADDR @. IOXADDR on its own will return the memory address where it is stored, which is generally not useful.
Example: 11 IOXADDR !
Turns control and input to the IO Expander with Redbus ID 11


Advertisement