bawgijfd 2008-8-1 08:40
邮箱资料更新内容:博创2410教学实验箱光盘,友善2410光盘,阳初2440光盘资料
*** 作者被禁止或删除 内容自动屏蔽 ***
Jnny_CN 2008-8-1 12:46
感谢楼主无私分享。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
laoyouji007 2008-8-5 22:43
非常感谢!!!!:lol
laoyouji007 2008-8-9 09:17
:victory: :lol :victory: 还是要顶啊,呵呵!!!
chinajszcw 2008-9-5 08:09
很好的资料,谢谢楼主
jtdd48 2008-9-21 19:54
机战私服和官方的对比
*** 作者被禁止或删除 内容自动屏蔽 ***
luke007007 2008-9-22 09:26
ding[img=20,20]http://www.eetop.cn/bbs/images/smilies/default/lol.gif[/img]
zhaobolove 2008-9-22 10:45
#include <reg51.h>
#include <INTRINS.H>
#include <STDIO.H>
// 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: %04Xh\n", adc_Res); //以16进制数字形式输出
// simple delay - it is mcu clock dependent !
for (delay=0; delay<10000; delay++)
;
}
}
laoyouji007 2008-10-2 23:50
万分感谢楼主的无私精神!!!!
ytqiqiang 2008-10-23 15:24
fdfdfdf
ffffffffffffffffffffffffffffffffffffff