代码有些地方不够完善,使用的是pic16f877a单片机,bk300开发板,程序实现通电pc端口往主机里面写数据,主机接收数据后再送给从机,根据接收地数据,再返回给主机应答信号
2023-04-18 14:54:30 17KB spi,串口
1
#include #define uchar unsigned char #define uint unsigned int #define cs RC2 #define dout RC4 #define nop() asm(“nop”) __CONFIG(0x3B31); const uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; uchar data_temp; void delay(uint x); void init(); void didi(uchar num); void disp(uchar num1,uchar num2,uchar num3,uchar num4,uchar num5,uchar num6); void comm(uchar data); uchar read(uchar add); void write(uchar add,uchar wdata); void write
2022-05-06 17:29:52 39KB PIC单片机 SPI通信 程序设计 文章
1
PIC单片机 SPI主从通信,带proteus软件仿真,非常好
2020-01-03 11:17:20 28KB PIC单片机SPI通信 带proteus仿真
1