Giter VIP home page Giter VIP logo

softpwmpdk's Introduction

3-channel 16 bit software PWM LED driver

  • 1800Hz, 16-bit PWM (12-bit + 4 bits dithering)
  • 3-channels, almost evenly spaced phase offsets
  • inverse polarity compared to WS2811 (pin high = LED on)
  • UART based signalling, 38400 baud, 16 bit values, (2x 8bit uart frame/channel, little endian)
  • end-of-frame is determined using a reset delay (between 1-2msec)
  • no output line, led index is hard-coded in the firmware
  • tested on PFS154 & PMS150C

Write firmware:

$ ./write.sh 0 # use the first 6 bytes as pixel data

$ ./write.sh 1 # use bytes 6..11 as pixel data

Read address:

$ ./read_address.sh
Address: 0

Change address:

Even on one-time programmable chips, a limited number of address changes if possible:

$ ./change_address.sh 4   # this is the fourth chip in the LED strip

OTP parts like PMS150C start out with a ROM with all ones, bits can only be flipped once, from 1 to 0.

The following scheme makes it possible to update the chip's address many times:

The code reads (13 or 14 bit) opcodes at the end of the code section. opcodes where the high bits are set to 0 are skipped. The first opcode with non-zero high bits contains the address in its low byte.

softpwmpdk's People

Contributors

brainsmoke avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

reidentify

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.