This commit is contained in:
Brett Weiland 2025-04-30 15:52:10 -05:00
parent 3f280fc0b3
commit c5e8fdedef
3 changed files with 9 additions and 5 deletions

View File

@ -1,10 +1,10 @@
# STM32 Business card Mandelbrot Explorer
# STM32 Mandelbrot Explorer Buisness Card
A battery powered business card that can explore the Mandelbrot set. Meant to be cheaply made for handing out. Will likely include a flappy bird clone to encourage recruiter competition.
# The first prototype works (pictures to be uploaded soon). Program in development! See below for a brief write up.
# Project in development! See below for a brief write up.
![STM32 Card Prototype 1](https://git.bpcspace.com/indigo/stm32_business_card/raw/branch/main/preview.png)
## Project structure
Code: [program/stm32f1_buisnesscard_v1/Core](https://git.bpcspace.com/indigo/stm32_business_card/program/stm32f1_buisnesscard_v1/Core])
Code: [program/stm32f1_buisnesscard_v1/Core](https://git.bpcspace.com/indigo/stm32_business_card/src/branch/main/program/stm32f1_buisnesscard_v1/Core) <br>
PCB: [kicad/](https://git.bpcspace.com/indigo/stm32_business_card/src/branch/main/kicad)
@ -13,8 +13,12 @@ The software is currently working, but is more a proof of concept (messy and uno
### Display
I've modified [this repository](https://github.com/afiskon/stm32-st7735) to fit my needs. I've had to make some minor changes to utilize the ST7735's sleep mode, and to make the code work for my specific display. I expect I'll need to rewrite the library to manipulate raw registers to optimize SPI communication, as it currently uses HAL and is *very* slow. I'm considering implementing a game as well, which may require I access SPI via DMA.
### FPU
### (No) FPU
The STM32F1 lineup doesn't have an FPU, thus fixed point integer arithmetic is used to speed up rendering. The decimal is intentionally too close to the MSB, as this introduces aesthetic visual artifacts at no cost that I think are a nice twist.
*notice the banding around the set- that's an artifact of pushing fixed point arithmatic beyond its limits*
![](https://git.bpcspace.com/indigo/stm32_business_card/src/branch/main/writeup/quick_buildings.png)
![](https://git.bpcspace.com/indigo/stm32_business_card/src/branch/main/writeup/quick_spiral.png)
### MCU Power Consumption
The software is interrupt based, saving power any time there's not an active job. After 30 seconds, a MOSFET will turn off the backlight and the MCU will in a deeper sleep state, where only a few microamps are consumed. This allows the card to operate without a power switch, as theoretically the sleeping power consumption is insignificant compared to the shelf life of these batteries (a few months).

View File

@ -27,7 +27,7 @@
#define ITERS 255
#define INFTY_SQR_FIXED DOUBLE_TO_FIXED(INFTY_SQR)
//#define SHIP
#define SHIP
#ifdef SHIP
Color get_color(int i) {

Binary file not shown.