Skip to content

small library for interfacing stm8 with addressable LEDS WS2812(or WS2811)

Notifications You must be signed in to change notification settings

j3qq4hch/STM8_WS2812B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

This library is based on code found here. But it has one major difference - it is configured in more clear way.

Usage

Just add files to your project and define pin used to control LEDs and strip length For example

#define WS2812B_PORT    GPIOD_PORT
#define WS2812B_PIN     3
#define NB_LEDS         60

Files WS2812B_LLD.c, WS2812B_LLD.h and ws2812b_conf.h do not depend on any external libraries and may be used without STM8 SPL. They are low level drivers for LEDs and are mainly written in assembler. The only requirement is that MCU runs on 16MHz and pin is configured as fast PUSH_PULL output.

File WS2812B_FX.c contains some demo animations. It requires some realisation of void _delay_ms(u16 wait) for proper operation.

Only one LED strip is supported.

About

small library for interfacing stm8 with addressable LEDS WS2812(or WS2811)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published