欢迎来到天天文库
浏览记录
ID:15800818
大小:5.38 MB
页数:26页
时间:2018-08-05
《pic单片机c语言教程》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、PICC11.1PICCCCPICCCPCPCPCCCPICCPICMicrochipPICCPICCHitechCCSIARBytecraftHitechPICCPICHitechPICPICC-LitePICPIC16F84PIC16F877PIC16F628FlashPICC-LitePICCPICCHitech-PICCwww.htsoft.comIARwww.iar.comCCSwww.ccsinfo.com/picc.shtmlByteCraftwww.bytecraft.com/mpccaps.htmlHitech-PICCCPIC11.2Hitech-PICCPICCANSIP
2、ICPICPIC2004-4-71of26PDFcreatedwithpdfFactoryProtrialversionwww.pdffactory.comPICPICCC4KC<10%CPIC11.3MPLAB-IDEPICCPICCMPLAB-IDEMPLAB-IDEICE2000ICD2PICCMPLAB-IDEIDEProjectSetLanguageToolLocations…11-111-1MPLAB-IDEHI-TECHPICCToolsuiteExecutableMPLAB-IDEPICCAssemblerCPICCCompilerPICCLinkerPICC.EXELocat
3、ionBrowse…PICCPICC.EXEPICC.EXEC.c.asHI-TECHPICC3.1.3CCC2004-4-72of26PDFcreatedwithpdfFactoryProtrialversionwww.pdffactory.comC11-2C2IC11-2C11.4PICCPICCPICC#includepic.h__CONFIGPICCmain11-1C#include//#include“pc68.h”////__CONFIG(HS&PROTECT&PWRTEN&BOREN&WDTDIS);//voidSetSFR(void);voidClock(void
4、);voidKeyScan(void);voidMeasure(void);voidLCD_Test(void);voidLCD_Disp(unsignedchar);//unsignedcharsecond,minute,hour;bitflag1,flag2;//2004-4-73of26PDFcreatedwithpdfFactoryProtrialversionwww.pdffactory.comvoidmain(void){SetSFR();PORTC=0x00;TMR1H+=TMR1H_CONST;LED1=LED_OFF;LCD_Test();//while(1){asm(“cl
5、rwdt”);//Clock();//KeyScan();//Measure();//SetSFR();//}}11-1C11.5PICC11.5.1PICCPICC11-1bit101PICCcharchar8unsignedchar8short16unsignedshort16int16unsignedint16long32unsignedlong32float24PICCdouble24double24323211-1PICCPICCLittle-endian2004-4-74of26PDFcreatedwithpdfFactoryProtrialversionwww.pdffactor
6、y.com11.5.2PICC11-1bitPICCCunsignedintdata[10];structcommInData{unsignedcharinBuff[8];unsignedchargetPtr,putPtr;};unionint_Byte{unsignedcharc[2];unsignedinti;};11-2C11.5.3PICCbankPICCbankbankbank0unsignedcharbuffer[32];bitflag1,flag2;floatval[8];bank0bankbankbank1unsignedcharbuffer[32];//bank1bank2b
7、itflag1,flag2;//bank2bank3floatval[8];//bank3PICbank128CbankRAMbankError[000]:Can'tfind0x12Cwordsforpsectrbss_1insegmentBANK10x12C300bank1bank1bank1bankbankbankCbankbankbankbankbank2004-4-75of26PDFcre
此文档下载收益归作者所有