Comments (9)
Master Reset and Output Enable are floating, and the bypass capacitor is missing. See this page: https://www.arduino.cc/en/tutorial/ShiftOut
from control-surface.
It is strange that author of this article made two different pinouts for a one shift register
pinouts are different.
I don't understand what pinout is the correct one.
Can you show me the picture how you connected leds by SPI with shift register when you tested leds?
from control-surface.
The second one is not a pinout, it's just the schematic, the pins have been rearranged to make routing of the wires easier. The first one is the actual pinout.
from control-surface.
Here is how I connected Arduino Leonardo to shift register by SPI. It works!
Thank you Pieter!
from control-surface.
I just noticed that the breadboard view on the Arduino page is wrong. The bypass capacitor should be between Vcc and ground, as close to the chip as possible. The breadboard (and your diagram above) shows it between ST_CP and ground, which is completely wrong.
from control-surface.
I checked your suggestion, it works
from control-surface.
What if I want to connect leds to another shifter register. Can you show me a simple sketch with one led on one shift register and one led on the second shift register?
from control-surface.
#include <Control_Surface.h> // Include the Control Surface library.
using namespace ExtIO; // Bring the ExtIO pin functions into your sketch
// Instantiate a chain of shift registers with the SPI slave select pin as
// latch pin, most significant bit first, and a total of 16 outputs.
SPIShiftRegisterOut<16> sreg = {SS, MSBFIRST};
const pin_t ledPinA = sreg.pin(0); // first pin of the first shift register
const pin_t ledPinB = sreg.pin(8); // first pin of the second shift register
void setup() {
sreg.begin(); // Initialize the shift registers
pinMode(ledPinA, OUTPUT); // You don't even need these lines, since
pinMode(ledPinB, OUTPUT); // shift registers are always outputs
}
void loop() {
// Toggle the state of the LEDs every 1/2 second
digitalWrite(ledPinA, HIGH);
digitalWrite(ledPinB, LOW);
delay(500);
digitalWrite(ledPinA, LOW);
digitalWrite(ledPinB, HIGH);
delay(500);
}
Change the latch pin from SS
to pin 10
if you're using a Leonardo.
from control-surface.
Thank you! I appreciate your work!
from control-surface.
Related Issues (20)
- Bankable::ManyAddresses::CCAbsoluteEncoder HOT 2
- Time Display does not work.
- Does it's support ESP32-S3/C3 via USB port? HOT 7
- How to use 1 shift button to change bank:
- The sketch compiles, but doesn't work HOT 3
- Arduino UNO R4 support and testing HOT 3
- Arduino Yun HOT 2
- Trying to setVelocity for all notebutton values in mux with piezo device HOT 1
- External app/webpage to change CC and Channel values HOT 1
- Hi, I would like to see the USBMIDI_Interface adapted so that you can specify the fixed cablenumber. This would it make possible to use pipes and filters connecting serial ports with virtual usb ports
- Support for MCP23S17 SPI
- error: 'SelectorPC' does not name a type HOT 2
- Switching presets Roland FP-30X HOT 2
- TYPO IN DOCUMENTATION HOT 1
- Error running on M1 Mac Sonoma with Teensy 4.0 HOT 4
- Arduino Nano 33 BLE Support? HOT 3
- Пример CCIncrementDecrementButtons.ino HOT 10
- Select bank HOT 2
- MIDI-монитор-OLED HOT 3
- Arduino Giga R1 Wifi support HOT 2
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 control-surface.