當前位置:首頁 » 論文題目 » 單片機萬年歷開題報告
擴展閱讀
中國網路原創新人樂團 2021-03-31 20:26:56
黨政視頻素材 2021-03-31 20:25:44
廈門大學統計學碩士 2021-03-31 20:25:36

單片機萬年歷開題報告

發布時間: 2021-03-18 07:37:47

㈠ 電子萬年歷 畢業設計基於單片機控制的電子萬年歷 開題報告

直接使用MCU自己做高時鍾是不可靠的,建議使用DS1302或者DS12887等專用的時鍾晶元來完成時鍾部分,MCU用於人機交互就OK了,想再做復雜點的話可以見一片語音合成晶元(例如SN6288)進行語音報時等功能。

㈡ 急需單片機的電子時鍾硬體設計及開題報告!十萬火急!!!

單片機課程設計(報告):帶語音報時功能電子鍾系統硬體設計
一、回 設計內容及要求:答
1. 根據設計要求,完成帶語音報時功能電子鍾系統硬體設計,並用電子CAD軟體繪制出原理圖,編輯、繪制出PCB印製版。
要求:
(1) 原理圖中元件電氣圖形符號符合國家標准;
(2) 整體布局合理,注標規范、明確、美觀,不產生歧義。
(3) 列出完整的元件清單(標號、型號及大小、封裝形式、數量)
(4) 圖紙幅面為A4。
(4) 布局、布線規范合理,滿足電磁兼容性要求。
(5) 在元件面的絲印層上,給出標號、型號或大小。所有注釋信息(包括標號、型號及說明性文字)要規范、明確,不產生歧義。
2. 編寫並調試驅動程序。

㈢ 哪位有基於單片機的多功能數字電子鍾的開題報告

源程序如下:ORG0000H;程序開始入口LJMPSTARTORG0003H;外中斷0中斷程序入口RETIORG000BH;定時器T0中斷程序入口LJMPINTT0;跳至INTTO執行ORG0013H;外中斷1中斷程序入口RETIORG001BH;定時器T1中斷程序入口LJMPINTT1ORG0023H;串列中斷程序入口地址RETI;---------------主程序----------------------;START:MOVR0,#70H;70給R0,清70-7FH顯示內存MOVR7,#0FHCLEARDISP:MOV@R0,#00H;0給R0中的數為地址的內存中存放(70H)INCR0DJNZR7,CLEARDISPMOV78H,#2;默認時間為12:00,鬧鍾5:00MOV79H,#1MOV74H,#2;防止上電時數碼管顯示00小時MOV75H,#1MOV66H,#1;中斷退出時66H為1時,分、時計時單元數據移入顯存標志MOV68H,#1;上電默認鬧鍾開狀態MOV7DH,#6;鬧鍾時十位MOV7CH,#3MOV69H,#0MOV7AH,#0AH;放入"熄滅符"數據MOVTMOD,#11H;設T0、T1為16位定時器MOVTL0,#0B0H;50MS定時初值(T0計時用)MOVTH0,#3CHSETBEA;總中斷開放SETBET0;允許T0中斷SETBTR0;T0定時器開始計時MOVR4,#14H;1秒定時用初值(50MS×20)START1:LCALLDISPLAY;顯示子程序LCALLBEEP;鬧鍾查詢JNBP1.7,SETTIME;P1.7口為0時轉時間調整程序JMPSTART1;P1.7口為1時跳回START1;-----------------------時間鬧鍾調整系統--------------------------;NFLAG:MOVA,68H;設置鬧鍾開關狀態CJNEA,#1,BEE68MOV68H,#0JMPE6BEE68:MOV68H,#1E6:MOV66H,#8;中斷退出66H不為1時分、時計時單元數據移入顯存標志MOV72H,7BHMOV73H,7CHMOV74H,7DHMOV75H,7EHLCALLDDLLCALLDDLMOV72H,68HMOV73H,69HMOV74H,7AHMOV75H,7AHLCALLDDLLCALLDDLMOV66H,#1LJMPSTART1SETTIME:LCALLDDLJBP1.7,NFLAG;鍵按下時間小於1秒,設置鬧鍾開關狀態並查看鬧鍾時間,不關走時,確保准確,大於1秒調時MOVTL1,#0B0H;T1閃爍定時初值MOVTH1,#3CHMOVR2,#06H;進入調時狀態,賦閃爍定時初值MOV66H,#8;調鬧鍾時保持走時,關閉時鍾顯示數據SETBET1;允許T1中斷SETBTR1;開啟定時器T1SET1:LCALLDISPLAY;調用顯示,防止鍵按下無顯示JNBP1.7,SET1;P1.7口為0等待鍵釋放MOVR5,#00H;清設置類型閃爍標志SETN1:INCR5;鬧鍾分調整SET5:LCALLDISPLAYJBP1.7,SET5SEETN1:LCALLDDL;有鍵按下大於1秒分時間連續加(0.5秒加1),小於1秒轉調時狀態JBP1.7,SET6;鍵釋放查詢,鍵釋放自動轉調時MOVR0,#7CHLCALLADD1MOVA,R3CLRCCJNEA,#60H,HHN1HHN1::INCR5;鬧鍾時調整SEET6:LCALLDISPLAYJBP1.7,SEET6SEETNH1:LCALLDDLJBP1.7,SETFMOVR0,#7EHLCALLADD1MOVA,R3CLRCCJNEA,#24H,HOUU1HOUU1::LCALLDISPLAYJBP1.7,SETFLCALLDDLJNBP1.7,SETOUT;短按調時,長按退出CLRET0CLRTR0MOV70H,#00H;設定後的時間從00秒開始走時MOV71H,#00HINCR5SET3:LCALLDISPLAYJBP1.7,SET3SETMM:LCALLDDLJBP1.7,SET4MOVR0,#77HLCALLADD1MOVA,R3CLRCCJNEA,#60H,MMHMMH:JCSETMMLCALLCLR0AJMPSETMMSET4:INCR5SEET4:LCALLDISPLAYJBP1.7,SEET4SETHH:LCALLDDLJBP1.7,SETOUT1MOVR0,#79HLCALLADD1MOVA,R3CLRCCJNEA,#24H,HOUUHOUU::SETBET0SETBTR0;計時開始SETOUT:MOVR5,#00H;清設置類型閃爍標志CLRTR1;關閉T1CLRET1;關T1中斷MOV66H,#1SETOUT2:LCALLDISPLAYJNBP1.7,SETOUT2LJMPSTART1;--------------------------延時1秒鍾-----------------------;DDL:MOV18H,#36DDL0:MOV17H,#239DDL1:LCALLDISPLAYDJNZ17H,DDL1DJNZ18H,DDL0RET;----------------------------T0中斷程序------------------------;INTT0:PUSHACC;打包PUSHPSWCLRET0CLRTR0MOVA,#0B7HADDA,TL0MOVTL0,AMOVA,#3CHADDCA,TH0MOVTH0,ASETBTR0DJNZR4,OUTT0;20次中斷未到中斷退出ADDSS:MOVR4,#14H;20次中斷到(1秒)重賦初值MOVR0,#71H;指向秒計時單元(70-71H)ACALLADD1;調用加1程序(加1秒操作)MOVA,R3;秒數據放入A(R3為2位十進制數組合)CLRC;清進位標志CJNEA,#60H,ADDMMADDMM:JCOUTT01;小於60秒退出ACALLCLR0;等於或大於60秒清0MOVR0,#77H;指向分計時單元(76H-77H)ACALLADD1MOVA,R3CLRCCJNEA,#60H,ADDHHADDHH:JCOUTT0ACALLCLR0MOVR0,#79H;指向小時計時單元(78H-79H)ACALLADD1MOVA,R3CLRCCJNEA,#24H,HOURHOUR:JCOUTT0ACALLCLR0OUTT0:MOVA,66H;查詢標志CJNEA,#1,OUTT01MOV72H,76H;中斷退出時將分、時計時單元數據移入對應顯示單元MOV73H,77HMOV74H,78HMOV75H,79HOUTT01:POPPSW;出棧POPACCSETBET0;開放T0RETI;中斷返回;---------------------------加1程序--------------------------;ADD1:MOVA,@R0;取當前計時單元數據到ADECR0;指向前一地址SWAPA;A中數據高四位與低四位交換ORLA,@R0;前一地址中數據放入A中低四位ADDA,#01H;A加1操作DAA;十進制調整MOVR3,A;移入R3寄存器ANLA,#0FH;高四位變0MOV@R0,A;放回前一地址單元MOVA,R3;取回R3中暫存數據INCR0;指向當前地址單元SWAPA;A中數據高四位與低四位交換ANLA,#0FH;高四位變0MOV@R0,A;數據放入當削地址單元中RETCLR0:CLRCCLRA;清累加器MOV@R0,A;清當前地址單元DECR0;指向前一地址MOV@R0,A;前一地址單元清0RET;子程序返回;-------------------------調時閃爍程序----------------------;INTT1:PUSHACCPUSHPSWMOVTL1,#0B0HMOVTH1,#3CHDJNZR2,INTT1OUT;0.3秒未到退出中斷(50MS中斷6次)MOVR2,#06H;重裝0.3秒定時用初值CPL02H;0.3秒定時到對閃爍標志取反JB02H,FLASH1;02H位為1時顯示單元"熄滅"MOVA,R5CJNEA,#01H,NLJMPNNN1NL:CJNEA,#02H,NL1LJMPNNN1NL1:CJNEA,#03H,NL2LJMPNLLNL2:CJNEA,#04H,INTT1OUTLJMPNLLNLL:MOV72H,76HMOV73H,77HMOV74H,78HMOV75H,79HAJMPINTT1OUTNNN1:MOV72H,7BHMOV73H,7CHMOV74H,7DHMOV75H,7EHINTT1OUT:POPPSW;恢復現場POPACCRETI;中斷退出FLASH1:MOVA,R5CJNEA,#01H,MLLJMPMNN1ML:CJNEA,#02H,ML1LJMPMNN2ML1:CJNEA,#03H,MNLJMPMLLMN:CJNEA,#04H,INTT1OUTLJMPMHLMLL:MOV72H,7AHMOV73H,7AH;顯示單元(72-73H),將不顯示分數據MOV74H,78HMOV75H,79HAJMPINTT1OUTMHL:MOV72H,76HMOV73H,77HMOV74H,7AH;顯示單元(74-75H),小時數據將不顯示MOV75H,7AHAJMPINTT1OUTMNN1:MOV72H,7AHMOV73H,7AH;顯示單元(72-73H),將不顯示鬧鍾分數據MOV74H,7DHMOV75H,7EHAJMPINTT1OUTMNN2:MOV72H,7BHMOV73H,7CHMOV74H,7AHMOV75H,7AH;顯示單元(74-75H),鬧鍾小時數據將不顯示AJMPINTT1OUT;-------------------------顯示-------------------------------;DISPLAY:MOVDPTR,#DISDATAMOVA,70HMOVCA,@A+DPTRMOVP3,ACLRP1.0NOPNOPNOPSETBP1.0MOVA,71HMOVCA,@A+DPTRMOVP3,ACLRP1.1NOPNOPNOPSETBP1.1MOVA,72HMOVCA,@A+DPTRMOVP3,ACLRP1.2NOPNOPNOPSETBP1.2MOVA,73HMOVCA,@A+DPTRMOVP3,ACLRP1.3NOPNOPNOPSETBP1.3MOVA,74HMOVCA,@A+DPTRMOVP3,ACLRP1.4NOPNOPNOPSETBP1.4MOVA,75HMOVCA,@A+DPTRMOVP3,ACLRP1.5NOPNOPNOPSETBP1.5RETBEEP:MOVA,68H;查詢標志CJNEA,#1,BEEREMOVA,78H;查詢鬧鍾時個位CJNEA,7DH,BEEREMOVA,79H;查詢鬧鍾時十位CJNEA,7EH,BEEREMOVA,76H;查詢鬧鍾分個位CJNEA,7BH,BEEREMOVA,77H;查詢鬧鍾分十位CJNEA,7CH,BEEREBB:CLRP1.6LCALLDDLSETBP1.6LCALLDDLJNBP1.7,BEERRBEERE:RETBEERR:SETBP1.6MOV68H,#0LCALLDISPLAYJNBP1.7,BEERRJMPBEEREDISDATA:DB0C0H,0F9H,64H,70H,59H,52H,42H,0F8H,40H,50H,0FFH;0123456789空白END

㈣ 基於MSP430單片機的電子萬年歷

//==========直接上代碼吧

//===============LCD12887_1.C 主文件
/*--------------------------------------------------------------*/
//包含頭文件
#include<AT89X52.H>
#include"LCD1602_8.H"
#include"DS12887_1.H"

/*--------------------------------------------------------------*/
unsigned char k; //鍵值
unsigned char Set; //調整值

/*--------------------------------------------------------------*/
//延時200ms 函數定義
void delay200ms(void)
{
unsigned char i,j,k;
for(i=201;i>0;i--)
for(j=32;j>0;j--)
for(k=14;k>0;k--);
}

/*--------------------------------------------------------------*/
//延時5000+0us 函數定義
void delay5ms(void)
{
unsigned char i,j;
for(i=185;i>0;i--)
for(j=12;j>0;j--);
}

/*--------------------------------------------------------------*/
//鍵盤掃描
void Keysan(void) //P0_0切換鍵,P0_1數值加,P0_1數值減
{
if(P0_0 == 0)
{
delay5ms();
if(P0_0 == 0) k++;
if(k == 7) k = 0;
}
if(P0_1 == 0) {delay5ms(); if(P0_1 == 0) Set++;}
if(P0_2 == 0) {delay5ms(); if(P0_2 == 0) Set--;}
switch(k)
{
case 0: DS12887_SetTime(DS12887_Second, Set); if(Set > 59 || Set < 0) Set = 0; break;
case 1: DS12887_SetTime(DS12887_Minute, Set); if(Set > 59 || Set < 0) Set = 0; break;
case 2: DS12887_SetTime(DS12887_Hour , Set); if(Set > 24 || Set < 0) Set = 0; break;
case 3: DS12887_SetTime(DS12887_Day , Set); if(Set > 31 || Set < 0) Set = 0; break;
case 4: DS12887_SetTime(DS12887_Month , Set); if(Set > 12 || Set < 0) Set = 0; break;
case 5: DS12887_SetTime(DS12887_Year , Set);break;
default: break;
}
}

/*--------------------------------------------------------------*/
//主函數
void main(void)
{

SYSTEMTIME CurrentTime;
lcd_init();
DS12887_Init();

lcd_pos(0,0);
prints("Date:");
lcd_pos(0,1);
prints("Time:");
k = 6; //不改變時間
while(1)
{
DS12887_GetTime(&CurrentTime);
DateToStr(&CurrentTime);
TimeToStr(&CurrentTime);
lcd_pos(6,0);
prints(CurrentTime.DateString);
lcd_pos(6,1);
prints(CurrentTime.TimeString);
delay200ms();
Keysan();
}
}

//=======================包含文件1 LCD1602_8.H
/*--------------------------------------------------------------*/
//包含頭文件
#include<AT89X52.H>
#include"LCD1602_8.H"
#include"DS12887_1.H"

/*--------------------------------------------------------------*/
unsigned char k; //鍵值
unsigned char Set; //調整值

/*--------------------------------------------------------------*/
//延時200ms 函數定義
void delay200ms(void)
{
unsigned char i,j,k;
for(i=201;i>0;i--)
for(j=32;j>0;j--)
for(k=14;k>0;k--);
}

/*--------------------------------------------------------------*/
//延時5000+0us 函數定義
void delay5ms(void)
{
unsigned char i,j;
for(i=185;i>0;i--)
for(j=12;j>0;j--);
}

/*--------------------------------------------------------------*/
//鍵盤掃描
void Keysan(void) //P0_0切換鍵,P0_1數值加,P0_1數值減
{
if(P0_0 == 0)
{
delay5ms();
if(P0_0 == 0) k++;
if(k == 7) k = 0;
}
if(P0_1 == 0) {delay5ms(); if(P0_1 == 0) Set++;}
if(P0_2 == 0) {delay5ms(); if(P0_2 == 0) Set--;}
switch(k)
{
case 0: DS12887_SetTime(DS12887_Second, Set); if(Set > 59 || Set < 0) Set = 0; break;
case 1: DS12887_SetTime(DS12887_Minute, Set); if(Set > 59 || Set < 0) Set = 0; break;
case 2: DS12887_SetTime(DS12887_Hour , Set); if(Set > 24 || Set < 0) Set = 0; break;
case 3: DS12887_SetTime(DS12887_Day , Set); if(Set > 31 || Set < 0) Set = 0; break;
case 4: DS12887_SetTime(DS12887_Month , Set); if(Set > 12 || Set < 0) Set = 0; break;
case 5: DS12887_SetTime(DS12887_Year , Set);break;
default: break;
}
}

/*--------------------------------------------------------------*/
//主函數
void main(void)
{

SYSTEMTIME CurrentTime;
lcd_init();
DS12887_Init();

lcd_pos(0,0);
prints("Date:");
lcd_pos(0,1);
prints("Time:");
k = 6; //不改變時間
while(1)
{
DS12887_GetTime(&CurrentTime);
DateToStr(&CurrentTime);
TimeToStr(&CurrentTime);
lcd_pos(6,0);
prints(CurrentTime.DateString);
lcd_pos(6,1);
prints(CurrentTime.TimeString);
delay200ms();
Keysan();
}
}

//================================ 包含文件2 DS12887_1.H
/*--------------------------------------------------------------*/
//File: DS12887驅動程序
//Date: 08-10-20 ~ 10-23
//Time: 21:20 ~ 16:53
//Source: Web

/*--------------------------------------------------------------*/
#ifndef __DS12887_1_H__
#define __DS12887_1_H__

/*--------------------------------------------------------------*/
//介面定義
sbit DS_AS = P3^0; //地址選擇
sbit DS_RW = P3^1; //讀寫選擇
sbit DS_DS = P3^2; //數據選擇
sbit DS_IRQ = P3^3; //中斷,低電平有效,通過讀出0x0c來清除信號
sfr DS_DAT = 0x90; //8位數據線P1口

/*--------------------------------------------------------------*/
//數據地址定義
#define DS12887_Second 0x00 //秒
#define DS12887_Minute 0x02 //分
#define DS12887_Hour 0x04 //時
#define DS12887_Week 0x06 //星期
#define DS12887_Day 0x07 //日
#define DS12887_Month 0x08 //月
#define DS12887_Year 0x09 //年

/*--------------------------------------------------------------*/
//定義時間類型
typedef struct _SYSTEMTIME_
{
unsigned char Second;
unsigned char Minute;
unsigned char Hour;
unsigned char Week;
unsigned char Day;
unsigned char Month;
unsigned char Year;
unsigned char DateString[9];
unsigned char TimeString[9];
}SYSTEMTIME;

/*--------------------------------------------------------------*/
//函數聲明
void DS12887_Init(void); //DS12887初始化
void DS12887_Write(unsigned char Address, unsigned char Value); //DS12887指定地址寫入數據
unsigned char DS12887_Read(unsigned char Address); //DS12887指定地址中讀出數據
void DS12887_SetTime(unsigned char Address, unsigned char Value); //設置時間函數
void DS12887_GetTime(SYSTEMTIME *Time); //讀出時間
void DateToStr(SYSTEMTIME *Time); //日期轉化成字元
void TimeToStr(SYSTEMTIME *Time); //時間轉化成字元

/*--------------------------------------------------------------*/
//DS12887指定地址寫入數據
void DS12887_Write(unsigned char Address, unsigned char Value)
{
DS_AS = 0;
DS_DS = 1;
DS_RW = 1;
DS_AS = 1;
DS_DAT= Address;
DS_AS = 0;
DS_RW = 0;
DS_DAT= Value;
DS_RW = 1;
DS_AS = 1;
}

/*--------------------------------------------------------------*/
//DS12887指定地址中讀出數據
unsigned char DS12887_Read(unsigned char Address)
{
unsigned char DS_RDAT;
DS_AS = 0;
DS_DS = 1;
DS_RW = 1;
DS_AS = 1;
DS_DAT= Address;
DS_AS = 0;
DS_DS = 0;
DS_DAT=0xff;
DS_RDAT = DS_DAT;
DS_DS = 1;
DS_AS = 1;
return (DS_RDAT);
}

/*--------------------------------------------------------------*/
//DS12887初始化
void DS12887_Init(void)
{
DS12887_Write(0x0a, 0x20); //啟動DS12887
DS12887_Write(0x0b, 0x86); //禁止更新,接下來初始化數據,即寫入時間,日期等
DS12887_Write(0x0b, 0x06); //正常更新,二進制格式,24進制小時
}

/*--------------------------------------------------------------*/
//設置時間函數
void DS12887_SetTime(unsigned char Address, unsigned char Value)
{
DS12887_Write(0x0b, 0x86); //禁止更新,接下來初始化數據,即寫入時間,日期等
DS12887_Write(Address,Value);
DS12887_Write(0x0b, 0x06); //正常更新,二進制格式,24進制小時
}

/*--------------------------------------------------------------*/
//讀出時間
void DS12887_GetTime(SYSTEMTIME *Time)
{
Time->Second = DS12887_Read(DS12887_Second);
Time->Minute = DS12887_Read(DS12887_Minute);
Time->Hour = DS12887_Read(DS12887_Hour );
Time->Day = DS12887_Read(DS12887_Day );
Time->Week = DS12887_Read(DS12887_Week );
Time->Month = DS12887_Read(DS12887_Month );
Time->Year = DS12887_Read(DS12887_Year );
}

/*--------------------------------------------------------------*/
//日期轉化成字元
void DateToStr(SYSTEMTIME *Time)
{
Time->DateString[0] = Time->Year/10 + '0';
Time->DateString[1] = Time->Year%10 + '0';
Time->DateString[2] = '-';
Time->DateString[3] = Time->Month/10 + '0';
Time->DateString[4] = Time->Month%10 + '0';
Time->DateString[5] = '-';
Time->DateString[6] = Time->Day/10 + '0';
Time->DateString[7] = Time->Day%10 + '0';
Time->DateString[8] = '\0';
}

/*--------------------------------------------------------------*/
//時間轉化成字元
void TimeToStr(SYSTEMTIME *Time)
{
Time->TimeString[0] = Time->Hour/10 + '0';
Time->TimeString[1] = Time->Hour%10 + '0';
Time->TimeString[2] = ':';
Time->TimeString[3] = Time->Minute/10 + '0';
Time->TimeString[4] = Time->Minute%10 + '0';
Time->TimeString[5] = ':';
Time->TimeString[6] = Time->Second/10 + '0';
Time->TimeString[7] = Time->Second%10 + '0';
Time->TimeString[8] = '\0';
}

/*--------------------------------------------------------------*/
#endif

/*--------------------------------------------------------------*/
//File: LCD1602_8.H
//Date: 08-7-29
//Time: 16:09
//Note: LCD1602 Mini Driver.

/*--------------------------------------------------------------*/
#ifndef __LCD1602_8_H__
#define __LCD1602_8_H__
#include <intrins.h>

/*--------------------------------------------------------------*/
//LCD介面定義
sfr io = 0xA0; //P0-0x80,P1-0x90,P2-0xA0,P3-0xB0;
sbit rs = P3^4; //LCD數據/命令選擇端(H/L)
sbit rw = P3^5; //LCD讀/寫選擇端(H/L)
sbit ep = P3^6; //LCD使能控制
sbit bz = io^7; //LCD忙標志位

/*--------------------------------------------------------------*/
//函數聲明
void lcd_busy(void); //測試LCD忙碌狀態程序
void lcd_wcmd(unsigned char cmd); //寫入指令到LCD程序
void lcd_wdat(unsigned char dat); //寫入數據到LCD程序
void lcd_pos (unsigned char x, bit y); //LCD數據指針位置程序
//void printc(unsigned char CHAR); //顯示字元
void prints(unsigned char *string); //顯示字元串
void lcd_init(void); //LCD初始化設定程序

/*--------------------------------------------------------------*/
//測試LCD忙碌狀態
void lcd_busy(void)
{
do{
ep = 0;
rs = 0; //指令
rw = 1; //讀出
io = 0xff;
ep = 1;
_nop_(); //高電平讀出 1us
}while(bz); //bz=1表示忙,bz=0表示空閑
ep = 0;
}

/*--------------------------------------------------------------*/
//寫入指令到LCD
void lcd_wcmd(unsigned char cmd)
{
lcd_busy(); //檢測忙
rs = 0; //指令
rw = 0; //寫入
ep = 1;
io = cmd; //指令
ep = 0; //下降沿有效
}

/*--------------------------------------------------------------*/
//寫入數據函數
void lcd_wdat(unsigned char Data)
{
lcd_busy(); //檢測忙
rs = 1; //數據
rw = 0; //寫入
ep = 1;
io = Data; //數據
ep = 0; //下降沿有效
}

/*--------------------------------------------------------------*/
//LCD數據指針位置程序
void lcd_pos(unsigned char x, bit y)
{
if(y)lcd_wcmd(x|0xc0); //y=1,第二行顯示;y=0,第一行顯示 0<=x<16
else lcd_wcmd(x|0x80); //數據指針=80+地址碼(00H~27H,40H~67H)
}

/*--------------------------------------------------------------*/
//顯示字元
/*
void printc(unsigned char CHAR)
{
lcd_wdat(CHAR);
}
*/

/*--------------------------------------------------------------*/
//顯示字元串
void prints(unsigned char *string)
{
while(*string) {lcd_wdat(*string);string++;}
}

/*--------------------------------------------------------------*/
//LCD初始化設定
void lcd_init()
{
lcd_wcmd(0x38); //設置LCD為16X2顯示,5X7點陣,八位數據介面
lcd_wcmd(0x06); //LCD顯示游標移動設置(游標地址指針加1,整屏顯示不移動)
lcd_wcmd(0x0c); //LCD開顯示及游標設置(游標不閃爍,不顯示"_")
lcd_wcmd(0x01); //清除LCD的顯示內容
}

/*--------------------------------------------------------------*/
#endif

以下是相應的說明:
8根並行數據線+三根控制信號線~就可以咯~

按鍵接法(按鍵的另一條腿接到GND上):
P0_0切換鍵,
P0_1數值加,
P0_1數值減

時鍾日歷管腳接法:
sbit DS_AS = P3^0; //地址選擇
sbit DS_RW = P3^1; //讀寫選擇
sbit DS_DS = P3^2; //數據選擇
sbit DS_IRQ = P3^3; //中斷,低電平有效,通過讀出0x0c來清除信號
sfr DS_DAT = 0x90; //8位數據線P1口

液晶管腳接法:
sfr io = 0xA0; //液晶數據口 P2-0xA0; --D0-D7
sbit rs = P3^4; //LCD數據/命令選擇端(H/L) --RS / DI
sbit rw = P3^5; //LCD讀/寫選擇端(H/L) --RW
sbit ep = P3^6; //LCD使能控制 --EN
sbit bz = io^7; //LCD忙標志位(不用再接)

DS12887的RST接在VCC, CS接在GND, IRQ不用管, MOT懸空即可~也即選擇默認的Intel 工作方式

㈤ 基於單片機的數字時鍾設計開題報告

這么簡單的問題還要找人要?自己不能動下腦子?就這樣還指望學會單片機呢?要多動手,自己思考這樣做出的東西才是自己的。

㈥ 單片機設計多功能電子鍾要研究或解決的問題以及擬採用的研究手段(途徑)(論文開題報告用)

已經發到你的郵箱 請查閱

㈦ 基於單片機電子時鍾設計的開題報告怎樣寫

電動智能小車(完整論文) 電子時鍾 電氣工程系06屆畢業設計開題報告內 自動容加料機控制系統 門控自動照明電路 電子設計大賽點陣電子顯示屏(A題) 目錄.txt

http://www..com/s?cl=3&wd=33%B8%F6%B5%A5%C6%AC%BB%FA%C9%E8%BC%C6%20%20%CB%D1%CB%F7

㈧ 單片機製作萬年歷主要技術和方法

可以自己模擬一個時鍾,也可以使用單片機內部的時鍾功能寄存器(部分支持),最好的是使用相關時鍾晶元,這個時間很准,加上備用電池就是一個時鍾了,萬年歷也同時支持,
再就是硬體製作了,需要很多元器件,