This project is Small wave table/PSG type sound generator with I2S output. Major features are:
You can control this sound generator by SPI interface. SPI mode is mode 0 (CPOL=0, CPHA=0), and transaction length is 24-bit. first 8-bit is register address, and next 16-bit is data. Data is MSB first.
Addr | Description | Width |
---|---|---|
0x00-0x03 | Frequency[0]-[3] | 16bit |
0x04-0x07 | Volume[0]-[3] | 8bit (lower 8bits are valid) |
0x08-0x0b | Waveform Select[0]-[3] | 3bit (lower 3bits are valid) |
0x20-0x3f | WaveTable[0]-[31] | 4bit (lower 4bits are valid) |
Connect I2S output to I2S DAC, and control this sound generator by SPI interface. SPI input is connected to RP2040's SPI1 on TT05 breakout board.
I2S DAC is required (I tested this design with FPGA and PCM5102A DAC)
# | Input | Output | Bidirectional |
---|---|---|---|
0 | SPI CS Input | I2S Bit Clock | |
1 | SPI CLK Input | I2S Word Select | |
2 | SPI MOSI Input | I2S Data | |
3 | |||
4 | |||
5 | |||
6 | |||
7 |