User Tools

Site Tools


centipede_shield

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
centipede_shield [2015/05/21 20:51]
macegr
centipede_shield [2019/04/19 01:15]
macegr [Code Example]
Line 67: Line 67:
   .pinPullup([0...127],​ [LOW...HIGH]) - Sets pullup on input pin   .pinPullup([0...127],​ [LOW...HIGH]) - Sets pullup on input pin
   .portPullup([0...7],​ [0...65535]) - Sets pullups on one port (chip)   .portPullup([0...7],​ [0...65535]) - Sets pullups on one port (chip)
 +  .portInterrupts([0...7],​[0...65535],​[0...65535],​[0...65535]) - Configure interrupts
 +                  [device number],​[use interrupt on pin],​[default value],​[interrupt when != default]
 +  .portCaptureRead(0...7) - Reads 16-bit value registers as they were when interrupt occurred
   .init() - Sets all registers to initial values   .init() - Sets all registers to initial values
  
Line 79: Line 82:
   CS.pinPullup(1,​HIGH);​   CS.pinPullup(1,​HIGH);​
   CS.portPullup(0,​ 0b0111111001111110);​ // 0 = no pullup, 1 = pullup   CS.portPullup(0,​ 0b0111111001111110);​ // 0 = no pullup, 1 = pullup
 +  CS.portInterrupts(0,​0b0000000000000001,​0b0000000000000000,​0b0000000000000001);​
 */ */
  
Line 91: Line 95:
  
   CS.portMode(0,​ 0b0000000000000000);​ // set all pins on chip 0 to output (0 to 15)   CS.portMode(0,​ 0b0000000000000000);​ // set all pins on chip 0 to output (0 to 15)
-  //​CS.portMode(0, 0b0000000000000000);​ // set all pins on chip 1 to output (16 to 31)+  //​CS.portMode(1, 0b0000000000000000);​ // set all pins on chip 1 to output (16 to 31)
  
   //TWBR = 12; // uncomment for 400KHz I2C (on 16MHz Arduinos)   //TWBR = 12; // uncomment for 400KHz I2C (on 16MHz Arduinos)
/home/macetec/public_html/docs/data/pages/centipede_shield.txt ยท Last modified: 2019/04/19 01:15 by macegr