1.指令#include"reg51.h"與#include<reg51.h>有什么區(qū)別。
2.定時初值的計算,今天看書上寫得: T=12*(T_ALL-A)/fosc A=T_ALL-T*fosc/12 A=-T*fosc/12 請問第二步是如何變到第三步的。
3.串行口傳送數(shù)據(jù)時用到奇偶位效驗中的P是什么?程序如下: #include"reg51.h" #include"string.h" char s[]="mcs-51"; /*將字符串mcs-51傳送 char bdata c; sbit c7=c^7; main() { char a,b=0; tmod=ox20; scon=ox50; TH1=OXF4; TL1=OXF4; a=strlen(s); for(;b<a;b++) { c=s; acc=c; c7=p; SUBF=C; } } |