From c5e8fdedef5d7fbffaab7d6b0f4aff34dbdacbb5 Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Wed, 30 Apr 2025 15:52:10 -0500 Subject: [PATCH] readme --- README.md | 12 ++++++++---- recon/mandelbrot_tests/c/main.c | 2 +- recon/mandelbrot_tests/c/mandelbrot | Bin 21848 -> 21840 bytes 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a2e2e02..074906f 100644 --- a/README.md +++ b/README.md @@ -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)
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). diff --git a/recon/mandelbrot_tests/c/main.c b/recon/mandelbrot_tests/c/main.c index cf17173..9c492cb 100644 --- a/recon/mandelbrot_tests/c/main.c +++ b/recon/mandelbrot_tests/c/main.c @@ -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) { diff --git a/recon/mandelbrot_tests/c/mandelbrot b/recon/mandelbrot_tests/c/mandelbrot index f67e8ac89b73845f870371e8510c4b9d0623dd5f..e233684fa65650ca35fda69f28ea0a5eb1e11e8d 100755 GIT binary patch delta 1127 zcmZuvZERCj7(VBA=iU~&-M04Qc5KiV$JW_&TO6)@Wq_$%a0rVGGd|1^XwvwV1*Tbo zx}*$P${5?57z`$6A$)|yWb-a@S&S=_$YwMw4&#&`_`}7E3vsQ96R95G+l~*3CpqW5 z&vTyl-1mL%nZ8UXFVoW%bbD{`mZfYF$&E72PJ0CB`zHs)`OlJv61Tjc?hn(Ojr}`6 z(1uLM3u!;Bwa-4^<{BU)M#703Wt!9Bzex)ZSA5GOR zIeICL!)j-7^9m~=8QC69Wn>%kFMvq|TXT#j$24CtB;y8a95MO`JFRxJ{>6l-U1Oj7 zOoWWC7YWhJv+%L=8KEi*GtQ7XeUEcBan%R2&cG7=tpzk{7@$uhx;;^VQTQJ0bj58` zNUPn^R7|cISCg)<;kwJaV&uQ%IfOA)eq&7Sx~5;uaz6VWN;{#*T}t1Ekh^r<=KBfv zRnp(63Zkn1@sm47zN~xx;#|+%#cBYKxhrcgSd6Bw4P$9UKa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