Archived
1
0
This commit is contained in:
wolfv6 2016-11-16 18:56:37 -07:00
parent e5944bee57
commit 09b3e8ceb7
5 changed files with 31 additions and 8 deletions

View File

@ -6,6 +6,27 @@ This project adheres to [Semantic Versioning 2.0.0](http://semver.org/).
keybrd version 0.x.x is for initial development. keybrd version 0.x.x is for initial development.
keybrd version 1.0.0 will be released when the public API is stable. keybrd version 1.0.0 will be released when the public API is stable.
0.6.4 (2016-11-16)
------------------
* Enhancements
* add Port_MCP23018
* add Port_MCP23S18
* add Port_ShiftRegs
* add PortWriteInterface
* add add LED_PortOpenDrain
* add examples/IOE_PCA9655E_development/
* rename strobeOn to activeState
* move strobe logic from Port_*::write() to Scanner_IOE::scan()
* Backward incompatible changes
* rename print_microseconds_per_scan() to printMicrosecondsPerScan()
* rename print_scans_per_second() to printScansPerSecond()
* rename Scanner_ShiftRegsPISOSingleRow to Scanner_ShiftRegsRead
* rename Scanner_ShiftRegsPISOMultiRow to Scanner_ShiftRegsReadStrobed
* in Scanner_ShiftRegsReadStrobed, reverse slaveSelect HIGH/LOW for SPI compatible tri-state
* in Port_MCP23S17, add slaveSelect to constructor parameter
* in Port_*, replace write() with writeHigh() and writeLow()
0.6.3 (2016-10-06) 0.6.3 (2016-10-06)
------------------ ------------------
* Enhancements * Enhancements

View File

@ -1,4 +1,4 @@
The series of sketches in this folder where used to develope the Port_PCA9655E class. The series of sketches in this folder where used to develop the Port_PCA9655E class in stages.
The folder numbers are ordered from fundamental to practical. The folder numbers are ordered from fundamental to practical.
Each sketch was tested on a breadboard. Breadboards hold: Each sketch was tested on a breadboard. Breadboards hold:

View File

@ -25,7 +25,7 @@ void Port_MCP23017::begin(const uint8_t activeState)
} }
else //if active high else //if active high
{ {
pullUp = 0; //0=pull-up disabled (for external pull-down resistors) pullUp = 0; //0=pull-up disabled (external pull-down resistors)
} }
Wire.beginTransmission(deviceAddr); Wire.beginTransmission(deviceAddr);
@ -72,7 +72,7 @@ uint8_t Port_MCP23017::read()
{ {
Wire.beginTransmission(deviceAddr); Wire.beginTransmission(deviceAddr);
Wire.write(portNum + 0x12); //GPIO Wire.write(portNum + 0x12); //GPIO
Wire.endTransmission(false); //MCP23017 needs false to send a restart ??todo really? Wire.endTransmission(false); //MCP23017 needs false to send a restart
Wire.requestFrom(deviceAddr, 1u); //request one byte from input port Wire.requestFrom(deviceAddr, 1u); //request one byte from input port

View File

@ -47,7 +47,7 @@ LED_uC LED_capsLck(21);
// --------------- RIGHT SCANNER --------------- // --------------- RIGHT SCANNER ---------------
const uint8_t IOE_ADDR = 0x20; //MCP23S17 address, all 3 ADDR pins are grounded const uint8_t IOE_ADDR = 0x20; //MCP23S17 address, all 3 ADDR pins are grounded
const uint8_t slaveSelect = 10; const uint8_t slaveSelect = 10; //Arduino-pin number connected to MCP23S17 CS or SS
Port_MCP23S17 portA(slaveSelect , IOE_ADDR, 0, 1<<0 | 1<<1 ); //for read Port_MCP23S17 portA(slaveSelect , IOE_ADDR, 0, 1<<0 | 1<<1 ); //for read
Port_MCP23S17 portB(slaveSelect , IOE_ADDR, 1, 0); //for strobe Port_MCP23S17 portB(slaveSelect , IOE_ADDR, 1, 0); //for strobe
@ -136,7 +136,7 @@ so that scanner's ports can turn on LayerState_LED's default-layer LED.
void setup() void setup()
{ {
scanner_R.begin(); scanner_R.begin();
layerState.begin(); //todo call LayerState_LED::begin() after Scanner_IOE::begin() layerState.begin(); //call LayerState_LED::begin() after Scanner_IOE::begin()
} }
void loop() void loop()

View File

@ -19,7 +19,9 @@ Steps to writing a new port class:
5. Study other keybrd port classes. 5. Study other keybrd port classes.
* SPI I/O expander port classes: Port_MCP23S17 * SPI I/O expander port classes: Port_MCP23S17
* I2C I/O expander port classes: Port_PCA9655E * I2C I/O expander port classes: Port_PCA9655E
6. Write the port classes for your I/O expander. Debugging I/O expander code is hard because 6. Write the port classes for your I/O expander.
* [Example](../examples/IOE_PCA9655E_development/) shows how Port_PCA9655E was developed in stages, from fundamental to practical
* Debugging I/O expander code is hard because
SPI or I2C protocol, expander configuration, and expander commands. SPI or I2C protocol, expander configuration, and expander commands.
<br> <br>