Change SPI pins in Arduino - arduino-uno

I read in the documentation that SPI pins are 10, 11, 12, 13, but my board has only few ports, so I can't use those specific ports, and I'd like to change them.

You can not change your SPI pins, it is the hardware configuration of your micro (ATmega328p)...
The only option you have is to have free PIN 11,12 and 13 for the SPI communication and configure your slave selection Pin on an other free digital I/O pin.
You can also consider using an arduino MEGA if you need more I/O.

Related

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).

Enabling spi1.x bus in android things raspberry pi 3

As per, rpi3 device tree, it has two spi buses i.e spi0 and spi1. spi0 bus supports 2 chip select [spi0.0, spi0.1] and spi1 bus supports 3 chip select[spi1.0, spi1.1, spi1.2] pins. All these can be configured in config.txt using dtoverlay.
Now my rpi3 uses spi0.1 for touchscreen interface. I dont want to use spi0.0 because it may cause bus contention. So i need to connect my other peripheral on spi1.x bus.
When i am querying rpi3 for spi buses using getSpiBusList(), the ouput is [SPI0.0, SPI0.1]
How do i get around this issue?
Note:- Using android things 0.7-devpreview
According Raspberry Pi I/O pinout there is only SPI0.0 and SPI0.1 SPI buses pins, so you can't use SPI1.? bus even if you configure it in config.txt.

Can raspberry Pi 3 and Lidar lite v3 connecting without resistor in circuit?

I recently try to use Lidar Lite v3 with my Rpi 3, and it works with I2C communication. My wiring method is due to offical documentation. Wiring picture However, what I have learned before is that the gpio pin of RPI can only afford 3.3v working voltage. My Question is that shouldn't I add the resistor in my circuit to prevent from breaking out the pins of my RPI ?

How can send speech with STM32F401 nucleo boards?

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.

Resources