VIZIC TECHNOLOGIES SMARTWAV 2 Serial Mode Command Set----Rev 1.
SMARTWAV 2 Serial Mode SmartWAV 2 – Intelligent Embedded Audio Processor Vizic Technologies ©2020 | 1
SMARTWAV 2 Serial Mode SmartWAV 2 Top View SmartWAV 2 Direct phones connection: Pre-Amplified Outputs Vizic Technologies ©2020 | 2
SMARTWAV 2 Serial Mode Table Of Contents: 1- SmartWAV 2 ...................................................................................................6 1.1 Introduction .........................................................................................6 1.2 Features ……........................................................................................7 1.3 Typical Applications ...........................................................................8 2- SmartWAV 2 System Explained …………...
SMARTWAV 2 Serial Mode 7.5 Panning …………………………………………………………………….40 7.6 Rewind and Play ………………………………………………………….42 7.7 Advance to Point …………………………………………..……………43 7.8 Set A and B Points ………………………………………………………..45 7.9 Loop Points ………………………………………………………………..48 7.10 Stop ………………………………………………………………………..49 7.11 Get Mount State ………………………………………………………..50 7.12 Get Play/Pause ……………………………………………………...….51 7.13 Get Volume ……………………………………………………………..52 7.14 Get Panning …………………………………………………………….53 7.
SMARTWAV 2 Serial Mode 9- Workspace# FAT/FAT32 Data Management Functions, Data Logger Serial Commands .............................................................................................93 9.1 Open File ............................................................................................95 9.2 Read File .............................................................................................97 9.3 Write File ..............................................................................
SMARTWAV 2 Serial Mode 1- SmartWAV 2: 1.1- Introduction: The SmartWAV 2 is an Intellectual Property smart high-end audio processor running on a state-of-the-art ARM Cortex M4 chip. The processor is mounted on a development board for easy and fast development. SmartWAV 2 is polyphonic: can play up to 14 channels with high quality stereo sound from a microSD card with universal FAT/FAT32 format. The processor supports 8/16bit, 8Khz-48Khz, mono/stereo, WAVE (.WAV) files with CD Quality.
SMARTWAV 2 Serial Mode 1.2- Features: Pre-amplified dual channel stereo out with 8/16bit, stereo/mono, and up to 48khz sampling rate, CD quality. Up to 14 channel polyphonic playback / auto mixing. Integrated digital volume control with 1/100 steps. Eight modes of operation, including Slave and Stand-Alone modes (M0, M1 and M2 Input pins for mode selection). MIDI mode compliant with channel selection. On board stereo 3.5mm plug for headphones, or line out.
SMARTWAV 2 Serial Mode 1.3- Typical Applications: Embedded polyphonic audio/sound systems. All voice annunciator systems. MIDI players Audio channel mixers. Battery powered audio systems. Drum machines. Automotive, parking, GPS navigation systems. Robotics, industrial control. Loop stations. Traffic facilities: Toll gates, parking lots. Sequencers. Home automation and domestic appliances. Elevator, Security, Access-Control, Warning devices.
SMARTWAV 2 Serial Mode 2- SmartWAV 2 System Explained: Vizic Technologies ©2020 | 9
SMARTWAV 2 Serial Mode SmartWAV 2 processor internally is a sophisticated multi-task system, it processes individual .wav tracks mounted on each of the 14 channels, mixing those with a master sample rate and a master gain control, this process is automatically. The master sample rate is how the processor outputs audio samples; this parameter is global for all 14 channels. The master gain control (master mixer volume) is a global parameter that affects all the 14 channels.
SMARTWAV 2 Serial Mode Point A and Point B are markers that the processor handles for each channel for rewind, loop points and other functions. Each time a track is mounted, the points A and B are set at their defaults: A-Start of track and B-End of track (blue color). User can later set and re-define those A and B points (green color) by the respective command.
SMARTWAV 2 Serial Mode 3- Operation Modes: The module offers 8(eight) modes of operation; selection between modes is by setting the external pins M0, M1 and M2, this document covers only the Polyphonic Slave Standard Serial Mode 0, for more operation modes please refer to the document SmartWAV2Datasheet.pdf. 3.
SMARTWAV 2 Serial Mode 4- SmartWAV 2 Pinout: Vizic Technologies ©2020 | 13
SMARTWAV 2 Serial Mode 5- Polyphonic Slave Serial Mode 0 - Standard Serial: 5.1- Master-Slave Host Interface: SmartWAV 2 in this mode acts as a slave peripheral device, providing a bidirectional serial interface to a master host controller via its UART(Universal Asynchronous Receiver - Transmitter), the required pins of Standard Serial Mode 0 are labeled with a white rectangle.
SMARTWAV 2 Serial Mode 5.3- Power-up, Reset and Serial Setup: When the SmartWAV 2 device comes out of a power up or reset, a 50ms delay before sending any command must be met, this time let the processor to configure its internal state machines, do not attempt to communicate with the module before this period. Any command could be sent after this time. The processor is configured to work at a standard default baud rate of 57600bps.
SMARTWAV 2 Serial Mode 5 GROUND POWER Supply ground, be sure to have a wellgrounded connection to avoid noise over the audio outputs. 6 3.3V POWER Main supply voltage: 2.7v-3.5v. Be sure to use a 10uF and 100nF coupling capacitors to GND as close as possible to avoid noise over the audio outputs. 7 Rx - V+ INPUT Digital input pin RX (asynchronous serial receiver input pin). Internally pulled-up to 3.3V via a 40K resistor. 5V tolerant input.
SMARTWAV 2 16 GND POWER Serial Mode Supply ground, be sure to have a wellgrounded connection to avoid noise over the audio outputs. *NC means no connect. 5.5- Standard Serial Mode 0 Typical Connection: *The SmartWAV 2 must always be powered with 2.7V-3.5V (Reset and RX pin are 5V tolerant).
SMARTWAV 2 Serial Mode 6- Master Functions - Serial Commands: This section of master functions or master commands are named this way because they affect in general the behavior of the system and all of the 14 channels of the SmartWAV 2 processor, please refer to section 2- SmartWAV 2 System Explained for more detailed information.
SMARTWAV 2 Serial Mode 6.1 Initialize System - 55hex - ‘U’ ascii Commands (host) byte(s) 1.- 0x55 (hex), U (ascii). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Initialize the SmartWAV 2 processor to start receiving serial commands, this command must be called before any other. (please let a 50ms delay before sending this command after a power-on or reset condition).
SMARTWAV 2 Serial Mode 6.2 Reset System - 59hex - ‘Y’ ascii Commands (host) byte(s) 1.- 0x59 (hex), Y (ascii). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Requests to the SmartWAV 2 processor to perform a software reset, all internal state machines and configurations are reset, this command has the same effect as applying an external hardware reset. Examples (sent and Example 1: received commands) Sent data: -59- Reset System.
SMARTWAV 2 Serial Mode 6.3 Sleep/Stand-by System - 5Ahex - ‘Z’ ascii Commands (host) byte(s) 1.- 0x5A (hex), Z (ascii). 2.- 0x00 (hex) for Sleep mode or 0x01 (hex) for Stand-by mode. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Set the processor to sleep or stand-by. -During sleep mode the processor can be wake up by the “Wake System” command and all internal state machines and configurations are kept.
SMARTWAV 2 Serial Mode Example 2: Sent data: -5A,01- Stand-by System. Received data: -4F- OK. (System is in Stand-by, now wake system by performing an external hardware reset…) *All data is in hex.
SMARTWAV 2 Serial Mode 6.4 Wake System - 00hex Commands (host) byte(s) 1.- 0x00 (hex). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Wake the processor from sleep mode, after this command is received, all the internal state machines and configurations are restored. *Note: This command only works for sleep mode, in stand-by mode the processor can only wake up by an external hardware reset.
SMARTWAV 2 Serial Mode 6.5 Master System Gain - 47hex - ‘G’ ascii Commands (host) byte(s) 1.- 0x47 (hex), G (ascii). 2.- Gain value 0-120 (0x00 to 0x78 hex). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Set the main master gain(volume), this parameter affects the gain/volume of the mix of all the 14 channels. This parameter can be set on the fly at any time.
SMARTWAV 2 Serial Mode 6.6 Set Default Master Gain - 48hex - ‘H’ ascii Commands (host) byte(s) 1.- 0x48 (hex), H (ascii). 2.- Gain value 0-100 (0x00 to 0x64 hex). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Saves to flash and re-writes the default power-on/reset master gain value. This parameter is loaded from flash after a power-on or reset condition.
SMARTWAV 2 Serial Mode 6.7 Master System Sample Rate - 54hex - ‘T’ ascii Commands (host) byte(s) 1.- 0x54 (hex), T (ascii). 2.- Sample Rate - High Byte. 3.- Sample Rate - Medium High Byte. 4.- Sample Rate - Medium Low Byte. 5.- Sample Rate - Low Byte. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 6.8 Keep Master Sample Rate - 4Bhex - ‘K’ ascii Commands (host) byte(s) 1.- 0x4B (hex), K (ascii). 2.- 0x00 (hex) for Keep mode or 0x01 (hex) for Update mode. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command sets an internal flag to indicate to the processor if must update or keep the master sample rate each time a “Play Immediately” or “Mount Track” command is called.
SMARTWAV 2 Serial Mode 6.9 System Baud Rate - 58hex - ‘X’ ascii Commands (host) byte(s) 1.- 0x58 (hex), X (ascii). 2.- Baud Rate - High Byte. 3.- Baud Rate - Medium High Byte. 4.- Baud Rate - Medium Low Byte. 5.- Baud Rate -Low Byte. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK at current baud rate. (Delay of 500ms…) 2.- 0x4F (hex), O (ascii) - Success ACK at new baud rate. or 1.- 0x46 (hex), F (ascii) - Fail NAK at current baud rate.
SMARTWAV 2 Serial Mode Only when an ACK has been received by the host, the next commands must be sent at the new received baud rate. *Default power-on/reset 57600bps. baud rate is Examples (sent and Example 1: received commands) Sent data: At current baud rate -58,00,01,C2,00- Set 115200bps baud rate. Received data: At current baud rate -4F- OK. (delay 500ms) Received data: At new baud rate -4F- OK. *All data is in hex.
SMARTWAV 2 Serial Mode 6.10 Set Default Voice Messages - 4Ahex - ‘J’ ascii Commands (host) byte(s) 1.- 0x4A (hex), J (ascii). 2.- 0x00 (hex) for Disable Messages or 0x01 (hex) for Enable Messages. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Saves to flash and re-writes the default enable/disable register that the processor uses to throw audible voice messages “No memory card detected” and “No WAV files”.
SMARTWAV 2 Serial Mode 6.11 Set Default MIDI Release Time - 44hex - ‘D’ ascii Commands (host) byte(s) 1.- 0x44 (hex), D (ascii). 2.- Release Time 0-127 (0x00 to 7F hex). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Saves to flash and re-writes the default MIDI release time parameter, this parameter can be from 0x00 (hex) to 0x7F (hex).
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -44,19- Set Default Release Time 1000ms. Received data: -4F- OK. Example 2: Sent data: -44,4B- Set Default Release Time 3000ms. Received data: -4F- OK. *All data is in hex.
SMARTWAV 2 Serial Mode 7- Channel Functions - Serial Commands: SmartWAV 2 is a 14 channel polyphonic audio processor, this section of channel functions is named this way because those commands have effect only on one single track / channel behavior of the system, please refer to section 2- SmartWAV 2 System Explained for more detailed information.
SMARTWAV 2 Serial Mode 7.1 Mount Track - 4Dhex - ‘M’ ascii Commands (host) byte(s) 1.- 0x4D (hex), M (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3 to n .- File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Mounts the received audio(.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -4D,02,73,6F,6E,67,00,- Mount track called “song.wav” in channel 2. Received data: -4F- OK. Example 2: Sent data: -4D,00,73,6F,6E,67,2E,77,61,76,00,Mount track called “song.wav” in channel 0. Received data: -4F- OK. *All data is in hex.
SMARTWAV 2 Serial Mode 7.2 Play/Pause - 50hex - ‘P’ ascii Commands (host) byte(s) 1.- 0x50 (hex), P (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- 0x00 (hex) for Pause or 0x01 (hex) for Play. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Pause or Play the received channel (0 to 13). A track must be already mounted in the selected channel for this command to work.
SMARTWAV 2 Serial Mode 7.3 Play Immediately - 49hex - ‘I’ ascii Commands (host) byte(s) 1.- 0x49 (hex), I (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3 to n .- File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command is a fast shortcut for the “Mount Track” + “Play/Pause” commands; the command immediately performs the mount of the received audio(.
SMARTWAV 2 Serial Mode Example 2: Sent data: -49,00,73,6F,6E,67,2E,77,61,76,00,Mount track called “song.wav” in channel 0. Received data: -4F- OK. *All data is in hex.
SMARTWAV 2 Serial Mode 7.4 Volume - 56hex - ‘V’ ascii Commands (host) byte(s) 1.- 0x56 (hex), V (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- Volume 0-100 (0x00 to 0x64 hex). Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Set the independent audio volume in percentage (0% to 100%) for the received channel (0 to 13).
SMARTWAV 2 Serial Mode 7.5 Panning - 41hex - ‘A’ ascii Commands (host) byte(s) 1.- 0x41 (hex), A (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- Panning -100 to 100 (0x9C to 0x64 hex). *Panning parameter is received as a signed char value. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Set the independent audio panning in percentage: -100%(left) to 100%(right) for the received channel (0 to 13).
SMARTWAV 2 Serial Mode Example 3: Sent data: -41,03,00,- Set panning to 0%(Center) of channel 3. Received data: -4F- OK. Example 4: Sent data: -41,FF,00,- Set panning to 0%(Center) of all channels. Received data: -4F- OK. *All data is in hex.
SMARTWAV 2 Serial Mode 7.6 Rewind and Play - 52hex - ‘R’ ascii Commands (host) byte(s) 1.- 0x52 (hex), R (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Rewinds to the point A and set the received channel (0 to 13) to play state. This command is a fast shortcut of the “Advance to Point (point A)” + “Play/Pause” commands.
SMARTWAV 2 Serial Mode 7.7 Advance to Point (In Milliseconds) - 45hex - ‘E’ ascii Commands (host) byte(s) 1.- 0x45 (hex), E (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- Milliseconds - High Byte. 4.- Milliseconds - Medium High Byte. 5.- Milliseconds - Medium Low Byte. 6.- Milliseconds - Low Byte. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode away in time than the current set point B, the track will continue playing until the end of the track, then it will be rewinded to point A. Examples (sent and Example 1: received commands) Sent data: -45,05,00,00,75,30- Advance channel 5 to time point 00:00:30 (30000 milliseconds). Received data: -4F- OK. Example 2: Sent data: -45,01,00,00,00,00- Advance channel 1 to time point 00:00:00 seconds (rewind). Received data: -4F- OK.
SMARTWAV 2 Serial Mode 7.8 Set A and B Points (In Milliseconds) - 42hex - ‘B’ ascii Commands (host) byte(s) 1.- 0x42 (hex), B (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- Milliseconds A - High Byte. 4.- Milliseconds A - Medium High Byte. 5.- Milliseconds A - Medium Low Byte. 6.- Milliseconds A - Low Byte. 7.- Milliseconds B - High Byte. 8.- Milliseconds B - Medium High Byte. 9.- Milliseconds B - Medium Low Byte. 10.- Milliseconds B - Low Byte. Responses (device) byte(s) 1.
SMARTWAV 2 Serial Mode defaults: beginning of the track 00:00:00 and end of the track XX:XX:XX in time. If the received point A and point B parameters are equal, the system also resets those points to their defaults: beginning of the track 00:00:00 and end of the track XX:XX:XX in time, this case can be used as a default/reset point A and B markers. The current audio playing position/point of the channel is not modified by this command.
SMARTWAV 2 Serial Mode Example 2: Sent data: -42,01,00,00,00,00,00,00,00,00- Reset channel 1 point A and point B parameters are equal), this will set points to their defaults: beginning of the track 00:00:00 and XX:XX:XX end of the track. Received data: -4F- OK. Example 3: Sent data: -42,03,00,01,D4,C4,00,04,93,E0- Set channel 3 point A to time 00:02:00 (120000 milliseconds) and point B to time 00:05:00 (300000 milliseconds). Received data: -4F- OK.
SMARTWAV 2 Serial Mode 7.9 Loop Points - 4Chex - ‘L’ ascii Commands (host) byte(s) 1.- 0x4C (hex), L (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. 3.- 0x00 (hex) for Disable or 0x01 (hex) for Enable. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command Enables or Disables the loop point A to point B feature. This command is useful to set A - B loop regions.
SMARTWAV 2 Serial Mode 7.10 Stop - 53hex - ‘S’ ascii Commands (host) byte(s) 1.- 0x53 (hex), S (ascii). 2.- Channel 0x00 to 0x0D or 0xFF (hex) for All. Responses (device) byte(s) 1.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description Stop playing and unmounts the track on the received channel (0 to 13). Once this command is acknowledged, the channel is cleared and reset, however the current volume, panning and loop point parameters are preserved.
SMARTWAV 2 Serial Mode 7.11 Get Mount State - 0x4F, 0x4Dhex - ‘O, ‘M’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x4D (hex), M (ascii). Responses (device) byte(s) 1.- 0x00 (hex) for No Mounted Track or 0x01 (hex) for Mounted Track. 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the current mounted or not mounted track state in the received channel (0-13).
SMARTWAV 2 Serial Mode 7.12 Get Play/Pause - 0x4F, 0x50hex - ‘O, ‘P’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x50 (hex), P (ascii). Responses (device) byte(s) 1.- 0x00 (hex) for Paused State or 0x01 (hex) for Playing State. 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the current play/pause state of the received channel (013).
SMARTWAV 2 Serial Mode 7.13 Get Volume - 0x4F, 0x56hex - ‘O, ‘V’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x56 (hex), V (ascii). Responses (device) byte(s) 1.- Volume 0-100 (0x00 to 0x64 hex). 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the current audio volume parameter of the received channel (0-13). Volume is returned from 0% to100%.
SMARTWAV 2 Serial Mode 7.14 Get Panning - 0x4F, 0x41hex - ‘O, ‘A’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x41 (hex), A (ascii). Responses (device) byte(s) 1.- Panning -100 to 100 (0x9C to 0x64 hex). *Panning parameter is sent as a signed char value. 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the current panning parameter of the received channel (0-13).
SMARTWAV 2 Serial Mode 7.15 Get Loop - 0x4F, 0x4Chex - ‘O, ‘L’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x4C (hex), L (ascii). Responses (device) byte(s) 1.- 0x00 (hex) for Loop Disabled or 0x01 (hex) for Loop Enabled. 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the current loop points register state of the received channel (0-13).
SMARTWAV 2 Serial Mode 7.16 Get Name - 0x4F, 0x4Ehex - ‘O, ‘N’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x4E (hex), N (ascii). Responses (device) byte(s) 1 to n .- File Name. n+1 .- 0x00 (hex), NULL ascii. n+2 .- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the name of the current mounted track on the received channel (0-13).
SMARTWAV 2 Serial Mode 7.17 Get Current Point - 0x4F, 0x4Fhex - ‘O, ‘O’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x4F (hex), O (ascii). Responses (device) byte(s) 1.- Milliseconds - High Byte. 2.- Milliseconds - Medium High Byte. 3.- Milliseconds - Medium Low Byte. 4.- Milliseconds - Low Byte. 5.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 7.18 Get A and B Points - 0x4F, 0x42hex - ‘O, ‘B’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x42 (hex), B (ascii). Responses (device) byte(s) 1.- Milliseconds A - High Byte. 2.- Milliseconds A - Medium High Byte. 3.- Milliseconds A - Medium Low Byte. 4.- Milliseconds A - Low Byte. 5.- Milliseconds B - High Byte. 6.- Milliseconds B - Medium High Byte. 7.- Milliseconds B - Medium Low Byte. 8.
SMARTWAV 2 Serial Mode 7.19 Get Remain Time - 0x4F, 0x52hex - ‘O, ‘R’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x52 (hex), R (ascii). Responses (device) byte(s) 1.- Milliseconds - High Byte. 2.- Milliseconds - Medium High Byte. 3.- Milliseconds - Medium Low Byte. 4.- Milliseconds - Low Byte. 5.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 7.20 Get Size (Total Time) - 0x4F, 0x53hex - ‘O, ‘S’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x53 (hex), S (ascii). Responses (device) byte(s) 1.- Milliseconds - High Byte. 2.- Milliseconds - Medium High Byte. 3.- Milliseconds - Medium Low Byte. 4.- Milliseconds - Low Byte. 5.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 7.21 Get Mono/Stereo - 0x4F, 0x43hex - ‘O, ‘C’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x43 (hex), C (ascii). Responses (device) byte(s) 1.- 0x01 (hex) for 1(Mono) or 0x02 (hex) for 2(Stereo). 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the audio channels: 1 for mono or 2 for stereo of the mounted track in the received channel (0-13).
SMARTWAV 2 Serial Mode 7.22 Get Bits per Sample - 0x4F, 0x49hex - ‘O, ‘I’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x49 (hex), I (ascii). Responses (device) byte(s) 1.- 0x08 (hex) for 8 bit or 0x10 (hex) for 16 bit. 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command asks for the audio bits per sample of the track mounted track in the received channel (0-13). .
SMARTWAV 2 Serial Mode 7.23 Get Sample Rate - 0x4F, 0x54hex - ‘O, ‘T’ ascii Commands (host) byte(s) 1.- 0x4F (hex), O (ascii). 2.- Channel 0x00 to 0x0D (hex), 0-13 (ascii). 3.- 0x54 (hex), T (ascii). Responses (device) byte(s) 1.- Sample Rate - High Byte. 2.- Sample Rate - Medium High Byte. 3.- Sample Rate - Medium Low Byte. 4.- Sample Rate - Low Byte. 5.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 8- Master FAT/FAT32 Data Management Functions, Data Logger -Serial Commands: SmartWAV 2 includes full FAT/FAT32 data management data logger functions, this enables the processor to be able to create, read, modify, write, save, etc. files and folders inside the microSD card, those functions enable full possibilities for advanced embedded audio systems. This section is for Master FAT Data Management Functions.
SMARTWAV 2 Serial Mode FAT ACK/NAK List: The next list of bytes, are the possible FAT access execution ACKs/NAKs that could be obtained from any File Operation: Byte received 0x00 (hex) 0x01 (hex) 0x02 (hex) 0x03 (hex) 0x04 (hex) 0x05 (hex) 0x06 (hex) 0x07 (hex) 0x08 (hex) 0x09 (hex) 0x0A (hex) 0x0B (hex) 0x0C (hex) 0x0D (hex) 0x11 (hex) 0x12 (hex) 0x13 (hex) Meaning Description OK DISK ERROR INTERNAL ERROR NOT READY NO FILE NO PATH INVALID NAME DENIED EXIST INVALID OBJECT WRITE PROTECTED INVALID DRIVE
SMARTWAV 2 Serial Mode 8.1 Mount SD Card - 0x46, 0x58hex - ‘F, ‘X’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x58 (hex), X (ascii). *Mount SD Card. 3.- 0x00 (hex) for Unmount or 0x01 (hex) for Mount. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command mounts/unmounts a FAT /FAT32 file access system on the inserted microSD card.
SMARTWAV 2 Serial Mode 8.2 List Directories - 0x46, 0x4Chex - ‘F, ‘L’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4C (hex), L (ascii). *List/Enumerate. 3.- 0x44 (hex), D (ascii). *Directories. Responses (device) byte(s) 1.- Number of Directories - High Byte. 2.- Number of Directories - Low Byte. 3.- 0xXX - FAT ACK/NAK List Byte Reply 4.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 8.3 List Files - 0x46, 0x4Chex - ‘F, ‘L’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4C (hex), L (ascii). *List/Enumerate. 3.- 0x46 (hex), F (ascii). *Files. Responses (device) byte(s) 1.- Number of Files - High Byte. 2.- Number of Files - Low Byte. 3.- 0xXX - FAT ACK/NAK List Byte Reply 4.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 8.4 Get Dir Item Name - 0x46, 0x47hex - ‘F, ‘G’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x47 (hex), G (ascii). *Get Name. 3.- 0x44 (hex), D (ascii). *Directory. 4.- Item Number - High Byte. 5.- Item Number - Low Byte. Responses (device) byte(s) 1 to n .- Directory Item Number Name. n+1 .- 0x00 (hex), NULL ascii. n+2 .- 0xXX - FAT ACK/NAK List Byte Reply n+3 .- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,47,44,00,02- Get dir name of item# 2. Received data: -61,62,63,00,00,4F- Dir name of item# 2 is “abc”, OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.5 Get File Item Name - 0x46, 0x47hex - ‘F, ‘G’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x47 (hex), G (ascii). *Get Name. 3.- 0x46 (hex), F (ascii). *File. 4.- Item Number - High Byte. 5.- Item Number - Low Byte. Responses (device) byte(s) 1 to n .- File Item Number Name. n+1 .- 0x00 (hex), NULL ascii. n+2 .- 0xXX - FAT ACK/NAK List Byte Reply n+3 .- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,47,46,00,05- Get file name of item# 5. Received data: -78,79,7A,2E,74,78,74,00,00,4F- File name of item# 5 is “xyz.txt”, OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.6 Open Directory - 0x46, 0x44hex - ‘F, ‘D’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x44 (hex), D (ascii). *Open Directory. 3 to n .- Directory Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command Opens a Directory/Folder that is inside the current directory path.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) *Current directory path is “/” (root path). Sent data: -46,44,30,31,32,33,00- Open a directory called “0123”. Received data: -00,4F- OK, OK. *Current directory path is now “/0123”. Example 2: *Current directory path is “/ABC”. Sent data: -46,44,30,31,32,33,00called “0123”. Received data: -00,4F- OK, OK. Open a directory *Current directory path is now “/ABC/0123”. Example 3: *Current directory path is “/ABC”.
SMARTWAV 2 Serial Mode Example 5: *Current directory path is “/ABC/0123”. Sent data: -46,44,2F,00- Go fast to root directory “/”. Received data: -00,4F- OK, OK. *Current directory path is now “/” (root path). Example 6: *Current directory path is “/” (root path). Sent data: -46,44,2F,41,42,43,2F,30,31,32,33,00fast nested directory “/ABC/0123”. Received data: -00,4F- OK, OK. Open *Current directory path is now “/ABC/0123”. *All data is in hex.
SMARTWAV 2 Serial Mode 8.7 Get Current Path - 0x46, 0x48hex - ‘F, ‘H’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x48 (hex), H (ascii). *Get Current Path. Responses (device) byte(s) 1 to n .- Directory Path Name. n+1 .- 0x00 (hex), NULL ascii. n+2 .- 0xXX - FAT ACK/NAK List Byte Reply n+3 .- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command returns the current directory path name.
SMARTWAV 2 Serial Mode 8.8 New Directory - 0x46, 0x4Ehex - ‘F, ‘N’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4E (hex), N (ascii). *New. 3.- 0x44 (hex), D (ascii). *Directory. 4 to n .- New Directory Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,4E,44,41,42,43,00- Create new directory “ABC” inside current directory path. Received data: -00,4F- OK, OK. Example 2: Sent data: -46,4E,44,31,32,33,00- Create new directory “123” inside current directory path. Received data: -00,4F- OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.9 New File - 0x46, 0x4Ehex - ‘F, ‘N’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4E (hex), N (ascii). *New. 3.- 0x46 (hex), F (ascii). *File. 4 to n .- New File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,4E,46,31,32,33,2E,74,78,74,00Create new file “123.txt” inside current directory path. Received data: -00,4F- OK, OK. Example 2: Sent data: -46,4E,46,41,42,43,2E,64,6F,63,00Create new file “ABC.doc” inside current directory path. Received data: -00,4F- OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.10 Erase Directory - 0x46, 0x45hex - ‘F, ‘E’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x45 (hex), E (ascii). *Erase Directory. 3.- 0x4F (hex), O (ascii). *Un-Lock Byte. 4 to n .- Directory Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 8.11 Erase File - 0x46, 0x45hex - ‘F, ‘E’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x45 (hex), E (ascii). *Erase File. 3.- 0x4F (hex), O (ascii). *Un-Lock Byte. 4 to n .- File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command Erases an existing file inside the current directory path.
SMARTWAV 2 Serial Mode 8.12 Get File Size - 0x46, 0x49hex - ‘F, ‘I’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x49 (hex), I (ascii). *Get Info. 3.- 0x53 (hex), S (ascii). *File Size. 4 to n .- File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- File Size - High Byte. 2.- File Size - Medium High Byte. 3.- File Size - Medium Low Byte. 4.- File Size - Low Byte. 5.- 0xXX - FAT ACK/NAK List Byte Reply 6.
SMARTWAV 2 Serial Mode 8.13 Get FAT Attribute - 0x46, 0x49hex - ‘F, ‘I’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x49 (hex), I (ascii). *Get Info. 3.- 0x46 (hex), F (ascii). *FAT Attribute. 4 to n .- Directory/File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT Attribute (see description). 2.- 0xXX - FAT ACK/NAK List Byte Reply 3.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 8.14 Get Date & Time - 0x46, 0x54hex - ‘F, ‘T’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x54 (hex), T (ascii). *Date & Time. 3.- 0x47 (hex), G(ascii). *Get. 4 to n .- Directory/File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - Hours. 2.- 0xXX - Minutes. 3.- 0xXX - Seconds. 4.- 0xXX - Day. 5.- 0xXX - Month. 6.- 0xXX - Year - High Byte. 7.- 0xXX - Year - Low Byte. 8.- 0xXX - FAT ACK/NAK List Byte Reply. 9.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,54,47,31,32,33,2E,74,78,74,00- Get date and time of file named “123.txt”. Received data: -11,1E,14,13,03,07,DD,00,4F- Last modified date is “19 March 2013” and time “17:30:20”, OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.15 Set Date & Time - 0x46, 0x54hex - ‘F, ‘T’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x54 (hex), T (ascii). *Date & Time. 3.- 0x53 (hex), S(ascii). *Set. 4.- 0xXX - Hours. 5.- 0xXX - Minutes. 6.- 0xXX - Seconds. 7.- 0xXX - Day. 8.- 0xXX - Month. 9.- 0xXX - Year - High Byte. 10.- 0xXX - Year - Low Byte. 11 to n .- Directory/File Name. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply. 2.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,54,53,11,1E,14,13,03,07,DD,31,32,33,2E, 74,78,74,00- Set last modified date “19 March 2013” and time “17:30:20” to file named “123.txt”. Received data: -00,4F- OK, OK. Example 2: Sent data: -46,54,53,11,1E,14,13,03,07,DD,46,6F,6C,64, 65,72,00- Set last modified date “19 March 2013” and time “17:30:20” to directory named “Folder”. Received data: -00,4F- OK, OK. *All data is in hex.
SMARTWAV 2 Serial Mode 8.16 Dir Rename/Move - 0x46, 0x4Dhex - ‘F, ‘M’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4D (hex), M (ascii). *Rename/Move. 3 to n .- Old Directory Name/Path. n+1 .- 0x00 (hex), NULL ascii. n+2 to m.- New Directory Name/Path. m+1.- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Example 2: Move Only Directory. Sent data: -46,4D,2F,44,69,72,31,2F,44,69,72,32,2F,44,69 72,33,00,2F,44,69,72,33,00- Move directory named “Dir3” from “/Dir1/Dir2/Dir3” path to “/Dir3” root path. Received data: -00,4F- OK, OK. Example 3: Move and Rename Directory. Sent data: -46,4D,2F,44,69,72,31,2F,44,69,72,32,2F,44,69 72,33,00,2F,46,6F,6C,00- Move and rename directory named “Dir3” from “/Dir1/Dir2/Dir3” path to “/Fol” root path with new name “Fol”. Received data: -00,4F- OK, OK.
SMARTWAV 2 Serial Mode 8.17 File Rename/Move - 0x46, 0x4Dhex - ‘F, ‘M’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4D (hex), M (ascii). *Rename/Move. 3 to n .- Old File Name/Path. n+1 .- 0x00 (hex), NULL ascii. n+2 to m.- New File Name/Path. m+1.- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode Example 2: Move Only File. Sent data: -46,4D,2F,44,69,72,31,2F,44,69,72,32,2F,61,62 63,2E,74,78,74,00,2F,44,69,72,31,2F,61,62,63 2E,74,78,74,00- Move file named “abc.txt” from “/Dir1/Dir2/abc.txt” path to “/Dir1/abc.txt” directory path. Received data: -00,4F- OK, OK. Example 3: Move and Rename File. Sent data: -46,4D,2F,44,69,72,31,2F,44,69,72,32,2F,61,62 63,2E,74,78,74,00,2F,44,69,72,31,2F,31,32,33 2E,64,6F,63,00- Move and rename file named “abc.txt” from “/Dir1/Dir2/abc.
SMARTWAV 2 Serial Mode 8.18 Get Free & Total Space - 0x46, 0x46hex - ‘F, ‘F’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x46 (hex), F (ascii). *Get Free & Total. Responses (device) byte(s) 1.- Free Space - High Byte. 2.- Free Space - Medium High Byte. 3.- Free Space - Medium Low Byte. 4.- Free Space - Low Byte. 5.- Total Space - High Byte. 6.- Total Space - Medium High Byte. 7.- Total Space - Medium Low Byte. 8.- Total Space - Low Byte. 9.
SMARTWAV 2 Serial Mode 9- Workspace# FAT/FAT32 Data Management Functions, Data Logger -Serial Commands: SmartWAV 2 uses the 14 audio channels also as workspaces# for those next workspace# FAT commands, that means that up to 14 workspaces (0 to 13) could be used at the same time for file management (the physical 14 spaces inside SmartWAV 2 could be used as workspace or audio channels but not both at the same time).
SMARTWAV 2 Serial Mode FAT ACK/NAK List: The next list of bytes, are the possible FAT access execution ACKs/NAKs that could be obtained from any File Operation: Byte received 0x00 (hex) 0x01 (hex) 0x02 (hex) 0x03 (hex) 0x04 (hex) 0x05 (hex) 0x06 (hex) 0x07 (hex) 0x08 (hex) 0x09 (hex) 0x0A (hex) 0x0B (hex) 0x0C (hex) 0x0D (hex) 0x11 (hex) 0x12 (hex) 0x13 (hex) Meaning Description OK DISK ERROR INTERNAL ERROR NOT READY NO FILE NO PATH INVALID NAME DENIED EXIST INVALID OBJECT WRITE PROTECTED INVALID DRIVE
SMARTWAV 2 Serial Mode 9.1 Open File - 0x46, 0x4Fhex - ‘F, ‘O’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4F (hex), O (ascii). *Open File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- Open Mode: 0x01 (hex)- Read Only 0x02 (hex)- Write Only 0x03 (hex)- Read +Write 5 to n .- File Name Including Extension. n+1 .- 0x00 (hex), NULL ascii. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.
SMARTWAV 2 Serial Mode After open file command is executed and succeeds(ACK), the file object workspace is then valid, now the workspace can be used for subsequent read/write operations. Only one file can be open at the same time in the same workspace#, always be sure close a workspace file object before opening a new one on it. Examples (sent and Example 1: received commands) Sent data: -46,4F,02,03,74,65,73,74,2E,74,78,74,00- Open file “test.txt” in workspace# 2 with read+write access(0x03).
SMARTWAV 2 Serial Mode 9.2 Read File - 0x46, 0x52hex - ‘F, ‘R’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x52 (hex), R (ascii). *Read File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- Number of Bytes to Read - High Byte. 5.- Number of Bytes to Read - Low Byte. *Number of bytes to read parameter could be any value from 1 up to 512 bytes per command call. Responses (device) byte(s) 1 to Bytes to Read.File Requested to Read Data Bytes. Bytes to Read + 1.
SMARTWAV 2 Serial Mode 1: All of the requested Bytes to Read have been successfully read from the file data, then the next parameters are equal: Bytes to Read == Successfully Read Bytes *All of the received data bytes are valid file data.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,52,08,00,64- Request to read 100 bytes from the file in workspace# 8. Received data: -XX…XX,00,64,00,4F- Received 100 bytes, then Successfully Read Bytes(100), OK, OK. This is a case:1 Bytes to Read == Successfully Read Bytes *All of the received data bytes are valid file data. Example 2: Sent data: -46,52,04,02,00- Request to read 512 bytes from the file in workspace# 4.
SMARTWAV 2 Serial Mode 9.3 Write File - 0x46, 0x57hex - ‘F, ‘W’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x57 (hex), W (ascii). *Write File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- Number of Bytes to Write - High Byte. 5.- Number of Bytes to Write - Low Byte. 6 to Bytes to Write .- Data Bytes to Write. *Number of bytes to write parameter could be any value from 1 up to 512 bytes per command call. Responses (device) byte(s) 1.
SMARTWAV 2 Serial Mode A file must be already opened/allocated in the selected workspace for this command to work. Examples (sent and Example 1: received commands) Sent data: -46,57,08,00,64,XX…XX- Request to write 100 sent bytes, to the file in workspace# 8. Received data: -00,64,00,4F- Successfully Written Bytes(100), OK, OK. Example 2: Sent data: -46,57,04,02,00,XX…XX- Request to write 512 sent bytes, to the file in workspace# 4. Received data: -02,00,00,4F- Successfully Written Bytes(512), OK, OK.
SMARTWAV 2 Serial Mode 9.4 Get File Pointer - 0x46, 0x50hex - ‘F, ‘P’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x50 (hex), P (ascii). *File Pointer. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- 0x47 (hex), G (ascii) Get Pointer. Responses (device) byte(s) 1.- Pointer Position - High Byte. 2.- Pointer Position - Medium High Byte. 3.- Pointer Position - Medium Low Byte. 4.- Pointer Position - Low Byte. 5.- 0xXX - FAT ACK/NAK List Byte Reply. 6.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,50,08,47- Get current file pointer position of the file in workspace# 8. Received data: -00,00,00,64,00,4F- Current file pointer position of the file in workspace# 8 is byte:100, OK, OK. Example 2: Sent data: -46,50,02,47- Get current file pointer position of the file in workspace# 2. Received data: -00,01,E2,40,00,4F- Current file pointer position of the file in workspace# 2 is byte: 123456, OK, OK.
SMARTWAV 2 Serial Mode 9.5 Set File Pointer - 0x46, 0x50hex - ‘F, ‘P’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x50 (hex), P (ascii). *File Pointer. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- 0x53 (hex), S (ascii) Set Pointer. 5.- Pointer Position - High Byte. 6.- Pointer Position - Medium High Byte. 7.- Pointer Position - Medium Low Byte. 8.- Pointer Position - Low Byte. Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply. 2.
SMARTWAV 2 Serial Mode Examples (sent and Example 1: received commands) Sent data: -46,50,02,53,00,00,02,00- Set current file pointer position to byte:512 of the file in workspace# 2. Received data: -00,4F- Current file pointer position of the file in workspace# 2 is now byte:512, OK, OK. Example 2: Sent data: -46,50,05,53,00,01,E2,40- Set current file pointer position to byte:123456 of the file in workspace# 5.
SMARTWAV 2 Serial Mode 9.6 Save File - 0x46, 0x53hex - ‘F, ‘S’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x53 (hex), S (ascii). *Save File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description This command sync/saves any changes of the file in the received workspace#.
SMARTWAV 2 Serial Mode 9.7 Truncate File - 0x46, 0x56hex - ‘F, ‘V’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x56 (hex), V (ascii). *Truncate File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 9.8 Test Error in File - 0x46, 0x51hex - ‘F, ‘Q’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x51 (hex), Q (ascii). *Test File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- 0x52 (hex), R (ascii). *Error in File. Responses (device) byte(s) 1.- 0x00 (hex) for FALSE condition or 0x01 (hex) for TRUE condition. 2.- 0xXX - FAT ACK/NAK List Byte Reply 3.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 9.9 Test End of File - 0x46, 0x51hex - ‘F, ‘Q’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x51 (hex), Q (ascii). *Test File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). 4.- 0x45 (hex), E (ascii). *End of File. Responses (device) byte(s) 1.- 0x00 (hex) for FALSE condition or 0x01 (hex) for TRUE condition. 2.- 0xXX - FAT ACK/NAK List Byte Reply 3.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK.
SMARTWAV 2 Serial Mode 9.10 Close File - 0x46, 0x43hex - ‘F, ‘C’ ascii Commands (host) byte(s) 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x43 (hex), C (ascii). *Close File. 3.- Workspace 0x00 to 0x0D (hex) 0-13 (ascii). Responses (device) byte(s) 1.- 0xXX - FAT ACK/NAK List Byte Reply 2.- 0x4F (hex), O (ascii) - Success ACK or 0x46 (hex), F (ascii) - Fail NAK. Description The Close File command, sync/save changes first, and then closes the file allocated on the received workspace#.
SMARTWAV 2 Serial Mode 10-MicroSD File/Folder Organization - Standard Serial Mode0: The SmartWAV 2 is capable of managing and folders in this mode, so a complete library organized by artist/ album/ genre/ year/ etc. could be done inside the micro SD card. Also the processor could access nested folders for example: “D:/rock/punk/oldies/song.wav”. In Stand-Alone Modes, the SmartWAV 2 only recognize .wav files stored in the root path of the microSD card, all .wav files must be placed in this path.
SMARTWAV 2 Serial Mode 11- Formatting MicroSD Card: It is recommended but not strictly necessarily to format the micro SD card for first use, in this section a format to new micro SD card to FAT format is explained. A.- Open a new windows explorer right click on the microSD card and a menu appears, select the “FORMAT…” and click on it. (Note that formatting a micro SD card will erase all the contents of it).
SMARTWAV 2 Serial Mode B.- A new window will pop-up, chose FAT/FAT32(default) on the File System menu, and click start. C.- Click OK on the new window and wait to the PC to perform the format.
SMARTWAV 2 Serial Mode D.
SMARTWAV 2 Serial Mode 12- Development Software & Hardware Tools In order to make easier the learning about how to communicate with the SmartWAV 2, free software could be downloaded and used in any PC. This software simulates almost all of the functions of the processor in Standard Serial Mode 0, this is achieved by connecting the hardware tool USB-UART SX Bridge to the SmartWAV 2 enabling real time audio processing, the required pins of Standard Serial Mode 0 are labeled with a white rectangle.
SMARTWAV 2 Serial Mode The USB-UART SX: SmartWAV 2 connected to the USB-UART SX, the required pins of Standard Serial Mode 0 are labeled with a white rectangle: For detailed information about the USB-UART SX Bridge, please visit our web site.
SMARTWAV 2 Serial Mode 13- Proprietary Information: The information contained in this document is the property of Vizic Technologies and may be the subject of patents pending or granted, and must not be copied or disclosed without prior written permission. Vizic Tech endeavors to ensure that the information in this document is correct and fairly stated but does not accept liability for any error or omission.
SMARTWAV 2 Serial Mode Use of Vizic devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Vizic Technologies from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Vizic Technologies intellectual property rights. THE DATASHEETS AND SOFTWARE ARE PROVIDED "AS IS.