45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# LED Face Mask
|
|
|
|
Yep, it's gonna be awesome!
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
* Hardware:
|
|
* STM32F429I-DISC1 Board
|
|
* Contains STM32F429ZIT MCU
|
|
* 8 x 8 WS2812B LED Array
|
|
|
|
* Software:
|
|
* The WS2812B Datasheet says it uses "NZR" communication for data, which, I have no idea what that is and DuckDuckGo can't find anything on it
|
|
* Using SPI in order to send the data fast enough
|
|
* SPI Setup:
|
|
* Mode: Transmit Only Master
|
|
* Data size of 8 bits
|
|
* Most Significant Bit (MSB) first, as that would be the most straightforward
|
|
* Rate of 2.5 Mbit/sec, as that would allow for 400 nanosecond pulse widths
|
|
* Clock Polarity: Don't Care
|
|
* Clock Phase: Don't Care
|
|
* Will NOT be using the SPI Clock signal, as the WS2812B LEDs do not need it
|
|
* Global Interrupt: Enabled
|
|
* For switching LED designs:
|
|
* Using TIM6 as a "cooldown" to not have it switch the design hundreds of times on a single button-press
|
|
* While in "cooldown" state, LEDs will be off, to signify that the button press has been received and the LED design will be changed
|
|
* TIM6 is using APB1, which the timer clocks are set at 80 MHz
|
|
* "Cooldown" time of 0.5 seconds is desired:
|
|
* 80000000 Hz * 0.5 seconds = 40000000 clock cycles
|
|
* TIM6 Configuration:
|
|
* One Pulse Mode: Enabled
|
|
* Prescaler: 4000
|
|
* Counter Mode: Up
|
|
* Counter Period: 10000
|
|
* Auto-Reload Preload: Enabled
|
|
* Trigger Event Selection: Reset (UG bit from TIMx_EGR)
|
|
* Global Interrupt: Enabled
|
|
|
|
|
|
|
|
# Resources/Credits
|
|
|