Compare commits
4 Commits
f0c7b2136d
...
b90b5f5f49
Author | SHA1 | Date | |
---|---|---|---|
|
b90b5f5f49 | ||
|
3a2df46212 | ||
|
5063f6b83f | ||
|
d3ac756bbd |
@ -1 +1,83 @@
|
||||
# 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
|
||||
|
@ -3,6 +3,9 @@
|
||||
|
||||
Arguments in curly braces are optional.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
__Hold PWM Duty Cycle__
|
||||
|
||||
Function | Opcode | Arguments
|
||||
-------------------------|--------|---------------------------
|
||||
@ -16,7 +19,6 @@ 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
|
||||
@ -35,6 +37,9 @@ Value | Div | Frequency | Period
|
||||
14 | 8192 | 1953.125 Hz | 512 u
|
||||
15 |16384 | 976.6625 Hz | 1024 u
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
__Note-on Velocity__
|
||||
|
||||
Function | Opcode | Arguments
|
||||
-------------------------|--------|---------------------------
|
||||
@ -48,6 +53,9 @@ 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
|
||||
-------------------------|--------|-------------------------------------------------
|
||||
@ -67,6 +75,10 @@ ticks to micoseconds:
|
||||
usecs = (pulse-ticks * 1e6)*(256/16e6)
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
__Note-off__
|
||||
|
||||
Function | Opcode | Arguments
|
||||
-------------------------|--------|---------------------------
|
||||
Note off | 3 | None
|
||||
@ -74,6 +86,10 @@ 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)}
|
||||
@ -82,34 +98,76 @@ 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 Location Id_ table below for the (src) id values.
|
||||
|
||||
See the _Memory Source Id Table_ below for the (src) id values.
|
||||
|
||||
Arguments | Range | Default | Note
|
||||
------------|-------|---------|-------------------------------------------------------
|
||||
(src) | 0-2 | n/a | Memory location id. See _Memory Location Id_ table.
|
||||
(src) | 0-2 | n/a | Memory location id. See _Memory Source 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 memory | 5 |
|
||||
Write velocity table | 6 |
|
||||
|
||||
Writes the MIDI velocity table from memory to EEPROM.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
__Set Hold Delay__
|
||||
|
||||
Function | Opcode | Arguments
|
||||
-------------------------|--------|---------------------------
|
||||
Set hold delay | 6 | { high {low}}
|
||||
Set hold delay | 7 | { 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 | 7 | (flags)
|
||||
Set flags variable | 8 | (flags)
|
||||
|
||||
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
|
||||
-----|-----|-----|-----|-----|-----|-----|-----
|
||||
@ -117,8 +175,10 @@ Set flags variable | 7 | (flags)
|
||||
|
||||
_HOA_ : Set to apply the hold voltage at the beginning of the attack.
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
## Register File Address
|
||||
|
||||
Register file
|
||||
|
||||
Address | Label | Note
|
||||
--------|-----------------|------------------------------------------------------------------------------------------------
|
||||
@ -144,13 +204,16 @@ Address | Label | Note
|
||||
19 | Flags_Addr | Binary variable field.
|
||||
|
||||
|
||||
Memory Location Id table.
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
## Memory Destination 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
|
||||
4 | Register file | See register table file
|
||||
5 | Velocity table | MIDI velocity to pulse ticks lookup table
|
||||
6 | EEPROM | EEPROM data memory
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user