tone-generator/README.md

1.0 KiB

Overview

This uses an AVR microcontroller (ATMega328P-PU).

Project

Pin Description

Pin(s) Purpose
0-7 8-bit DAC (for audio)
8 Next button
9-10 LEDs
11-13 ISP Programmer, otherwise unused
A0-A3 Serial: DTR, TXD, RXD, CTS
A4-A5 I2C: SDA, SCL

Instruction Set

ID Name Size Layout
0 stop 1 id (3)
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)