#include<reg52.h头文件> #define uint unsigned int #de

随笔 - 30&
文章 - 0&评论 - 1&trackbacks - 0
平台:stc12le5a60+W25X16+keil
1 #ifndef _W25X_H_
4 #include &REG52.H&
unsigned char
unsigned int
unsigned char
unsigned int
10 #define
unsigned long
W25X_HOLD= P1^2;
W25X_CLK= P1^7;
19 #define nop() _nop_()
21 #define W25X_WriteEnable
22 #define W25X_WriteDisable
23 #define W25X_ReadStatusReg
//读状态寄存器
24 #define W25X_WriteStatusReg
//写状态寄存器
25 #define W25X_ReadData
26 #define W25X_FastReadData
27 #define W25X_FastReadDual
//快读双输出
28 #define W25X_PageProgram
29 #define W25X_BlockErase
30 #define W25X_SectorErase
//扇区擦除
31 #define W25X_ChipErase
//芯片擦除
32 #define W25X_PowerDown
33 #define W25X_ReleasePowerDown
//释放掉电
34 #define W25X_DeviceID
35 #define W25X_ManufactDeviceID
//制造/器件ID
36 #define W25X_JedecDeviceID
//JEDEC ID
SPI_Read_StatusReg();
SPI_Write_StatusReg(byte);
SPI_Write_Enable();
SPI_Write_Disable();
SPI_Read_ID1();
SPI_Read_ID2(uchar ID_Addr);
SPI_Read_ID3();
SPI_Read_Byte(uint32 Dst_Addr);
SPI_Read_nBytes(uint32 Dst_Addr, uchar nBytes_128);
SPI_FastRead_Byte(uint32 Dst_Addr);
SPI_FastRead_nBytes(uint32 Dst_Addr, uchar nBytes_128);
SPI_Write_Byte(uint32 Dst_Addr, uchar byte);
SPI_Write_nBytes(uint32 Dst_Addr, uchar nBytes_128);
SPI_Erase_Chip();
SPI_Erase_Sector(uint32 Dst_Addr);
SPI_Wait_Busy();
SPI_PowerDown();
SPI_ReleasePowerDown();
SPI_init();
SPI_Send_Byte(uchar out);
SPI_Get_Byte();
delay_nms(uchar i);
delay(uchar tt);
1 #include &W25X.H&
2 #include &REG52.H&
3 #include &intrins.h&
uint8 upper_128[16];
uint8 tx_buff[16];
delay_nms(uchar i)
for(;i&0;i--)
while(--j);
delay(uchar tt)
while(tt--);}
15 //=================================================================================================
16 //SPI_Read_StatusReg
Reads the status register of the serial flash
17 //SPI_Write_StatusReg
Performs a write to the status register
18 //SPI_Write_Enable
Write enables the serial flash
19 //SPI_Write_Disable
Write disables the serial flash
20 //SPI_Read_ID1
Reads the device ID using the instruction 0xAB
21 //SPI_Read_ID2
Reads the manufacturer ID and device ID with 0x90
22 //SPI_Read_ID3()
Reads the JedecDevice ID
23 //SPI_Read_Byte
Reads one byte from the serial flash and returns byte(max of 20 MHz CLK frequency)
24 //SPI_Read_nBytes
Reads multiple bytes(max of 20 MHz CLK frequency)
25 //SPI_FastRead_Byte
Reads one byte from the serial flash and returns byte(max of 33 MHz CLK frequency)
26 //SPI_FastRead_nBytes
Reads multiple bytes(max of 33 MHz CLK frequency)
27 //SPI_Write_Byte
Program one byte to the serial flash
28 //SPI_Write_nBytes
Program n bytes to the serial flash, n&=256
29 //SPI_Erase_Chip
Erases entire serial flash
30 //SPI_Erase_Sector
Erases one sector (64 KB) of the serial flash
31 //SPI_Wait_Busy
Polls status register until busy bit is low
32 //=================================================================================================
SPI_Read_StatusReg()
//读状态寄存器
uchar byte = 0;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_ReadStatusReg);
send Read Status Register command
byte = SPI_Get_Byte();
receive byte
W25X_CS = 1;
disable device
return byte;
SPI_Write_StatusReg(byte)
//写状态寄存器
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_WriteStatusReg);
select write to status register
SPI_Send_Byte(byte);
data that will change the status(only bits 2,3,7 can be written)
W25X_CS = 1;
disable the device
SPI_Write_Enable()
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_WriteEnable);
send W25X_Write_Enable command
W25X_CS = 1;
disable device
SPI_Write_Disable()
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_WriteDisable);
send W25X_WriteW25X_DIsable command
W25X_CS = 1;
disable device
SPI_Read_ID1()
//释放掉电/器件ID
uchar byte;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_DeviceID);
send read device ID command (ABh)
SPI_Send_Byte(0);
send address
SPI_Send_Byte(0);
send address
SPI_Send_Byte(0);
send 3_Dummy address
byte = SPI_Get_Byte();
receive Device ID byte
disable device
remain CS high for tRES2 = 1.8uS
return byte;
SPI_Read_ID2(uchar ID_Addr)
//制造/器件ID
uint IData16;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_ManufactDeviceID);
send read ID command (90h)
SPI_Send_Byte(0x00);
send address
SPI_Send_Byte(0x00);
send address
SPI_Send_Byte(ID_Addr);
send W25Pxx selectable ID address 00H or 01H
IData16 = SPI_Get_Byte()&&8;
receive Manufature or Device ID byte
IData16 |= SPI_Get_Byte();
receive Device or Manufacture ID byte
W25X_CS = 1;
disable device
return IData16;
SPI_Read_ID3()
//读JEDEC ID
uint IData16;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_JedecDeviceID);
send read ID command (9Fh)
IData16 = SPI_Get_Byte()&&8;
receive Manufature or Device ID byte
IData16 |= SPI_Get_Byte();
receive Device or Manufacture ID byte
tx_buff[2] = SPI_Get_Byte();
W25X_CS = 1;
disable device
return IData16;
SPI_Read_Byte(uint32 Dst_Addr)
//读某地址 数据
uchar byte = 0;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_ReadData);
read command
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFFFF) && 16));//
send 3 address bytes
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte((uchar)(Dst_Addr & 0xFF));
byte = SPI_Get_Byte();
W25X_CS = 1;
disable device
return byte;
return one byte read
SPI_Read_nBytes(uint32 Dst_Addr, uchar nBytes_128)
//读某地址起nBytes_128字节以内内容
uint32 i = 0;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_ReadData);
read command
SPI_Send_Byte(((Dst_Addr & 0xFFFFFF) && 16));
send 3 address bytes
SPI_Send_Byte(((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte(Dst_Addr & 0xFF);
for (i = 0; i & nBytes_128; i++)
read until no_bytes is reached
upper_128[i] = SPI_Get_Byte();
receive byte and store at address 80H - FFH
W25X_CS = 1;
disable device
SPI_FastRead_Byte(uint32 Dst_Addr)
//快读 某地址 数据
uchar byte = 0;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_FastReadData);
fast read command
SPI_Send_Byte(((Dst_Addr & 0xFFFFFF) && 16));
send 3 address bytes
SPI_Send_Byte(((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte(Dst_Addr & 0xFF);
SPI_Send_Byte(0xFF);
dummy byte
byte = SPI_Get_Byte();
W25X_CS = 1;
disable device
return byte;
return one byte read
SPI_FastRead_nBytes(uint32 Dst_Addr, uchar nBytes_128)
//快读 某地址 nBytes_128 个字节数据
uchar i = 0;
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_FastReadData);
read command
SPI_Send_Byte(((Dst_Addr & 0xFFFFFF) && 16));
send 3 address bytes
SPI_Send_Byte(((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte(Dst_Addr & 0xFF);
SPI_Send_Byte(0xFF);
dummy byte
for (i = 0; i & nBytes_128; i++)
read until no_bytes is reached
upper_128[i] = SPI_Get_Byte();
receive byte and store at address 80H - FFH
W25X_CS = 1;
disable device
SPI_Write_Byte(uint32 Dst_Addr, uchar byte)
W25X_CS = 0;
enable device
SPI_Write_Enable();
SPI_Wait_Busy();
W25X_CS = 0;
SPI_Send_Byte(W25X_PageProgram);
send Byte Program command
SPI_Send_Byte(((Dst_Addr & 0xFFFFFF) && 16));
send 3 address bytes
SPI_Send_Byte(((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte(Dst_Addr & 0xFF);
SPI_Send_Byte(byte);
send byte to be programmed
W25X_CS = 1;
disable device
SPI_Write_nBytes(uint32 Dst_Addr, uchar nBytes_128)
//页编程 128个字节
uchar i, byte;
W25X_CS = 0;
/* enable device */
SPI_Write_Enable();
/* set WEL */
W25X_CS = 0;
SPI_Send_Byte(W25X_PageProgram);
/* send Byte Program command */
SPI_Send_Byte(((Dst_Addr & 0xFFFFFF) && 16));
/* send 3 address bytes */
SPI_Send_Byte(((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte(Dst_Addr & 0xFF);
for (i = 0; i & nBytes_128; i++)
byte = upper_128[i];
SPI_Send_Byte(byte);
/* send byte to be programmed */
W25X_CS = 1;
/* disable device */
SPI_Erase_Chip()
//擦除芯片
W25X_CS = 0;
enable device
SPI_Write_Enable();
W25X_CS = 0;
SPI_Wait_Busy();
W25X_CS = 0;
SPI_Send_Byte(W25X_ChipErase);
send Chip Erase command
W25X_CS = 1;
disable device
SPI_Erase_Sector(uint32 Dst_Addr)
//扇区擦除
W25X_CS = 0;
enable device
SPI_Write_Enable();
W25X_CS = 0;
SPI_Send_Byte(W25X_SectorErase);
send Sector Erase command
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFFFF) && 16));//
send 3 address bytes
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte((uchar)Dst_Addr & 0xFF);
W25X_CS = 1;
disable device
SPI_Wait_Busy()
//等待忙结束
while (SPI_Read_StatusReg() == 0x03)
SPI_Read_StatusReg();
waste time until not busy WEL & Busy bit all be 1 (0x03)
SPI_PowerDown()
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_PowerDown);
send W25X_PowerDown command 0xB9
W25X_CS = 1;
disable device
remain CS high for tPD = 3uS
SPI_ReleasePowerDown()
W25X_CS = 0;
enable device
SPI_Send_Byte(W25X_ReleasePowerDown);
send W25X_PowerDown command 0xAB
W25X_CS = 1;
disable device
remain CS high for tRES1 = 3uS
206 #ifdef
SPI_init()
P1 = 0xFF;
SPCR = 0x50;
SPI_Send_Byte(uchar out)
unsigned char
SPDR = out;
temp = SPSR & 0x80;
while (temp != 0x80);
SPSR = SPSR & 0x7F;
SPI_Get_Byte()
unsigned char
SPDR = 0x00;
temp = SPSR & 0x80;
while (temp != 0x80);
SPSR = SPSR & 0x7F;
return SPDR;
224 #endif
226 #ifndef
SPI_init()
W25X_CLK = 0;
set clock to low initial state for SPI operation mode 0
W25X_CLK = 1;
set clock to High initial state for SPI operation mode 3
_hold = 1;
W25X_WP = 1;
W25X_CS = 1;
SPI_Write_Disable();
SPI_Send_Byte(uchar out)
uchar i = 0;
for (i = 0; i & 8; i++)
if ((out & 0x80) == 0x80)
check if MSB is high
W25X_DI = 1;
W25X_DI = 0;
if not, set to low
W25X_CLK = 1;
toggle clock high
out = (out && 1);
shift 1 place for next bit
nop();nop();nop();nop();
W25X_CLK = 0;
toggle clock low
SPI_Get_Byte()
uchar i = 0, in = 0, temp = 0;
for (i = 0; i & 8; i++)
in = (in && 1);
shift 1 place to the left or shift in 0
temp = W25X_DO;
save input
W25X_CLK = 1;
toggle clock high
if (temp == 1)
check to see if bit is high
in |= 0x01;
if high, make bit high
W25X_CLK = 0;
toggle clock low
return in;
260 #endif
#include &REG52.H&
#include &intrins.h&
#include &W25X.H&
unsigned char
unsigned int
unsigned char
unsigned int
unsigned long
init_cpu(void);
delay(uchar tt);
trace(uchar *str,uchar len);
test_page(uchar addr);
read_page(uchar addr);
Verify(uchar byte, uchar cor_byte);
tx_buff[16];
upper_128[16];
void main(void)
W25X_HOLD= 1;
init_cpu();
SPI_init();
tx_buff[0]='O';
tx_buff[1]='K';
trace(tx_buff,2);
if(rx_ok == 1)
rx_ok = 0;
switch(Rxtemp)
case 0x01:
Rxtemp = 0;
tx_buff[0] = SPI_Read_ID1();
trace(tx_buff,1);
case 0x02:
i = SPI_Read_ID2(0x00);
tx_buff[1] = (uchar)i;
tx_buff[0] = (uchar)(i&&8);
trace(tx_buff,2);
case 0x03:
i = SPI_Read_ID3();
tx_buff[1] = (uchar)i;
tx_buff[0] = (uchar)(i&&8);
trace(tx_buff,3);
case 0x04:
tx_buff[0] = SPI_Read_Byte(0x);
trace(tx_buff,1);
case 0x05:
tx_buff[0] = 0x55;
SPI_Write_Byte(0x,0xa5);
trace(tx_buff,1);
case 0x06:
tx_buff[0] = SPI_Read_StatusReg();
trace(tx_buff,1);
case 0x07:
SPI_Write_Enable();
case 0x08:
upper_128[0]=0x01;upper_128[1]=0x02;upper_128[2]=0x03;upper_128[3]=0x04;
SPI_Write_nBytes(0x,4);
case 0x09:
SPI_Erase_Chip();
case 0x0a:
SPI_Erase_Sector(0x000ff000);
tx_buff[0] = SPI_Read_StatusReg();
if(tx_buff[0] == 0)
trace(tx_buff,1);
case 0x0b:
test_page(0x00);
case 0x0c:
read_page(0x00);
void init_cpu(void)
TMOD = 0x21;
PCON = PCON | 0x80;
//波特率加倍
//异步、10位、波特率可变,无校验位
//在11.0592M晶振下,波特率是9600,
//T1 timer run
//uart interrupt enable
//all interrupt enable
//串口中断程序
void UART_isr(void) interrupt 4
Rxtemp = SBUF;
//SBUF = R
rx_ok = 1;
void test_page(uchar addr)
uint uchar byte;
uint32 Dst_A
W25X_CS = 0;
enable device
SPI_Write_Enable();
W25X_CS = 0;
Dst_Addr = (uint32)addr*256;
Dst_Addr = 0x0ff000;//(uint32)addr*256;
SPI_Send_Byte(W25X_PageProgram);
send Byte Program command
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFFFF) && 16));
send 3 address bytes
SPI_Send_Byte((uchar)((Dst_Addr & 0xFFFF) && 8));
SPI_Send_Byte((uchar)(Dst_Addr & 0xFF));
for (i = 0; i & 256; i++)
send byte to be programmed
SPI_Send_Byte(i);
W25X_CS = 1;
delay_nms(5);
W25X_CS = 0;
tx_buff[0] = SPI_Read_StatusReg();
trace(tx_buff,1);
if(tx_buff[0] == 0)
Dst_Addr = 0x0ff000;
for (i = 0; i & 256; i++)
byte = SPI_Read_Byte(Dst_Addr+i);
SBUF = byte;
while (TI == 0);
W25X_CS = 1;
//=================================================================================================
void read_page(uchar addr)
uchar byte;
uint32 Dst_A
Dst_Addr = addr*256;
Dst_Addr = 0x0ff000;
W25X_CS = 0;
for (i = 0; i & 256; i++)
byte = SPI_Read_Byte(Dst_Addr+i);
SBUF = byte;
while (TI == 0);
W25X_CS = 1;
//=================================================================================================
void Verify(uchar byte, uchar cor_byte)
if (byte != cor_byte)
//LED_Error = 0; /* display to view error on LED. */
//=================================================================================================
void myputchar(uchar c)
while (TI == 0);
//=================================================================================================
void trace(uchar *str,uchar len)
for(i=0;i&i++)
myputchar(*str);
&以上测试正确
阅读(...) 评论()#include &reg52.h& //52系列单片机的头文件 #define uint unsigned int //宏定义 #define uchar unsigned_百度知道
#include &reg52.h& //52系列单片机的头文件 #define uint unsigned int //宏定义 #define uchar unsigned
!,本人第一次写!!谁帮我看看这个程序哪里有问题啊!是6个数码管同时显示从0-9的,请高手多多指教方法!!关于写数码管程序不会啊
提问者采纳
}}void delay(ulong z)
&#47#include &
/reg52;x--)
for(y=z;void delay(uint); for(x=100;0,设置延时时间
P1=调用演示程序;/
/x&0;void main(){
temp=0y&gt,1);#include &//初始状态;库函数_crol_用来控制左移
delay(1100);&#47,点亮第一个LED P1=temp.h& while(1) {
temp=_crol_(temp,y;#define ulong unsigned long#define uchar unsigned charuchar temp.h&延时函数{
这是点亮数码管的吗
提问者评价
其他类似问题
为您推荐:
其他2条回答
这个很简单啊!你发邮箱给我
初学者嘛!!!不是很懂咯!!呵呵
这个写的话要看你硬件电路是什么样子的,不一样的电路程序是不一样的!
你要是有电路图就发过来一个,我看看,因为最近在忙,所以,可能要等短时间给你!
你没把程序些完啊
不会写了啊!!我都写了好久!!可能是原理搞不懂
uint的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁这个程序的22行哪有错啊? #include &reg52.h& #define uint uns_百度知道
这个程序的22行哪有错啊? #include &reg52.h& #define uint uns
for(j=110;}}void delayns(xms){
for(i=void'0;Y2&Y2--);Y2&
led6=0; delayns(2000);j&void main(){
while(1) { led6=1; led2=1;
void blink2(Y2)
{ led5=0;0; for(Y1=200: syntax error near 'Y2--);
for(Y2=200;0;
for(Y1=200;0;sbit led5=P1^6;Y1--)这个程序的22行哪有错啊?#include &0; led3=0,Y2; led2=0.c1(22);0; led2=1;Y2--);0;i& void blink1(Y1)
{ led2=0;Y2--);
for(Y1=200;Y2& for(Y2=200; delayns(2000);void blink(uint); led5=0;Y2& led2=1; led5=1,Y1& for(Y1=200;0; led4=1;Y2& led1=1.h&
for(Y2=200;0;sbit led2=P1^3; for(Y2=200; led5=1;sbit led4=P1^5; led4=1;
delayns(1000);reg52;Y2--);} led3=1,j;0; led5=1;0;Y1&求大神解释啊~什么情况;
for(Y2=200;Y1--); for(Y1=200;Y1&
for(Y1=200;Y1--)!;
}程序一直说;#define uint unsigned intsbit led1=P1^2;Y1--);sbit led3=P1^4; for(Y2=200;Y1& led5=0;Y2--);void delayns(uint);0;sbit led6=P1^7;Y1&j--);0;Y1--);0; led2=0; delayns(1000);Y2&Y1&Y1--),Y1:test1?
提问者采纳
先给你纠正了语法错误的程序,错误说明在后面
#include &reg52.h&#define uint unsigned intsbit led1=P1^2;sbit led2=P1^3;sbit led3=P1^4;sbit led4=P1^5;sbit led5=P1^6;sbit led6=P1^7;uint i,j,xms,Y1,Y2;void delayns(uint);void blink(uint);void main(){
while(1) { led6=1; led1=1;
delayns(1000);
led6=0; delayns(2000); led3=1; led4=1; delayns(1000); led3=0; led4=1; delayns(2000); }} void blink1(Y1){ led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--); led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--); led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--);}
void blink2(Y2)
{ led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--); led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--); led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--);}void delayns(xms){
for(i=i&0;i--)
for(j=110;j&0;j--);}
有这些错误一,函数声明时写的是void blink(uint);但你却定义了另外两个函数,一是blink1,一是blink2,然而这三个一次也没使用过!二,语法错误blink1和blink2都放在主函数内部定义了,我已改过来了。且这两个函数定义时的形参没用uint说明,我没加上去,留给你自己添加。三,将两个函数的定义移到外面后,主函数的最后还少了一个大括号,我已经加上了
以下是完整的没有语法错误的程序,但恐怕达不到你的目的,因为两个函数没有使用过!
#include &reg52.h&#define uint unsigned intsbit led1=P1^2;sbit led2=P1^3;sbit led3=P1^4;sbit led4=P1^5;sbit led5=P1^6;sbit led6=P1^7;uint i,j,xms,Y1,Y2;void delayns(uint);void blink1(uint);void blink2(uint);void main(){
while(1) { led6=1; led1=1;
delayns(1000);
led6=0; delayns(2000); led3=1; led4=1; delayns(1000); led3=0; led4=1; delayns(2000); }} void blink1(uint Y1){ led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--); led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--); led2=0; for(Y1=200;Y1&0;Y1--); led2=1;
for(Y1=200;Y1&0;Y1--);}
void blink2(uint Y2)
{ led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--); led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--); led5=0; for(Y2=200;Y2&0;Y2--); led5=1;
for(Y2=200;Y2&0;Y2--);}void delayns(uint xms){
for(i=i&0;i--)
for(j=110;j&0;j--);}
提问者评价
来自团队:
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁下载频道&ds1302
上传者:qq_&&&&| 上传时间:&&&&| 下载0次
单片机通过 读取ds1302时钟芯片的数据,在oled上显示,,语音芯片可以提供报时功能
基于51单片机的电子时钟、万年历,可按键设置
编译通过的驱动程序,可以直接加入工程使用的
使用前需要定义一下你驱动该芯片的3个管脚
在头文件里面定义
利用单片机STC DS1302
制作的20组可调定时器
STM8 单片机的DS1302实时时钟芯片的读写操作驱动.
原理图+程序,下载即可proteus仿真
这是个GPS授时系统,GPS采集时钟信号,经过STM32处理后,将数据赋给DS1302,这样保持DS1302与GPS同步。显示模块采用TFT液晶ili9320。代码显示结果是GPS时间和DS1302的时间。
DS1302底层驱动,TF177底层驱动,与STM32
这是一个多功能的万年历,有闹钟,周随时间更改而自动更新!
大部分用的都是51单片机写的DS1302,这个程序用ILI9320液晶和STM32写了一个DS1302的程序,代码供大家参考,测试可行。
STC89C52RC+DS1302电子时钟设计(附带详细源码)
采用实时时钟芯片DS1302+AT89C2051的红外遥控LED电子钟设计报告
利用12864显示时钟时间,从ds1302时钟芯片时时读取数据
VB上位机程序控制DS1302时钟的proteus仿真
MSP430+DS1302程序,IAR for Msp430开发环境。两个按键,4位时钟专用数码管显示。MSP430G253芯片。}

我要回帖

更多关于 define include 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信