W5100S-EVB-Pico
W5100S-EVB-Pico pinout is directly connected to the GPIO of RP2040 as shown in the picture above. It has the same pinout as the Raspberry Pi Pico board. However, GPIO16, GPIO17, GPIO18, GPIO19, GPIO20, GPIO21 are connected to W5100S inside the board. These pins enable SPI communication with W5100S to use Ethernet function. If you are using the Ethernet function, these pins cannot be used for any other purpose.
AdafruitPDM_Microphone
- 3V - This is the power input pin, this powers the chip directly. Use a quiet power supply pin if available. (The chip supports 1.8-3.3V but we have not tested it at 1.8V)
- GND - Power and data ground reference
- SEL - Left/Right select. If this pin is high, the output is on the falling edge of CLK considered the 'Right' channel. If this pin is low, the output is on the rising edge, a.k.a 'Left' channel.
- CLK - PDM clock in, 1 - 3 MHz square wave required
- DAT - PDM data out.
it's great for chips that do not have analog inputs. Secondly, the digital interface is a very simplistic Pulse Density Modulation output. It's digital but its not PWM and it's not I2S. PDM is a little like 1-bit PWM. You clock the mic with a 1 MHz - 3 MHz clock rate, and on the data line you'll get a square wave out that syncs with the clock. The data line with be 0 or 1 logic output, with the square wave creating a density that when averaged will result in the analog value out.
EXPLANATIONFTP?(File Transfer Protocol)
FTP communication creates two connections between the server and the client, one for sending and receiving signals to control, and the other for actual data (file) transmission.
FTP Movement
1. Connect to port 21 on the client server and inform the server of the second port you will use.
2. The server responds to the client request.
3. The server's data port 20 attempts to access the second port that the client has informed.
4. The client responds to the server.
WAV Audio formant?
Waveform Audio File Format (WAVE or WAV due to its filename extension pronounced "wave") is an audio file format standard, developed by IBM and Microsoft, for storing an audio bitstream on PCs. It is the main format used on Microsoft Windows systems for uncompressed audio.
Use standard WAVE format
A RIFF file starts out with a file header followed by a sequence of data chunks. A WAVE file is often just a RIFF file with a single "WAVE" chunk which consists of two sub-chunks -- a "fmt " chunk specifying the data format and a "data" chunk containing the actual sample data. Call this form the "Canonical form".
http://soundfile.sapp.org/doc/WaveFormat/
ENVIRONMENTBuilding a C Environment in Windows
Before starting, it is necessary to setup your environment for W5100S-EVB-Pico. It is same as development environment for Raspberry Pi Pico.
In this guide I used Windows 10, Visual Studio Code and C/C++ based environment. For environment preparation I referred to Getting started with Raspberry Pi Pico guide on Raspberry Pi documentation website.
If you have any troubles following Raspberry Pi guide, then check below link, where author explains every installation step for environment preparation.
Or, refer to my previous post – 'Let's use the Raspberry Pico Ethernet Example! - Development environment configuration'
Connectivity Configuration
Connect the PDM microphone and the Tact switch.
Setup FileZilla-Server Program
The following serial terminal program and FTP server are required for FTP Client example test, download and install from below links.
- Tera Term
- FileZilla Server Interface
- Execute FileZilla server program and open FTP server.
- Set up the client to connect before opening the server
- Enter the IP of the PC or server that you are currently using
- Create an accessible USER ID and set the path to the PC
w5x00_ftp_pdm_microphone.uf2 Firmware Upload
https://github.com/Wiznet/RP2040-HAT-SOUND-C/tree/FTP-Microphone
- While pressing the BOOTSEL button of Raspberry Pi Pico, W5100S-EVB-Pico or W5500-EVB-Pico power on the board, the USB mass storage 'RPI-RP2' is automatically mounted.
- Drag and drop 'w5x00_ftp_pdm_microphone.uf2' onto the USB mass storage device 'RPI-RP2
- Connect to the serial COM port of Raspberry Pi Pico, W5100S-EVB-Pico or W5500-EVB-Pico with Tera Term.
- Connect to the serial COM port of Raspberry Pi Pico, W5100S-EVB-Pico or W5500-EVB-Pico with Tera Term.
Microphone FTP Run
- Once the Teraterm serial terminal is connected normally, information about the network will be printed as shown below. Also, we are waiting for a microphone recording.
- If you press the Tack switch, the microphone will have sound. In the example file, it will record for 10 seconds, and after the recording, it will be connected to the Filezilla Server.
- Ask for ID and password to connect to the server. Enter the ID and password set in Filezilla to connect to the server normally.
- All we have to do is send the music file. When you press "D", look up the files on the server. If you press another key, you will be able to be transmitted. There are currently no files, so nothing appears
- Ask for files to transfer to the server. Paste the WAV extension to the file you want to send to the server.
- If you press the "D" key again to verify that it was sent successfully, you can check the "test.wav" file stored on the server.
- FTP:Checking on the server shows that it is saved normally.
Comments