VOICE_ACTIVATED and UART_BUFFERED
---------------------------------
code/recorder1053b.bin

Operation of the voice-activated recording mode:
1) power-on reset, boot from SPI-EEPROM
2) MMC/SD initialization, loops until complete, watchdog is not active
3) FAT filesystem init, starts over from 2) until FAT found
4) Checks for available space and a valid filename.
   Extends root directory if needed. Card should be formatted as FAT32.
5) Sends 'w' when going to the recording mode.
6) Waits for threshold to be reached and GPIO6 to be low until saving
   starts. Sends 'r' and raises GPIO7 when saving starts.
7) If audio has been below the threshold for timeout seconds,
   or GPIO6 is high, stops saving.
8) Saving stops, GPIO7 drops, sends 'e' for end of saving.
9) Creates a file to the directory with the active creation date and time,
   then sends 'c'.
10) starts from 2)

VS1053 understands the following commands:
- 'D' <hi> <lo>   -- set creation/modification date, FAT format
  <hi> = ((YEAR-1980)*2 + (MONTH/8))
  <lo> = ((MONTH&7)*32 + DAY) /*0x3a 0x69 = */
  Response from VS1053: 'd'
- 'T' <hi> <lo>   -- set creation/modification time, FAT format
  <hi> = (HOURS<<3) | (MINUTES>>3)
  <lo> = (MINUTES<<5) | (SECONDS/2)
  Response from VS1053: 't'
- 'S' <100ths>    -- set creation/modification 1/100ths, FAT format
  <100ths> = (SECONDS&1)*100 + HUNDREDTHS
  Response from VS1053: 's'
- 'L' <level>     -- set activation level
  <level> = 0..255, but only 1, 2, 4, 8, 16.. 128 will differ.
  Response from VS1053: 'l'
- 'O' <secs>      -- set timeout
  <secs> = end recording timeout in seconds
  Response from VS1053: 'o'
- unknown commands (transfer errors, missed bytes, too many bytes):
  Response from VS1053: 'u'

If you get 'u', resend the command.


Keep GPIO6 high at the first boot so you can set a suitable threshold
first.

Currently the software is compiled with AGC on and 16x max amplification.
Edit the boot image or change the values from c.s and recompile.


-Pasi Ojala
support@vlsi.fi
