update notes

This commit is contained in:
sigil-03 2025-10-19 10:51:49 -06:00
parent bdfef566bf
commit 94848d0d43
3 changed files with 51 additions and 4 deletions

6
.gitmodules vendored
View file

@ -1,9 +1,9 @@
[submodule "adpcm-pwm-dac"]
path = ch32v-insert-coin/ext/adpcm-pwm-dac
url = ssh://git@git.glyphs.tech:222/sigil-03/adpcm-pwm-dac.git
[submodule "ch32v-insert-coin/ext/ch32-hal"]
path = ch32v-insert-coin/ext/ch32-hal
url = git@github.com:sigil-03/ch32-hal.git
[submodule "ch32v-insert-coin/ext/qingke"]
path = ch32v-insert-coin/ext/qingke
url = git@github.com:ch32-rs/qingke.git
[submodule "ch32v-insert-coin/ext/adpcm-pwm-dac"]
path = ch32v-insert-coin/ext/adpcm-pwm-dac
url = ssh://git@git.glyphs.tech:222/sigil-03/adpcm-pwm-dac.git

@ -1 +1 @@
Subproject commit e4bb93e0399f27024434adf2558a893574fbfef3
Subproject commit ba25b7c89f4deb52426d97fd35eb13496f183775

View file

@ -48,3 +48,50 @@ it turns out you can not put the chip into deep sleep and have it wake up correc
# EVAL BOARD NOTES
## PINOUT
WCHLinkE SWDIO -> PD1
# AUDIO NOTES
## LIMITS
we have ~9-10kB of space remaining on the chip.
i can likely squeeze out _maybe_ another kB by dropping every print, but
that appears to cause some lockup, i think because the SDI peripheral is
trying to attach, but unable to.
for how things sit currently, we have the following (conservative) limits
to fit within 9kB:
16ksps, 4b depth -> 64kbps -> 1.125s
8ksps, 4b depth -> 32kbps -> 2.25s
6ksps, 4b depth -> 24kbps -> 3.0s
4ksps, 4b depth -> 16kbps -> 4.5s
in reality, the numbers i have seen are a little smaller than this, likely due
to compiler optimizations when the dac is unloaded / there's no audio.
a 16ksps file has an _experimental_ max of 0.75s. applying that offset
everywhere, we get empirical limits of:
16ksps, 4b depth: 0.75s
8ksps, 4b depth: 1.875s
6ksps, 4b depth: 2.625s
4ksps, 4b depth: 4.225s
## FFMPEG
use the following command to convert an input .wav to a raw mono pcm_u8 with 8ksps:
```shell
ffmpeg -i input.wav -f u8 -c:a pcm_u8 -ar 8000 -ac 1 output.raw
```
# PINOUTS
LED0: PC3
LED1: PD2
DAC: PC4
COIN SWITCH: PC2
BUTTON SWITCH: PD6
ADC: PD4
GPIO: any remaining pin
## FORBIDDEN:
PD1