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/03/25 20:12]
macegr [Code Example]
centipede_shield [2019/04/19 05:15] (current)
macegr [Code Example]
Line 1: Line 1:
-====== Introduction ======+====== Centipede Shield ======
 {{:centipede_shield.jpg?240&nolink  }} The [[http://macetech.com/store/index.php?main_page=product_info&cPath=4&products_id=23|Centipede Shield]] is an add-on PCB for standard layout (Uno, Duemilanove, Diecimila) Arduino microcontroller boards. It uses the Wire I2C interface on analog pins 4 and 5 to provide 64 general purpose I/O pins. Any pin can be configured for input or output. The shield uses four [[http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499|Microchip MCP23017]] 16-pin digital I/O expander chips. {{:centipede_shield.jpg?240&nolink  }} The [[http://macetech.com/store/index.php?main_page=product_info&cPath=4&products_id=23|Centipede Shield]] is an add-on PCB for standard layout (Uno, Duemilanove, Diecimila) Arduino microcontroller boards. It uses the Wire I2C interface on analog pins 4 and 5 to provide 64 general purpose I/O pins. Any pin can be configured for input or output. The shield uses four [[http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499|Microchip MCP23017]] 16-pin digital I/O expander chips.
  
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/attic/centipede_shield.1427314362.txt.gz ยท Last modified: 2015/03/25 20:12 by macegr