A silly project that proliferates Roderick On The Line
Go to file
A.M. Rowsell b0735b0ba4 Fixed some filenames, added test code for writing to DAC 2020-10-06 23:53:54 -04:00
.gitignore Mostly finished converting to PIC32 registers 2020-10-01 16:51:21 -04:00
FIFO.cpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
FIFO.hpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
FlashStorage.cpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
FlashStorage.hpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
LICENSE Add LICENSE 2020-10-01 20:56:00 +00:00
README.md Added links to license files. Need to update the licenses image to reflect CERN OHL2.0 2020-10-06 16:32:25 +00:00
UART.cpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
UART.hpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
fuses.hpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
i2c.cpp Fixed some filenames, added test code for writing to DAC 2020-10-06 23:53:54 -04:00
i2c.hpp Renamed .h files, formatted all code with astyle -A14 2020-10-06 12:01:34 -04:00
main.cpp Fixed some filenames, added test code for writing to DAC 2020-10-06 23:53:54 -04:00
makebin.sh Added the scripts used for combining the audio files and flashing 2020-10-06 11:39:43 -04:00
programFlash.py Added the scripts used for combining the audio files and flashing 2020-10-06 11:39:43 -04:00

README.md

ROTL Quotes

Intro

This is just a silly little project that I thought up a few weeks ago. It's based on a PIC32MX270F128D microcontroller, alongside an MCP4725 I2C DAC, and a S25FL512S 512Mbit Flash chip for storage.

Technical details

In my initial attempt to keep the project simple, I kind of shot myself in the foot. There's no need to keep it simple, as a lot of the code I write for this project can be re-used, so I may as well do it the right way. So I put everything into classes, and abstracted as much as I am comfortable with.

The PIC32 reads audio samples from the flash, and then pipes them to the MCP4725. It also bit-shifts them to the left because the DAC is a 12-bit DAC but the samples are all 8-bit. I chose to use 8-bit samples because originally I was using an 8-bit DAC, and the flash is an 8-bit flash. To have 12 bits per sample would require using 2 bytes per sample, doubling the storage space required for only a minor increase in fidelity. If I want better fidelity (and after testing, I might) the easiest thing to do would be to increase the sample rate from 8kHz to 16kHz or so. That would double the data stored but at a great increase of fidelity. But, since this is all just speech data that will probably be output through a crappy little speaker, it doesn't seem like a big deal (yet).

Contributing

You are welcome to contribute via pull requests and issues, if you find any. Please submit your code formatted with astyle using the following options:

astyle -n -z2 -Z -A14 *.cpp *.hpp

Code that isn't formatted correctly won't be merged! Just add that astyle command as a post-build step, or if you have to write code with a different style, just redirect the output of the astyle command to another folder which is connected to your fork, or something.

You must also release your contributions under the terms of the Mozilla Public License.

Licenses

All code, documentation, and design files are released under open-source licenses.
All of the code is under MPL v2.0.
All of the documentation is under CC-BY-SA 4.0.
All of the hardware design files are under CERN OHL 2.0.