tone-generator/README.md

32 lines
1.0 KiB
Markdown
Raw Normal View History

2024-10-01 01:54:17 +10:00
2024-10-01 02:08:38 +10:00
# Overview
This uses an AVR microcontroller (ATMega328P-PU).
2024-10-01 01:54:17 +10:00
- Microconroller: https://git.onewaycoding.com/jay/tone-generator
- MIDI parser: https://git.onewaycoding.com/jay/midi-parser
![Project](Project.jpg)
2024-10-01 02:08:38 +10:00
# Pin Description
| Pin(s) | Purpose |
2024-10-01 02:10:03 +10:00
|--------|----------------------------------|
| 0-7 | 8-bit DAC (for audio) |
2024-10-01 02:08:38 +10:00
| 8 | Next button |
| 9-10 | LEDs |
| 11-13 | ISP Programmer, otherwise unused |
2024-10-01 02:15:20 +10:00
| A0-A3 | Serial: DTR, TXD, RXD, CTS |
| A4-A5 | I2C: SDA, SCL |
2024-10-01 02:08:38 +10:00
# Instruction Set
2024-10-02 23:50:43 +10:00
| ID | Name | Size | Layout |
|-|-|-|-|
2024-10-02 23:53:11 +10:00
| 0 | stop | 1 | id (3), empty (5) |
2024-10-02 23:52:48 +10:00
| 1 | setup | 8 | id (3), us_per_tick (29), amplitude (8), size (24) |
| 2 | set | 3 | id (3), index (5), frequency (12), empty (4) |
| 3 | set-ts | 5 | id (3), index (5), ticks (20), frequency (12) |
| 4 | clear | 1 | id (3), index (5) |
| 5 | clear-ts | 4 | id (3), index (5), ticks (20), empty (4) |