//uart.h/**********串口端口定义**********/ #define RxD PD0 #define TxD PD1#define baudrate 9600 //波特率 #define F_CPU 8000000UL //定义晶振频率void uart_init(void) { /*****RS232口线设置*****/
//delay.h/**********延时函数*****************/ /*----------------------------------------------- delay_us :1us延时函数 ------------------------------------------------*/ void delay_us(void) { as
#include#include #defineucharunsignedchar #defineuintunsignedint #defineAdd_keyPINC #defineCS_1(PORTB|=(1