0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

proteus雙機(jī)仿真系統(tǒng)

Harmony&嵌入式學(xué)習(xí) ? 來源:Harmony&嵌入式學(xué)習(xí) ? 作者:Harmony&嵌入式學(xué) ? 2023-07-17 09:29 ? 次閱讀

1)兩個單片機(jī)系統(tǒng)分別作為服務(wù)器和答題終端。服務(wù)器負(fù)責(zé)驗正考生個人信息,發(fā)送試愿到降端,定時收卷及判分功能。答題終端負(fù)責(zé)輸入考生個人信息,答題,修改答案及傳送答案到服務(wù)器。
2)服務(wù)器驗證考生個人信息,若信息不正確則向終端發(fā)出提示信息。信息驗證正確后將試題發(fā)送到答題終端,同時開始計時。無論答題是否完成。考試時間到則強(qiáng)制收題。也可在考試時同尚有剩余時接收答題終端發(fā)送過來的答案。收題后進(jìn)行判分工作并給出最終得分及答題情況統(tǒng)計信息。對回答錯誤的題日則給出原題及正確答案。
3)答題終端在收到試題后向考生顯示試題內(nèi)容(可逐道顯示)并接受考生輸入的答案。試題顯示應(yīng)具備翻頁功能以允許考生反復(fù)瀏覽試題或檢查所作答案。當(dāng)考生檢查完畢且考試時間尚有剩余,允許考生向服務(wù)器發(fā)送最終答案。
4)實(shí)現(xiàn)服務(wù)器和答題終端的兩個單片機(jī)系統(tǒng)均應(yīng)包含鍵盤和LCD液品顯示模塊。兩個單片機(jī)系統(tǒng)通過串口進(jìn)行通信。
*************************************************
(1)給出使用說明,包括按鍵的定義,操作方法等。
(2)所有功能用途均可實(shí)現(xiàn)且各功能轉(zhuǎn)換正常(模擬5道題即可)。
(3)考生個人信息包括考生姓名(可用拼音表示)和6位的學(xué)號。
(4)驗收時需要演示考生個人信息不正確時的處理情況:
(5)服務(wù)器和終端都應(yīng)實(shí)時顯示考試剩余時間:
(6)四則運(yùn)算應(yīng)覆蓋加減乘除四種運(yùn)算:
(7)終端答題時,在未提交答案前應(yīng)允許反復(fù)瀏覽或修改答案

wKgZomSz_KiATZtVAAILvPoTU9c033.png

服務(wù)端

#include "reg52.h"			 //此文件中定義了單片機(jī)的一些特殊功能寄存器
#define uchar unsigned char
#define uint unsigned int
typedef unsigned int u16;	  //對數(shù)據(jù)類型進(jìn)行聲明定義
typedef unsigned char u8;
sbit wr=P2^0;				//數(shù)據(jù)寫
sbit rd=P2^1;				//數(shù)據(jù)讀
sbit ce=P2^2;				//片選
sbit cd=P2^3;				//指令數(shù)據(jù)通道,1指令,0數(shù)據(jù)
sbit rst=P2^4;			//復(fù)位信號
sbit key = P3^2;
uchar S_datt[2][6]={{1,2,3,4,5,6},{1,1,1,1,1,1}};
uchar Title[10] = {5,1,3,2,1,5,6,3,1,1};
uchar Answer[5] = {6,1,5,2,2};
uchar R_mode;
uchar R_wei;
uchar R_buff[20];
uint dis_tim;
uint ALL_time=30;
uchar flag_mode;
uchar C_T[6];
uchar bl;
uchar code HZ0[][32]={
	
{0x00,0x00,0x3E,0xFC,0x22,0x84,0x22,0x84,0x22,0x94,0x3E,0x88,0x22,0x80,0x22,0xFC,
0x22,0xA4,0x3E,0xA4,0x22,0xA8,0x22,0xA8,0x22,0x90,0x42,0xA8,0x4A,0xC4,0x84,0x82},/*"服",0*/

{0x04,0x00,0x04,0x00,0x0F,0xF0,0x18,0x20,0x24,0xC0,0x03,0x00,0x0C,0xC0,0x32,0x30,
0xC2,0x0E,0x1F,0xF0,0x02,0x10,0x04,0x10,0x04,0x10,0x08,0x10,0x10,0xA0,0x20,0x40},/*"務(wù)",1*/

{0x00,0x00,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C,0x01,0x20,0x01,0x10,0xFF,0xFE,
0x02,0x80,0x0C,0x60,0x30,0x18,0xC0,0x06,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C},/*"器",2*/


{0x01,0x00,0x21,0x08,0x11,0x08,0x09,0x10,0x09,0x20,0x01,0x00,0x7F,0xF8,0x00,0x08,
0x00,0x08,0x00,0x08,0x3F,0xF8,0x00,0x08,0x00,0x08,0x00,0x08,0x7F,0xF8,0x00,0x08},/*"當(dāng)",3*/

{0x10,0x10,0x08,0x10,0x08,0x20,0xFF,0xFE,0x00,0x00,0x3E,0x08,0x22,0x48,0x22,0x48,
0x3E,0x48,0x22,0x48,0x22,0x48,0x3E,0x48,0x22,0x08,0x22,0x08,0x2A,0x28,0x24,0x10},/*"前",4*/

{0x08,0x40,0x08,0x20,0x0B,0xFE,0x10,0x00,0x10,0x00,0x31,0xFC,0x30,0x00,0x50,0x00,
0x91,0xFC,0x10,0x00,0x10,0x00,0x11,0xFC,0x11,0x04,0x11,0x04,0x11,0xFC,0x11,0x04},/*"信",5*/

{0x01,0x00,0x02,0x00,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,
0x1F,0xF0,0x10,0x10,0x01,0x00,0x08,0x84,0x48,0x92,0x48,0x12,0x87,0xF0,0x00,0x00},/*"息",6*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*":",7*/

{0x07,0x02,0x78,0x02,0x08,0x02,0xFF,0x82,0x2A,0x12,0x2A,0x92,0xEB,0x12,0x2A,0x92,
0x6A,0x92,0xA9,0x92,0x1C,0x12,0x2A,0x12,0x49,0x02,0x88,0x82,0x08,0x0A,0x08,0x04},/*"剩",8*/

{0x01,0x00,0x01,0x00,0x02,0x80,0x04,0x40,0x08,0x20,0x10,0x10,0x2F,0xE8,0xC1,0x06,
0x01,0x00,0x3F,0xF8,0x01,0x00,0x11,0x10,0x11,0x08,0x21,0x04,0x45,0x04,0x02,0x00},/*"余",9*/

{0x00,0x08,0x00,0x08,0x7C,0x08,0x44,0x08,0x45,0xFE,0x44,0x08,0x44,0x08,0x7C,0x08,
0x44,0x88,0x44,0x48,0x44,0x48,0x44,0x08,0x7C,0x08,0x44,0x08,0x00,0x28,0x00,0x10},/*"時",10*/

{0x20,0x00,0x13,0xFC,0x10,0x04,0x40,0x04,0x47,0xC4,0x44,0x44,0x44,0x44,0x44,0x44,
0x47,0xC4,0x44,0x44,0x44,0x44,0x44,0x44,0x47,0xC4,0x40,0x04,0x40,0x14,0x40,0x08},/*"間",11*/

{0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x00,0x00,0xFF,0xFE,0x22,0x00,
0x3E,0xF8,0x22,0x88,0x3E,0x90,0x22,0x50,0x2F,0x20,0xF2,0x50,0x42,0x88,0x03,0x06},/*"最",12*/

{0x10,0x80,0x10,0x80,0x20,0xF8,0x21,0x08,0x4B,0x10,0xFC,0xA0,0x10,0x40,0x20,0xA0,
0x43,0x18,0xFC,0x06,0x40,0xC0,0x00,0x20,0x18,0x10,0xE1,0x80,0x40,0x60,0x00,0x10},/*"終",13*/

{0x00,0x40,0x04,0x40,0x04,0x20,0x08,0x20,0x10,0x10,0x20,0x08,0x40,0x04,0x9F,0xE2,
0x04,0x20,0x04,0x20,0x04,0x20,0x08,0x20,0x08,0x20,0x10,0x20,0x21,0x40,0x40,0x80},/*"分",14*/

{0x08,0x20,0x49,0x20,0x2A,0x20,0x08,0x3E,0xFF,0x44,0x2A,0x44,0x49,0x44,0x88,0xA4,
0x10,0x28,0xFE,0x28,0x22,0x10,0x42,0x10,0x64,0x28,0x18,0x28,0x34,0x44,0xC2,0x82},/*"數(shù)",15*/

{0x00,0x00,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x11,0x00,0x11,0xF8,
0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0xFF,0xFE,0x00,0x00},/*"正",16*/

{0x00,0x40,0x00,0x40,0xFC,0x7C,0x10,0x84,0x11,0x08,0x22,0xFE,0x3C,0x92,0x64,0x92,
0x64,0xFE,0xA4,0x92,0x24,0x92,0x24,0xFE,0x3C,0x92,0x25,0x12,0x21,0x0A,0x02,0x04},/*"確",17*/

{0x21,0x10,0x21,0x10,0x39,0x10,0x27,0xFC,0x41,0x10,0x79,0x10,0xAF,0xFE,0x20,0x00,
0xFB,0xF8,0x22,0x08,0x22,0x08,0x23,0xF8,0x2A,0x08,0x32,0x08,0x23,0xF8,0x02,0x08},/*"錯",18*/

{0x00,0x00,0x43,0xF8,0x22,0x08,0x22,0x08,0x03,0xF8,0x00,0x00,0xE0,0x00,0x27,0xFC,
0x20,0x40,0x20,0x40,0x2F,0xFE,0x20,0x40,0x28,0xA0,0x31,0x10,0x22,0x08,0x0C,0x06},/*"誤",19*/


{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",20*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},


};
uchar code SZ[][16]={
	
{0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00},/*"0",0*/

{0x00,0x00,0x00,0x08,0x38,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00},/*"1",1*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x02,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00},/*"2",2*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x02,0x04,0x18,0x04,0x02,0x42,0x42,0x3C,0x00,0x00},/*"3",3*/

{0x00,0x00,0x00,0x04,0x0C,0x0C,0x14,0x24,0x24,0x44,0x7F,0x04,0x04,0x1F,0x00,0x00},/*"4",4*/

{0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x78,0x44,0x02,0x02,0x42,0x44,0x38,0x00,0x00},/*"5",5*/

{0x00,0x00,0x00,0x18,0x24,0x40,0x40,0x5C,0x62,0x42,0x42,0x42,0x22,0x1C,0x00,0x00},/*"6",6*/

{0x00,0x00,0x00,0x7E,0x42,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x00,0x00},/*"7",7*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00},/*"8",8*/

{0x00,0x00,0x00,0x38,0x44,0x42,0x42,0x42,0x46,0x3A,0x02,0x02,0x24,0x18,0x00,0x00},/*"9",9*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",10*/

{0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00,0x00,0x00},/*"+",11*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"-",12*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x24,0x18,0x18,0x18,0x24,0x6E,0x00,0x00},/*"x",13*/

{0x00,0x00,0x02,0x04,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x20,0x20,0x40,0x40,0x00},/*"/",14*/
{0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00,0x00,0x00},/*"=",15*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00},/*"=",16*/
};





void delay(uint t) //延時函數(shù)
{
uint i,j;
for(i=0;i

答題端:

#include "reg52.h"			 //此文件中定義了單片機(jī)的一些特殊功能寄存器
#define uchar unsigned char
#define uint unsigned int
typedef unsigned int u16;	  //對數(shù)據(jù)類型進(jìn)行聲明定義
typedef unsigned char u8;
u8 data_send;
sbit wr=P2^0;				//數(shù)據(jù)寫
sbit rd=P2^1;				//數(shù)據(jù)讀
sbit ce=P2^2;				//片選
sbit cd=P2^3;				//指令數(shù)據(jù)通道,1指令,0數(shù)據(jù)
sbit rst=P2^4;			//復(fù)位信號
sbit h1 = P1^0;
sbit h2 = P1^1;
sbit h3 = P1^2;
sbit h4 = P1^3;
sbit l1 = P1^4;	
sbit l2 = P1^5;
sbit l3 = P1^6;
sbit l4 = P1^7;	
uchar flag_mode;//當(dāng)前輸入模式   0為考生號 1為學(xué)號
uchar S_num;		//考生號
uchar S_buff[6];		//學(xué)號
uchar S_wei;
uchar R_mode;
uchar R_wei;
uchar R_buff[20];
uchar Tit[10];
uchar Tit_Now;
uchar Answer[5];
uint dis_tim;
uint ALL_time=30;
uchar code HZ0[][32]={
	
{0x10,0x40,0x10,0x40,0x3F,0x7E,0x28,0x90,0x45,0x08,0x82,0x80,0x0C,0x60,0x30,0x18,
0xCF,0xE6,0x00,0x00,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10},/*"答",0*/

{0x00,0x00,0x3E,0xFE,0x22,0x10,0x3E,0x20,0x22,0x7C,0x3E,0x44,0x00,0x54,0xFF,0x54,
0x08,0x54,0x08,0x54,0x2F,0x28,0x28,0x44,0x28,0x82,0x58,0x00,0x4F,0xFE,0x80,0x00},/*"題",1*/

{0x00,0xF8,0x3F,0x00,0x04,0x00,0x08,0x20,0x10,0x40,0x3F,0x80,0x01,0x00,0x06,0x10,
0x18,0x08,0x7F,0xFC,0x01,0x04,0x09,0x20,0x11,0x10,0x21,0x08,0x45,0x04,0x02,0x00},/*"系",2*/

{0x10,0x40,0x10,0x20,0x20,0x20,0x23,0xFE,0x48,0x40,0xF8,0x88,0x11,0x04,0x23,0xFE,
0x40,0x92,0xF8,0x90,0x40,0x90,0x00,0x90,0x19,0x12,0xE1,0x12,0x42,0x0E,0x04,0x00},/*"統(tǒng)",3*/

{0x00,0x40,0x40,0x40,0x27,0xFC,0x20,0x40,0x03,0xF8,0x00,0x40,0xE7,0xFE,0x20,0x00,
0x23,0xF8,0x22,0x08,0x23,0xF8,0x22,0x08,0x2B,0xF8,0x32,0x08,0x22,0x28,0x02,0x10},/*"請",4*/

{0x20,0x40,0x20,0xA0,0x21,0x10,0xFA,0x08,0x25,0xF6,0x40,0x00,0x53,0xC4,0x92,0x54,
0xFA,0x54,0x13,0xD4,0x1A,0x54,0xF2,0x54,0x53,0xD4,0x12,0x44,0x12,0x54,0x12,0xC8},/*"輸",5*/

{0x04,0x00,0x02,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x02,0x80,0x02,0x80,0x02,0x80,
0x04,0x40,0x04,0x40,0x08,0x20,0x08,0x20,0x10,0x10,0x20,0x10,0x40,0x08,0x80,0x06},/*"入",6*/

{0x02,0x00,0x02,0x08,0x3F,0xD0,0x02,0x20,0x02,0x40,0xFF,0xFE,0x01,0x00,0x02,0x00,
0x0F,0xF8,0x12,0x00,0x24,0x00,0x47,0xF0,0x80,0x10,0x00,0x10,0x00,0xA0,0x00,0x40},/*"考",7*/

{0x01,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x3F,0xFC,0x21,0x00,0x41,0x00,0x81,0x00,
0x01,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00},/*"生",8*/

{0x00,0x00,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x00,0x00,0xFF,0xFE,
0x08,0x00,0x10,0x00,0x1F,0xF0,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0xA0,0x00,0x40},/*"號",9*/

{0x00,0x40,0x40,0x40,0x27,0xFC,0x20,0x40,0x03,0xF8,0x00,0x40,0xE7,0xFE,0x20,0x00,
0x23,0xF8,0x22,0x08,0x23,0xF8,0x22,0x08,0x2B,0xF8,0x32,0x08,0x22,0x28,0x02,0x10},/*"請",10*/

{0x20,0x40,0x20,0xA0,0x21,0x10,0xFA,0x08,0x25,0xF6,0x40,0x00,0x53,0xC4,0x92,0x54,
0xFA,0x54,0x13,0xD4,0x1A,0x54,0xF2,0x54,0x53,0xD4,0x12,0x44,0x12,0x54,0x12,0xC8},/*"輸",11*/

{0x04,0x00,0x02,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x02,0x80,0x02,0x80,0x02,0x80,
0x04,0x40,0x04,0x40,0x08,0x20,0x08,0x20,0x10,0x10,0x20,0x10,0x40,0x08,0x80,0x06},/*"入",12*/

{0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0,
0x00,0x40,0x01,0x80,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00},/*"學(xué)",13*/

{0x00,0x00,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x00,0x00,0xFF,0xFE,
0x08,0x00,0x10,0x00,0x1F,0xF0,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0xA0,0x00,0x40},/*"號",14*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*":",15*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",16*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},

{0x00,0x00,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x11,0x00,0x11,0xF8,
0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0xFF,0xFE,0x00,0x00},/*"正",17*/

{0x00,0x40,0x00,0x40,0xFC,0x7C,0x10,0x84,0x11,0x08,0x22,0xFE,0x3C,0x92,0x64,0x92,
0x64,0xFE,0xA4,0x92,0x24,0x92,0x24,0xFE,0x3C,0x92,0x25,0x12,0x21,0x0A,0x02,0x04},/*"確",18*/

{0x21,0x10,0x21,0x10,0x39,0x10,0x27,0xFC,0x41,0x10,0x79,0x10,0xAF,0xFE,0x20,0x00,
0xFB,0xF8,0x22,0x08,0x22,0x08,0x23,0xF8,0x2A,0x08,0x32,0x08,0x23,0xF8,0x02,0x08},/*"錯",19*/

{0x00,0x00,0x43,0xF8,0x22,0x08,0x22,0x08,0x03,0xF8,0x00,0x00,0xE0,0x00,0x27,0xFC,
0x20,0x40,0x20,0x40,0x2F,0xFE,0x20,0x40,0x28,0xA0,0x31,0x10,0x22,0x08,0x0C,0x06},/*"誤",20*/

};

uchar code SZ[][16]={
	
{0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00},/*"0",0*/

{0x00,0x00,0x00,0x08,0x38,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00},/*"1",1*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x02,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00},/*"2",2*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x02,0x04,0x18,0x04,0x02,0x42,0x42,0x3C,0x00,0x00},/*"3",3*/

{0x00,0x00,0x00,0x04,0x0C,0x0C,0x14,0x24,0x24,0x44,0x7F,0x04,0x04,0x1F,0x00,0x00},/*"4",4*/

{0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x78,0x44,0x02,0x02,0x42,0x44,0x38,0x00,0x00},/*"5",5*/

{0x00,0x00,0x00,0x18,0x24,0x40,0x40,0x5C,0x62,0x42,0x42,0x42,0x22,0x1C,0x00,0x00},/*"6",6*/

{0x00,0x00,0x00,0x7E,0x42,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x00,0x00},/*"7",7*/

{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00},/*"8",8*/

{0x00,0x00,0x00,0x38,0x44,0x42,0x42,0x42,0x46,0x3A,0x02,0x02,0x24,0x18,0x00,0x00},/*"9",9*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",10*/

{0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00,0x00,0x00},/*"+",11*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"-",12*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x24,0x18,0x18,0x18,0x24,0x6E,0x00,0x00},/*"x",13*/

{0x00,0x00,0x02,0x04,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x20,0x20,0x40,0x40,0x00},/*"/",14*/
{0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x00,0x00,0x00,0x00},/*"=",15*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00},/*"=",16*/
};


void delay(uint t) //延時函數(shù)
{
uint i,j;
for(i=0;i1)
			{
			Tit_Now--;
			display_SZ(3,0,SZ[Tit[(Tit_Now-1)*2]]);
		  display_SZ(3,1,SZ[Tit_Now+10]);
			display_SZ(3,2,SZ[Tit[(Tit_Now-1)*2+1]]);
			display_SZ(3,3,SZ[16]);
			display_SZ(3,10,SZ[Tit_Now]);
			display_SZ(3,4,SZ[Answer[Tit_Now-1]]);
			}
			
		}
		
	}
	else
	{
		h1=1;
		h2=0;	
	if(l1==0 && h1==1 && h2==0 && l2==1 && l3==1 && l4==1 )//6
	{
		while(l1==0);
			if(flag_mode == 0)
		{
			S_num = 4;
			display_SZ(2,6,SZ[S_num]);
		}else if(flag_mode == 1)
		{
			S_buff[S_wei] = 4;
			display_SZ(2,S_wei,SZ[4]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 4;
			display_SZ(3,4,SZ[4]);
		}
		
		
	}else if(l1==1 && h1==1 && h2==0 && l2==0 && l3==1 && l4==1 )//7
	{
		while(l2==0);
		if(flag_mode == 1)
		{
			S_buff[S_wei] = 5;
			display_SZ(2,S_wei,SZ[5]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 5;
			display_SZ(3,4,SZ[5]);
		}
		
	}else if(l1==1 && h1==1 && h2==0 && l2==1 && l3==0 && l4==1)//8
	{
		while(l3==0);
		if(flag_mode == 1)
		{
			S_buff[S_wei] = 6;
			display_SZ(2,S_wei,SZ[6]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 6;
			display_SZ(3,4,SZ[6]);
		}
		
	}else if(l1==1 && h1==1 && h2==0 && l2==1 && l3==1 && l4==0)//9
	{
		while(l4==0);

		
	}else
	{
		
	  h1=1;
		h2=1;
    h3=0;
	
	if(l1==0 && h1==1 && h2==1 && h3==0 && l2==1 && l3==1 && l4==1)//11
	{
		while(l1==0);
		if(flag_mode == 1)
		{
			S_buff[S_wei] = 7;
			display_SZ(2,S_wei,SZ[7]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 7;
			display_SZ(3,4,SZ[7]);
		}
		
	}else if(l1==1 && h1==1 && h2==1 && h3==0 && l2==0 && l3==1 && l4==1)//12
	{
		while(l2==0);
		if(flag_mode == 1)
		{
			S_buff[S_wei] = 8;
			display_SZ(2,S_wei,SZ[8]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 8;
			display_SZ(3,4,SZ[8]);
		}
		
	}else if(l1==1 && h1==1 && h2==1 && h3==0 && l2==1 && l3==0 && l4==1)//13
	{
		while(l3==0);
		if(flag_mode == 1)
		{
			S_buff[S_wei] = 9;
			display_SZ(2,S_wei,SZ[9]);
			S_wei++;
		}else if(flag_mode == 2)
		{
			Answer[Tit_Now-1] = 9;
			display_SZ(3,4,SZ[9]);
		}
		
	}else if(l1==1 && h1==1 && h2==1 && h3==0 && l2==1 && l3==1 && l4==0 )//14
	{
		while(l4==0);
			 if(flag_mode == 2)
		{
			if(Tit_Now
聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 單片機(jī)
    +關(guān)注

    關(guān)注

    6037

    文章

    44558

    瀏覽量

    635213
  • Proteus
    +關(guān)注

    關(guān)注

    79

    文章

    1692

    瀏覽量

    106574
  • 服務(wù)器
    +關(guān)注

    關(guān)注

    12

    文章

    9160

    瀏覽量

    85415
  • 仿真系統(tǒng)
    +關(guān)注

    關(guān)注

    1

    文章

    97

    瀏覽量

    20660
收藏 人收藏

    評論

    相關(guān)推薦

    51單片機(jī)雙機(jī)通信

    本帖最后由 諾言proteus 于 2013-5-7 10:39 編輯 誰有51單片機(jī)雙機(jī)通信???要基于proteus仿真圖,和運(yùn)行程序.asm或者.c的。一經(jīng)錄用。重謝?。。?/div>
    發(fā)表于 12-30 07:40

    雙機(jī)通訊程序加仿真

    雙機(jī)通訊程序加仿真
    發(fā)表于 05-05 16:24

    Proteus的51程序設(shè)計和仿真

    Proteus的51程序設(shè)計和一個仿真仿真背景一、Proteus安裝二、51程序設(shè)計和仿真1.代碼2.protues操作過程總結(jié)
    發(fā)表于 01-10 06:49

    PROTEUS VSM在單片機(jī)系統(tǒng)仿真中的應(yīng)用

    PROTEUS VSM在單片機(jī)系統(tǒng)仿真中的應(yīng)用::介紹了單片機(jī)系統(tǒng)仿真工具PROTEUS VSM
    發(fā)表于 03-20 16:39 ?52次下載

    PROTEUS仿真開發(fā)軟件應(yīng)用

    內(nèi)容提要PROTEUS簡介PROTEUS ISIS的特點(diǎn)PROTEUS VSM仿真與分析微處理器系統(tǒng)仿真
    發(fā)表于 08-23 10:10 ?254次下載

    基于Proteus的嵌入式應(yīng)用系統(tǒng)仿真中的源碼調(diào)試

    基于Proteus的嵌入式應(yīng)用系統(tǒng)仿真中的源碼調(diào)試 0 引 言    Proteus是功能最強(qiáng)的嵌入式系統(tǒng)(
    發(fā)表于 12-22 17:49 ?2126次閱讀
    基于<b class='flag-5'>Proteus</b>的嵌入式應(yīng)用<b class='flag-5'>系統(tǒng)</b><b class='flag-5'>仿真</b>中的源碼調(diào)試

    (全套)基于PROTEUS電路及單片機(jī)系統(tǒng)設(shè)計與仿真

    PROTEUS簡介 PROTEUS ISIS 原理圖輸入 電路仿真與分析 人性化測量方法 高級電路設(shè)計與仿真 微處理器系統(tǒng)
    發(fā)表于 09-10 10:08 ?125次下載

    Proteus之個單片機(jī)雙機(jī)通信

    Proteus之個單片機(jī)雙機(jī)通信,很好的Proteus了,快來下載不學(xué)習(xí)吧。
    發(fā)表于 04-18 15:34 ?0次下載

    51單片機(jī)雙機(jī)通信,Proteus

    51單片機(jī)雙機(jī)通信,Proteus仿真
    發(fā)表于 12-20 22:39 ?44次下載

    51單片機(jī)雙機(jī)通信,Proteus

    51單片機(jī)雙機(jī)通信,Proteus仿真
    發(fā)表于 12-20 22:39 ?37次下載

    單片機(jī)系統(tǒng)設(shè)計與仿真 基于PROTEUS

    單片機(jī)系統(tǒng)設(shè)計與仿真 基于PROTEUS
    發(fā)表于 11-29 15:42 ?15次下載

    雙機(jī)串行通信的詳細(xì)中文資料概述

    本文檔的主要內(nèi)容介紹的是雙機(jī)串行通信的詳細(xì)中文資料概述主要包括了2個部分:1 編制雙機(jī)串行通信方式1程序,2 Keil編譯調(diào)試和Proteus虛擬仿真
    發(fā)表于 06-20 08:00 ?24次下載
    <b class='flag-5'>雙機(jī)</b>串行通信的詳細(xì)中文資料概述

    基于Proteus的電機(jī)溫度巡檢系統(tǒng)的設(shè)計與仿真

    基于Proteus的電機(jī)溫度巡檢系統(tǒng)的設(shè)計與仿真說明。
    發(fā)表于 05-20 11:09 ?21次下載

    關(guān)于Proteus仿真stm32系統(tǒng)時鐘的問題

    關(guān)于Proteus仿真stm32系統(tǒng)時鐘的問題
    發(fā)表于 11-24 20:06 ?25次下載
    關(guān)于<b class='flag-5'>Proteus</b><b class='flag-5'>仿真</b>stm32<b class='flag-5'>系統(tǒng)</b>時鐘的問題

    基于Proteus的單片機(jī)系統(tǒng)設(shè)計與仿真

    基于Proteus的單片機(jī)系統(tǒng)設(shè)計與仿真的基礎(chǔ)介紹論文
    發(fā)表于 06-15 14:38 ?9次下載