Comments (11)
thanks for reporting this issue, as I am rather busy I have little time to investigate.
might take several days
from mcp23s17.
No problem. Im currently also investigating the issue.
from mcp23s17.
Some questions:
- Have you connected the line 10 to the select line of the MCP23S17?
- if I understand it well it returns 1 even if you connect to GND?
- there is no pull up resistor in your hardware?
from mcp23s17.
Some answers :)
- im using pin 42 as CS
- Yes i had now im only getting 0 even if high im not sure why it flipped
- No its just a switch that changes from VCC to GND
CODE:
//
// FILE: MCP23S17_digitalRead.ino
// AUTHOR: Rob Tillaart
// PURPOSE: test MCP23S17 library
// URL: https://github.com/RobTillaart/MCP23S17
#include "MCP23S17.h"
MCP23S17 MCP(42);
int rv = 0;
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.print("MCP23S17_LIB_VERSION: ");
Serial.println(MCP23S17_LIB_VERSION);
delay(100);
SPI.begin(12, 11, 13, 42);
rv = MCP.begin();
Serial.println(rv ? "true" : "false");
rv = MCP.pinMode8(0, 0xFF);
Serial.println(rv);
rv = MCP.pinMode8(1, 0x00);
Serial.println(rv);
Serial.print("HWSPI: ");
Serial.println(MCP.usesHWSPI());
Serial.println("TEST read1(pin)");
for (int pin = 0; pin < 8; pin++)
{
int val = MCP.read1(pin);
Serial.print(val);
Serial.print(' ');
delay(100);
}
Serial.println();
MCP.write8(1, 0xFF);
}
void loop()
{
delay(1000);
Serial.println("TEST read1(pin)");
for (int pin = 0; pin < 8; pin++)
{
int val = MCP.read1(pin);
Serial.print(val);
Serial.print(' ');
delay(100);
}
Serial.println();
}
// -- END OF FILE --
(added code tags)
from mcp23s17.
Could you run a test with software Spi ?
You should be able to use the same pins.
MCP23S17 MCP(select, datain, dataout, clock)
A thought popped up
Could it be that datain and dataout were swapped?
from mcp23s17.
Okay so i tried it with sw SPI. The Outputs are still working no reaction from the inputs. I hooked the Inputs directly to VCC testet the voltage. I have 3.3V on the PIN.
from mcp23s17.
Do you use this one - https://www.mikroe.com/expand-2-click (I2C)
or - https://www.mikroe.com/expand-click (SPI)
just to be sure.
from mcp23s17.
I got the Mirkoe-951
As far as i saw thats the SPI version. What i think is wierd is that the Outputs are working
BTW props for the amount of libs you crated
from mcp23s17.
News
I found a second click board and i tried that. It just works now. Thanks A lot anyway. Hope you keep up the great work. I donated you a bit. Sorry for the time waste.
from mcp23s17.
Sorry for the time waste.
If you learn something, time is never wasted!
Was it a different type of board, or is the first one a faulty one? just to understand the root cause.
Hope you keep up the great work, I donated you a bit.
Will do so, thank you, much appreciated!
from mcp23s17.
The board was just faulty only the port i used as a output was working i changed the port i uses as input to output and it didnt work anymore. :( Thanks have a nice day
from mcp23s17.
Related Issues (20)
- Compilation for Arduino Nano 33 BLE fails HOT 6
- arduino-lint.yml workflow is not providing right status. HOT 1
- x16() functions don't work HOT 19
- No way to test for connection HOT 6
- Sharing a single select pin HOT 9
- Use of Interrupt Pins HOT 13
- Support for multiple Chips missing? HOT 13
- add keywords.txt
- Could I contact you with a help request for once? HOT 5
- MCP23S17 Daisy Chain On Common SPI Line HOT 13
- redo ESP32 SPI interface
- Arduino nano esp32 does not compile this library.
- remove hardware SPI end() begin() from library
- adding possibility to have à chipselect that is not directly from MCU but with though a chipselect decoder HOT 8
- Is the hardware address correct? HOT 4
- ESP32-C3 and MCP23S17 HOT 30
- add parameter to begin() to make INPUT PULLUP conditional.
- Using interrupts HOT 54
- How to enable hardware SPI on ESP32-S3 for this MCP23S17 libary? HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcp23s17.