1.實(shí)驗(yàn)任務(wù) 如圖13所示,利用AT89S51單片機(jī)的P0端口的P0.0-P0.7連接到一個(gè)共陰數(shù)碼管的a-h(huán)的筆段上,數(shù)碼管的公共端接地。在數(shù)碼管上循環(huán)顯示0-9數(shù)字,時(shí)間間隔0.2秒。2.電路原理圖
樣生產(chǎn)調(diào)制解調(diào)器的聯(lián)發(fā)科可能取代英特爾,向蘋(píng)果公司供貨,同時(shí)據(jù)傳聞,蘋(píng)果正在自行開(kāi)發(fā)調(diào)制解調(diào)器。蘋(píng)果已經(jīng)計(jì)劃最快于2020年淘汰Mac電腦中的英特爾芯片。
一、確定任務(wù)開(kāi)發(fā)單片機(jī)最小系統(tǒng)二、任務(wù)分析:該系統(tǒng)具有的功能:(1)具有2位LED數(shù)碼管顯示功能。(2)具有八路發(fā)光二極管顯示各種流水燈。(3)可以完成各種奏樂(lè),報(bào)警等發(fā)聲音類實(shí)驗(yàn)。(4)具有復(fù)位功
一個(gè)單片機(jī)應(yīng)用系統(tǒng)是由硬件和軟件組成的。系統(tǒng)硬件設(shè)計(jì)包括單片機(jī)CPU的選型、接口電路的設(shè)計(jì)、外圍器件的選擇、試驗(yàn)電路板的設(shè)計(jì)等內(nèi)容?! ≤浖O(shè)計(jì)則包括軟件編寫(xiě)和仿真調(diào)試?! 》抡媸菃纹瑱C(jī)
程序stepper.cstepper.hex/** STEPPER.C* sweePINg stepper's rotor cw and cww 400 steps* Copyright (c) 1999 by W.SirIChote*/#include c:\\mc51\\8051io.h /* include i/o header file */#includ
#include"C8051F040.h"#defineucharunsignedchar#defineuintunsignedintucharxdatavirt_port;bitSPI_BUSY;unsignedcharxdatatab1[16]={0x20,0x20,0x42,0x54,0x20,0x46,0x30,0x34,0x30,0x20,0x56,0x31,0
c8051f005單片機(jī)PWM測(cè)試程序//PWM輸出腳P0.3//-----------------------------------------------------------------------------//Includes//-------------------------------------------------------
c8051f005鍵盤(pán)測(cè)試程序//-----------------------------------------------------------------------------//Includes//---------------------------------------------------------------------------
//-----------------------------------------------------------------------------//Includes//-----------------------------------------------------------------------------#include//SFRdeclar
#include"C8051F040.h"#defineucharunsignedchar#defineuintunsignedintucharxdatavirt_port;bitSPI_BUSY;unsignedcharxdatatab1[8]={0x53,0x31,0x53,0x32,0x53,0x33,0x53,0x34};sbitkey1=P2^0;sbitkey
c8051F040液晶顯示程序#include"c8051F040.h"#defineucharunsignedchar#defineuintunsignedintvoidos_init();voidadc_init();ucharl;ucharh;uinttemp;ucharxdatavirt_port;bitSPI_BUSY;unsignedcharxda
AT89C52超聲波測(cè)距器;測(cè)距范圍7CM-11M,堆棧在4FH以上,20H用于標(biāo)志;顯示緩沖單元在40H-43H,使用內(nèi)存44H、45H、46H用于計(jì)算距離;VOUTEQUP1.0;紅外脈沖輸出端口;;************************************
;*********************************************************************************************;;以下程序能用于24小時(shí)計(jì)時(shí),能作為秒表使用,能定時(shí)鬧鈴1分鐘(也可關(guān)).;使用方法:開(kāi)機(jī)后在00:00:00起
//使用12MHz晶振,P0口輸出段碼,P2口作列掃描,用共陽(yáng)LED數(shù)碼管//#include"reg51.h"codechardis_7[11]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff};/*共陽(yáng)LED段碼表"0""1""2""3""4""5"
繼電器定時(shí)器程序#include//器件配置文件#defineucharunsignedchar//變量類型的宏定義#defineuintunsignedintucharDATA_7SEG[10]={0xfc,0x60,0xda,0xf2,0x66,0xb6,0xbe,0xe0,0xfe,0xf6};/*0~9的數(shù)碼管段