Compare commits

..

No commits in common. "b90b5f5f4964eb93f09fb1fff8acadf318ff07e1" and "f0c7b2136d451a92c5b4dec78ae4eae47b3d4964" have entirely different histories.

2 changed files with 12 additions and 157 deletions

View File

@ -1,83 +1 @@
# Picadea control and monitor shell
Shell commands:
key | Function | Arguments | Notes
----|------------------|--------------------------------------------|----------------------------------------------------------
q | quit | |
? | print usage | |
w | write | (i2c_addr) (reg_addr) (data0) ... (dataN) |
r | read | (i2c_addr) (src) (reg_addr) (byteN) | See [Memory Source Id Table](#memory-source-id-table).
v | note-on | (pitch) (vel) |
u | note-on | (pitch) (usec) (div) | See [Pulse Timer Divisor Table](#pulse-timer-divisor).
o | note-off | (pitch) |
T | set table | (pitch) (vel) (usec) |
t | get table | (pitch) (vel) |
D | set duty | (pitch) (percent) {(hz) {(div)}} |
d | get duty | (pitch) |
H | set hold delay | (pitch) (usec) |
h | get hold delay | (pitch) |
F | set pwm freq | (pitch) (hz) | 254=~123Hz
f | get pwm freq | (pitch) |
I | set pwm div | (pitch) (div) | See [PWM Divisor Table](#pwm-divisor).
i | get pwm div | (pitch) |
A | set flags | (pitch) (flags) |
a | get flags | (pitch) |
W | write table | (pitch) |
N | note w/ duration | (pitch) (atkUs) (durMs) |
S | seq | (pitch) (atkUs) (durMs) (deltaUs) (noteN) |
L | log | (level) (0-1) |
## PWM Divisor
Value | Div | Frequency | Period
------|------|-------------|-------
1 | 1 | 16 M | 62.5 n
2 | 2 | 8 M | 125 n
3 | 4 | 4 M | 250 n
4 | 8 | 2 M | 500 n
5 | 16 | 1 M | 1 u
6 | 32 | 500 K | 2 u
7 | 64 | 250 K | 4 u
8 | 128 | 125 K | 8 u
9 | 256 | 62500 Hz | 16 u
10 | 512 | 31250 Hz | 32 u
11 | 1024 | 15625 Hz | 64 u
12 | 2048 | 7812.5 Hz | 128 u
13 | 4096 | 3906.25 Hz | 256 u
14 | 8192 | 1953.125 Hz | 512 u
15 |16384 | 976.6625 Hz | 1024 u
## Pulse Timer Divisor
Value | Divisor | Frequency | Period
------|---------|------------|--------------
1 | 1 | 16000000 | 62.5n
2 | 8 | 2000000 | 500.0n
3 | 64 | 250000 | 4.0u
4 | 256 | 62500 | 16.0u
5 | 1024 | 15625 | 64.0u
## Memory Source Id Table
Id | Memory | Note
---|----------------|-------------------------------
0 | Register file | See register table file
1 | Velocity table | MIDI velocity to pulse ticks lookup table
2 | EEPROM | EEPROM data memory
## Memory Destination Id Table
Id | Memory | Note
---|----------------|-------------------------------
4 | Register file | See register table file
5 | Velocity table | MIDI velocity to pulse ticks lookup table
6 | EEPROM | EEPROM data memory

View File

@ -3,9 +3,6 @@
Arguments in curly braces are optional.
------------------------------------------------------------------------------------------
__Hold PWM Duty Cycle__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
@ -19,6 +16,7 @@ Arguments | Range | Default | Note
PWM frequency and period for each possible (div) setting.
Reg. | | Base |
Value | Div | Frequency | Period
------|------|-------------|-------
1 | 1 | 16 M | 62.5 n
@ -37,9 +35,6 @@ Value | Div | Frequency | Period
14 | 8192 | 1953.125 Hz | 512 u
15 |16384 | 976.6625 Hz | 1024 u
------------------------------------------------------------------------------------------
__Note-on Velocity__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
@ -53,9 +48,6 @@ Execute a note onset.
The (vel) value is translated to an attack pulse duration
by looking up the pulse tick count in the velocity table.
------------------------------------------------------------------------------------------
__Note-on Microseconds__
Function | Opcode | Arguments
-------------------------|--------|-------------------------------------------------
@ -75,10 +67,6 @@ ticks to micoseconds:
usecs = (pulse-ticks * 1e6)*(256/16e6)
------------------------------------------------------------------------------------------
__Note-off__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
Note off | 3 | None
@ -86,10 +74,6 @@ Note off | 3 | None
Turn off a sounding note by settting the hold-voltage to 0.
------------------------------------------------------------------------------------------
__Set Read Address__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
Set read address | 4 | (src) {(addr)}
@ -98,76 +82,34 @@ Set the source and address of the next I2C read request.
The read can come from one of three memory banks:
Register File, MIDI velocity table or EEPROM.
See the _Memory Source Id Table_ below for the (src) id values.
See the _Memory Location Id_ table below for the (src) id values.
Arguments | Range | Default | Note
------------|-------|---------|-------------------------------------------------------
(src) | 0-2 | n/a | Memory location id. See _Memory Source Id Table_.
(src) | 0-2 | n/a | Memory location id. See _Memory Location Id_ table.
(addr) | 0-255 | n/a | Offset from base address set by (src)
Memory Source Id Table
Id | Memory | Note
---|----------------|-------------------------------
0 | Register file | See register table file
1 | Velocity table | MIDI velocity to pulse ticks lookup table
2 | EEPROM | EEPROM data memory
------------------------------------------------------------------------------------------
__Write Memory__
Function | Opcode | Arguments
-------------------------|--------|--------------------------------------------
Write memory | 5 | (addrFl + dest) {(addr)} (value0) ... (valueN)
Arguments | Range | Default | Note
------------|-------|---------|----------------------------------------------------------------
(addrFl) | 0,127 | 0 | Address flag. Set if second byte is an (addr) and not (value0)
(dest) | 0-2 | n/a | Memory destination location. See _Memory Destination Id Table_.
(addr) | 0-255 | n/a | Optional offset from base address set by (dest)
Memory Destination Id Table
Id | Memory | Note
---|----------------|-------------------------------
4 | Register file | See register table file
5 | Velocity table | MIDI velocity to pulse ticks lookup table
6 | EEPROM | EEPROM data memory
------------------------------------------------------------------------------------------
__Write Velocity Table to EEPROM__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
Write velocity table | 6 |
Writes the MIDI velocity table from memory to EEPROM.
Write memory | 5 |
------------------------------------------------------------------------------------------
__Set Hold Delay__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
Set hold delay | 7 | { high {low}}
Set hold delay | 6 | { high {low}}
Set the length of the delay, in ticks, between when the attack pulse ends and when the
hold voltage is applied.
The high and low byte values are calculated identically to the
attack pulse duration values.
------------------------------------------------------------------------------------------
__Set *flags* variable__
Function | Opcode | Arguments
-------------------------|--------|---------------------------
Set flags variable | 8 | (flags)
Set flags variable | 7 | (flags)
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
-----|-----|-----|-----|-----|-----|-----|-----
@ -175,10 +117,8 @@ Set flags variable | 8 | (flags)
_HOA_ : Set to apply the hold voltage at the beginning of the attack.
------------------------------------------------------------------------------------------
## Register File Address
Register file
Address | Label | Note
--------|-----------------|------------------------------------------------------------------------------------------------
@ -204,16 +144,13 @@ Address | Label | Note
19 | Flags_Addr | Binary variable field.
------------------------------------------------------------------------------------------
## Memory Destination Id table
Memory Location Id table.
Id | Memory | Note
---|----------------|-------------------------------
4 | Register file | See register table file
5 | Velocity table | MIDI velocity to pulse ticks lookup table
6 | EEPROM | EEPROM data memory
0 | Register file | See register table file
1 | Velocity table | MIDI velocity to pulse ticks lookup table
2 | EEPROM | EEPROM data memory