资源简介
可以仿真电子电路,模拟实验
代码片段和文件信息
/********************************************************************/
/********************************************************************/
/***** *****/
/***** L A B C E N T E R E L E C T R O N I C S *****/
/***** *****/
/***** LABCENTER INTEGRATED SIMULATION ARCHITECTURE *****/
/***** *****/
/***** Test program for AD1674 and 80C51 *****/
/***** *****/
/********************************************************************/
/********************************************************************/
#include
#include
#include
// define P1.0 to check STATUS.
sbit STATUS = P1^0;
unsigned char xdata CTRL _at_ 0x2FFF;
unsigned char xdata ADSEL _at_ 0x4FFF;
unsigned char hByte;
unsigned char lByte;
void adc_Convert (void)
{ // Start a conversion with A0 and A/$C$ low.
// The convesion takes place on rising CE edge.
CTRL = 0x00;
ADSEL = 0x00;
// Wait until we have completed a conversion .
while(STATUS==1);
// Set R/$C$ with A0 low and read the low byte.
CTRL = 0x02;
hByte = ADSEL;
// Set R/$C$ with A0 high and read the high.
CTRL = 0x03;
lByte = ADSEL;
}
void main(void)
{ unsigned int delay MSB LSB adc_Res;
// Initialize serial interface
SCON = 0xDA; // SCON: mode 1 8-bit UART enable rcvr */
TMOD |= 0x20; // TMOD: timer 1 mode 2 8-bit reload */
TH1 = 0xFD; // TH1: reload value for 1200 baud @ 12MHz */
TR1 = 1; // TR1: timer 1 run */
TI = 1; // TI: set TI to send first char of UART */
while(1)
{ adc_Convert();
MSB=(unsigned int)(hByte << 4);
LSB=(unsigned int)(lByte >> 4);
// adc_Res now has the converted data with 12-bit resolution.
adc_Res = MSB + LSB;
// Send adc results to the serial interface
printf(“ADC READINGS: %03Xh\n“ adc_Res);
// simple delay - it is mcu clock dependent !
for (delay=0; delay<10000; delay++)
;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-02-25 11:01 Proteus 7 Professional\
目录 0 2018-02-25 11:01 Proteus 7 Professional\BIN\
文件 223772 2011-01-25 12:37 Proteus 7 Professional\BIN\ARES.DLL
文件 2000924 2011-06-05 23:25 Proteus 7 Professional\BIN\ARES.EXE
文件 175569 2011-01-07 12:47 Proteus 7 Professional\BIN\DIYSTAMP.EXE
文件 663552 2011-01-07 12:47 Proteus 7 Professional\BIN\DSIM.DLL
文件 1268 2011-01-07 12:47 Proteus 7 Professional\BIN\DXDVC.DXF
文件 122908 2011-01-07 12:47 Proteus 7 Professional\BIN\DXFCVT.DLL
文件 507904 2011-01-07 12:47 Proteus 7 Professional\BIN\EASYHDL.DLL
文件 3014656 2011-01-07 12:47 Proteus 7 Professional\BIN\ELECTRA.DLL
文件 1645320 2011-01-07 12:47 Proteus 7 Professional\BIN\GDIPLUS.DLL
文件 57344 2011-01-07 12:47 Proteus 7 Professional\BIN\GDIWRAP.DLL
文件 788 2011-01-07 12:47 Proteus 7 Professional\BIN\GERBIT.CNT
文件 466944 2011-01-07 12:47 Proteus 7 Professional\BIN\GERBIT.EXE
文件 472711 2011-01-07 12:47 Proteus 7 Professional\BIN\GERBIT.HLP
文件 74780 2011-01-07 12:47 Proteus 7 Professional\BIN\GETMDF.EXE
文件 75804 2011-01-07 12:47 Proteus 7 Professional\BIN\GETSPICE.EXE
文件 118784 2011-01-07 12:47 Proteus 7 Professional\BIN\GPC.DLL
文件 3100 2011-01-07 12:47 Proteus 7 Professional\BIN\HOOKDLL.DLL
文件 344064 2011-01-07 12:47 Proteus 7 Professional\BIN\HTMLVIEW.EXE
文件 45056 2011-01-07 12:47 Proteus 7 Professional\BIN\IFLIST.EXE
文件 289308 2011-01-25 12:40 Proteus 7 Professional\BIN\ISIS.DLL
文件 2799132 2011-06-06 19:34 Proteus 7 Professional\BIN\ISIS.EXE
文件 51810 2011-01-07 12:47 Proteus 7 Professional\BIN\LIBMAN.HLP
文件 405504 2011-06-05 19:59 Proteus 7 Professional\BIN\LICENCE.DLL
文件 183568 2011-01-07 12:47 Proteus 7 Professional\BIN\LICENCE.EXE
文件 204828 2011-01-24 16:12 Proteus 7 Professional\BIN\LOADERS.DLL
文件 42012 2011-01-07 12:47 Proteus 7 Professional\BIN\MSGFMT.DLL
文件 41984 2011-01-07 12:47 Proteus 7 Professional\BIN\OBJITF.DLL
文件 781824 2011-01-07 12:47 Proteus 7 Professional\BIN\PDFBOX.DLL
文件 983040 2011-06-05 06:43 Proteus 7 Professional\BIN\PROSPICE.DLL
............此处省略3794个文件信息
评论
共有 条评论