Real-Time Midi - Waveshare Music Shield User Manual

Table of Contents

Advertisement

Music Shield User Manual
(The mic on Music Shield is connected to differential mic input while the earphone is connected
to Line input 2.)
Before activating ADPCM recording, user must write the right values to SCI AICTRL0 and SCI
AICTRL3. These values are only read at recording startup. SCI AICTRL1 and SCI AICTRL2 can be altered
anytime, but it is preferable to write good init values before activation. See the section Activating
PCM / ADPCM Recording Mode of VS1053b datasheet for more details.
If the registers have been configured correctly, the audio data can be read constantly. If SCI
HDAT1 is greater than 0, you can read as many 16-bit words from SCI HDAT0. (See the section
Reading PCM / IMA ADPCM Data of VS1053b datasheet)
Note: the recording data do not contain any RIFF header of the audio file. So to make your
recording data a RIFF / WAV file, you have to add a header before the actual data. See the section
Adding a PCM RIFF Header of VS1053b datasheet.

2.6. Real-Time MIDI

If GPIO0 is low and GPIO1 is high during boot, real-time MIDI mode is activated. In this mode the
PLL is configured to 4.0×, the UART is configured to the MIDI data rate 31250 bps, and real-time MIDI
data is then read from UART and SDI. Both input methods should not be used simultaneously. If you
use SDI, first send 0xff and then send the MIDI data byte.
(The RX of UART on the Music Shield is connected to MIDI input.)
Note: If GPIO1 is not high, Real-Time MIDI can also be started with a small patch code using SCI.
Revision 1.1. Date: December 7, 2015. Author: W. L. Yan. Editor: Felix.
share awesome hardware
8

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vs1053b

Table of Contents