[Hardware related] Switch configuration instructions

1. Huawei switch The example is Huawei switch (S6720-54C-EI-48S-AC) 1. Configuration instructions The laptop is connected to the switch COM port through the Console cable, and connected to the debugging session through xshell Note: 1. You can check the COM port number through the device manager 2. The transmission protocol is SERIAL, the baud rate […]

SPI communication hardware read and write W25Q64

void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct); SPI initialization void SPI_StructInit(SPI_InitTypeDef* SPI_InitStruct); SPI configuration structure void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState);SPI enable SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data);Send data uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx);Receive data void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG); Get the flag bit main.c #include “stm32f10x.h” // Device header #include “Delay.h” #include “OLED.h” #include “W25Q64.h” uint8_t MID; uint16_t DID; uint8_t ArrayWrite[] […]

STM32 SPI (4) hardware reading and writing W25Q64

STM32 SPI (4) hardware reading and writing W25Q64 Related pins SPI pin Multiplexed pin Pin Remap SPI1_NSS PA4 PA15 SPI1_SCK PA5 PB3 SPI1_MISO PA6 PB4 SPI1_MOSI PA7 PB5 SPI2_NSS PB12 SPI2_SCK PB13 SPI2_MISO PB14 SPI2_MOSI PB15 PA15, PB3, and PB4 in the pin remapping are used as JTAG debugging ports by default. If you want […]

STM32 I2C (4) hardware reading and writing MPU6050

STM32 I2C (4) hardware reading and writing MPU6050 Programming ideas The first step is to configure the I2C2 peripherals and initialize the I2C2 peripherals. Turn on the clock of the I2C peripheral and the corresponding GPIO port Initialize the GPIO port corresponding to the I2C peripheral to the multiplexed open-drain mode Use structures to configure […]

51 microcontroller: 220v household timer switch control system simulation (based on the inherent hardware of the development board)

This experiment is a small task of microcontroller development, because the system involves independent buttons (on/off keys, up, down, left and right keys, self-defined), LED digital tubes, buzzers, interrupts, timers and other related facilities. The use of 51 microcontroller is relatively comprehensive, so I will use it as an example to review. The system uses […]

Hardware circuit multiplier design (4bit, 8bit multiplier, use shift addition to implement 4bit multiplier, and use 4bit multiplier to implement 8bit multiplier, verilog)

1. Basic ideas of multiplier design The key idea in this article is to use shift addition to implement multiplication. Essentially, it decomposes multiplication into several addition operations, and implements multiplication through several additions. Taking 4-bit multiplication as an example, it can essentially be decomposed into three addition implementations. The following example: Calculate decimal 10*6 […]

IP address and MAC hardware address

IP address and MAC hardware address We all know that data communication requires an IP address plus a MAC address. Both addresses are indispensable. The following is the schematic diagram: 1. The following describes the communication process between computer A and computer B The switch forwards the data frame based on the MAC address of […]

<Hardware Design>Constant current source VI circuit design and analysis composed of op amp + triode

Table of Contents 01 Principle introduction & description Virtual short and virtual break of op amp 02 Constant current source description & analysis Simple constant current source circuit Simple constant current source circuit description Constant current source circuit analysis Constant current source VI circuit Constant current source VI circuit description Constant current source VI circuit […]

C# Gets information about computer hardware

1. The project references the System.Management library file 2. Create the HardwareHandler.cs class file namespace HardInfoTest.Utility { /// <summary> ///Computer hardware processing class /// </summary> public class HardwareHandler { public enum WMIPath { // hardware Win32_Processor, // CPU processor Win32_PhysicalMemory, //Physical memory module Win32_Keyboard, // keyboard Win32_PointingDevice, // Pointing input device, including mouse. Win32_FloppyDrive, // […]

Hard solutions to problems such as timeout, hardware error, and interrupt of HAL library SPI as a slave when receiving data from the host.

1. Basic situation of the problem One, 1 host Host F407, clock frequency is higher. The specific configuration of SPI is as follows: hspi1.Instance = SPI1; hspi1.Init.Mode = SPI_MODE_MASTER; hspi1.Init.Direction = SPI_DIRECTION_2LINES; hspi1.Init.DataSize = SPI_DATASIZE_16BIT; hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH; hspi1.Init.CLKPhase = SPI_PHASE_2EDGE; hspi1.Init.NSS = SPI_NSS_SOFT; // hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8; hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; // hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32; […]