How can send speech with STM32F401 nucleo boards? - rs485

I am working on stm32f401 nucleo boards and I want to communicate 2 boards each others with uart for sending speech.
I am using Nucleo-CCA02M1 mems microphone kits. Should I use which one? RS422 or RS485 for a full dublex communication? Are there any example about that for helping?
Thank you.

If you want to use RS422 or RS485, you will need converter board to change uart to RS422 or RS485. Also, you do not need make any modification on your uart code to use any of them. These communication protocals are related with hardware. Uart, RS232, RS422 and RS485 are all serial communication. You can use any uart code for them.

Related

USB stack confusion/serial emulator

I am looking at implementing USB communication on a MCU which has a USB engine built into it. Basically you have access to the pipes/endpoints.
I am a little bit confused on the USB stack now. It appears that drivers operate on another level above the pipe/endpoint setup, so the pipe/endpoint is like a middle level layer that drivers are built on. Is this correct?
Secondly, I am interested in simulating serial communication over USB. It appears windows has a premade driver so on the computer side I do not need to program the pipe level.
How do I find out what I need to implement on the MCU to make it behave correctly with the generic serial driver?
This is an answer to your second question regarding the serial communication.
The USB standard defines a communication device class (CDC) for serial communication. The required drivers on the host side are implemented by Windows, macOS, Linux and many more operation systems.
The relevant CDC subclass is PSTN. The relevant documents are found in Class definition for Communication Devices 1.2.
The device basically implements four endpoints:
Control endpoint for configuration requests (baud rate, DTR state etc.). Have a look at SetLineCodeing, GetLineCoding and SetControlLineState.
Bulk endpoint for USB to serial transmission
Bulk endpoint for serial to USB transmission
Interrupt endpoint for notifications (DCD state, errors). See SerialState.
And of course you need to get the device descriptor right.
On top of that, you need to implement all the standard USB requests.
Chances are high that this has already been written for your MCU, both the standard requests and the serial communication. So why not use the existing code?

Can the NXP PN532 work on UART at a 38400 baud rate?

I am trying to integrate an RFID1356MIFARE, which uses NXP PN532, with an ESP32-EVB using their UART capabilities.
The NXP docs states that the PN532 is able to communicate on High Speed UART.
I am trying to use 38400 because that's the baud rate fixed by the reader that I'm using.
I've found a modified Adafruit PN532 library that added HSU support. This library states that HSU uses 115200 baud rate.
Now, I've modified PN532_HSU.cpp, where we can find:
void PN532_HSU::begin()
{
_serial->begin(115200);
}
into
void PN532_HSU::begin()
{
_serial->begin(38400, SERIAL_8N1, 36, 4);
}
Unfortunately, I haven't been able to establish communication between the reader and the ESP using this method.
I am able to get a readable output using normal Serial.read(), so UART communication works, but that's not how you read MIFARE cards.
I don't know what the problem is.
What do you think ?
[EDIT]
I went through the documentation and here is what i suggest: If you have a USB to serial device use it to directly connect reader module to computer else connect it directly using mini USB port in module. the follow following steps:
Put device in UART/ USB CDC mode depending on how you connected device to computer. Exact method to do this is provided in operation section of documentation
Use picoterm / screen or other serial terminal (if you are using Linux) or just use Arduino serial monitor with correct baud rate to connect device.(115200 for USB and 38400 for UART)
Type in commands listed in COMMAND SET FOR CDC AND UART MODE section in documentation to check if module is working or not.
Place some cards over reader to check what response does module sends when card is detected.
Use this information to develop your own library for reader.
It will not work with regular PN532 libraries. Instead you'll need to use regular Serial read and write to communicate.
[Original]
PN532 datasheet says host interface is selected by pulling up/down I0, I1 pins of device. For HSU both pins must be pulled down. This is implemented in hardware so you need to verify if the mode you want to use is set.
Looking into the link you posted for module, it says that it uses another micro-controller on board to extend communication capabilities, so maybe you need to use driver for that specific controller firmware? The link seems to have document explaining how to setup different communication system in Document section, please have a look there and check if it works.
Link: https://www.olimex.com/wiki/MOD-RFID1356MIFARE

How to create ethernet port from fpga digital input-output pins?

I have zynq with carrier board. This board has a ethernet port, but I need two ports. Can I create new ethernet port with fpga IO pins. Is it possible or do have any different idea about that?
My board is Picozed FMC Carrier.
Short: No!
An ethernet interface is a special type of analogue interface with lots and lots of special circuitry on it. You can NOT get the right behavior with a digital interface.
If your FPGA has a USB port you might try to add a USB <=> Ethernet converter chip to get a second Ethernet port. (like all the old Raspberry-Pi's have).

M210 DJI drone can't find UART pins

I am currently working on the serial communication on the M210 drone from DJI and I would like to test a programm using the serial communication. I know there are UART pins on the expansion ports but I cant find the documentation on the constructor's website to know which pins belong to Rx and Tx.
If someone has the information or knows where to find it.
Ps: I looked all the documentation on DJI's website about M210 and found nothing
Page 40 of the user manual you'll find this pin description:
I hope this helps

connecting PLC to my mfc program

In current scenario i am using RS-232 communication for operating hardware component from PC using Micro Controller in between.Whole Application is Created in MFC.
I am thinking to connect PLC for communicating hardware component to PC. So can anyone tell me how we can done this?
That depends on what hardware interface the PLC provides. If it does not use RS-232 (or ethernet) then you need an adapter. If your PC accepts plugin cards then you can probably get an adapter and driver in that form.
You need to figure out what protocol is used to communicate with the PLC e.g. COMLI, knowing that you will give you an abstract model to work with that you can use to control the hardware.

Resources