Skip to content

An open source S2E/RS485 module using W5500 and KL27

An open source S2E/RS485 module using W5500 and KL27

Components

Hardware components

x 1

WIZnet parts

Project description

使用W5500+KL27??以太??串口RS232、RS485透?功能: ?W5500的?移植到工程中,然后就是初始化KL27的SPI: void w5500_spi_init() { PORT_Init(PORTB, PORT_MODULE_ALT1_MODE, PIN_0|PIN_1, 0, NULL); //PTB0 - SPI1_RST -> W5500 RST GPIO_Init(GPIOB, GPIO_PIN_OUTPUT, PIN_0); GPIO_Clr (GPIOB, PIN_0); delay(0xfff); GPIO_Set (GPIOB, PIN_0); delay(0xffff); GPIO_Init (GPIOB, GPIO_PIN_INPUT,PIN_1); PORT_Init(PORTD, PORT_MODULE_ALT1_MODE, PIN_4, 0, NULL); //PTB0 - SPI1_RST -> W5500 RST GPIO_Init(GPIOD, GPIO_PIN_OUTPUT, PIN_4); GPIO_Set (GPIOD, PIN_4); //SPI1 PTD4/5/6/7 CS/SCK/MOSI/MISO PORT_Init(PORTD, PORT_MODULE_ALT2_MODE, PIN_5|PIN_6|PIN_7…

Keep reading with a free account

Guests can read 15 projects per visit. Log in or create a free account to read the full description, open the documents and join the comments.

Similar projects you might like