0

High speed, pin-flexible SPI writes

Pt 101822

We’re working on speeding up our LPD8806 library (for massive installations) and wanted to share our nice-and-fast ‘bitbang’ SPI code for use with Arduinos. we use this whenever we have a display that needs fast updating, but don’t want to constrain the system to using the hardware SPI port! You can check it out on GitHub


Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Despite multiple bankruptcies, RadioShack continues to find ways to keep the lights on

Wearables — Molding with glue

Electronics — A few words on inductor resistance

Biohacking — Running Blades

Python for Microcontrollers — Help bring CircuitPython to other languages!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



1 Comment

  1. You can also use the counter variable as mask. This will make a better/smaller code:

    uint8_t mask;

    for (mask=0x80; mask!=0; mask>>=1) {
    *clkportreg &= ~clkpin;
    if(c & mask) {
    *mosiportreg |= mosipin;
    } else {
    *mosiportreg &= ~mosipin;
    }
    *clkportreg |= clkpin;
    }

    *clkportreg &= ~clkpin;
    // Make sure clock ends low

Sorry, the comment form is closed at this time.