简体   繁体   English

LGT8F328P-SSOP20 arduino 克隆和 SPI

[英]LGT8F328P-SSOP20 arduino clone and SPI

LGT8F328P clone I Would like to use the SPI interface. LGT8F328P clone 我想使用SPI接口。

as indicated on the datasheet:如数据表所示:

LGT8F328P 数据表 It has everything necessary but I don't know how to configure <SPI.h>.它拥有所有必要的东西,但我不知道如何配置 <SPI.h>。 and how to make it works for example with W5500?以及如何使其适用于例如 W5500?

I found out the problem, using LGT8F328P-SSOP20 there are two pins identical!我发现了问题,使用 LGT8F328P-SSOP20 有两个引脚相同! the MOSI on 11 and SS on 10. 11 上的 MOSI 和 10 上的 SS。

in this way I cannot communicate with SPI protocol.这样我就无法与 SPI 协议进行通信。

这可能对您有所帮助: https : //github.com/dbuezas/lgt8fx/issues/54其他人通过覆盖 PB0 的默认引脚 IO 方向,使 SPI 在 SSOP20 封装上工作

For W5500 chip, you can using ethernet2 library.对于 W5500 芯片,您可以使用 ethernet2 库。 Edit the ethernet2.h file for replacing w5500_cspin to 9.编辑 ethernet2.h 文件以将 w5500_cspin 替换为 9。

  EthernetClass() { _dhcp = NULL; w5500_cspin = 9; } //default 10
  void init(uint8_t _cspin = 9) { w5500_cspin = _cspin; }

This is specially for LGT8F328P-SSOP20这是专为LGT8F328P-SSOP20 设计的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM