ºìÁªLinuxÃÅ»§
Linux°ïÖú
µ±Ç°Î»ÖÃ: ºìÁªLinuxÃÅ»§ > Ubuntu

OK.°ÑEasyPro 51 V2.0 µÄ´úÂëÒ»Ö±µ½ ubuntuµÄsdccÉÏ~¿ÉÒÔÔËÐУ¡

·¢²¼Ê±¼ä:2011-06-03 19:46:33À´Ô´:ºìÁª×÷Õß:rgwan
ÏêÇé¿´£ºhttp://www.kmlinux.tk/html/single-chip-controller/761.html
ÒòΪÎÒÓеãʱ¼ä¾ÍÈ¥¿ª·¢51µ¥Æ¬»ú¡£·¢ÏÖÔÚLinux(DebianºÍUbuntuÉÏ)ÎÞ·¨±àÒë51µ¥Æ¬»ú³ÌÐò£¬Ö»ºÃÔÚÍøÉÏÏÂÁ˸öKeil.È»ºó¾ÍÊÇwine·ÂÕæ¡£µ«ÊÇÀϱÀÀ£¡£´úÂëÒ²ÓÐÎÊÌ⡣ȻºóÓָijÉÁËÔÚÐéÄâ»úÀïÅÜ¡£µ«ÊÇ»¹ÊDz»Ë¬£¡ÖªµÀ·¢ÏÖÁËSDCCºó²ÅÖªµÀÁËʲô½Ð·½±ã¡£Ò»Ð©KeilÖеÄÓï·¨ÔÚSDCCÖÐÒª¸üÕý¡£

±ÈÈç˵P0.1¿ÚµÄLED.µãÁÁËûÔÚKeilÖÐÕâôд

view sourceprint?
1 sbit LED=P0^1;

2 void XXXX(void)

3 {

4 LED=1;

5 LED=0;

6 while (1){}

7 }
µ«ÊÇÔÚsdccÖÐȴͨ²»¹ý¡£ÍøÉϲéÁËÏ£¬ÒªÓÃÕâÖÖ·½·¨£º

view sourceprint?
1 __sbit __at 0x80 LED;

2 //»òÕß#define LED P0_1

3 void XXXX(void)

4 {

5 LED=1;

6 LED=0;

7 while (1){}

8 }
Õâ²ÅÊÇÕýÈ·µÄ¡£

»¹ÓÐÔÚsdccÖеÄһЩϸ½Úд·¨,±ÈÈç˵
unsigned char Data;

while (!ReadData()==Data){}

Õâ¾ÍÊÇÓдíµÄ¡£ÒòΪÔÚ sdccÖУ¬ÄãûÓаÑData¶¨Òå³Ésigned char .ËùÒÔËû»á±¨´í£¬ËµÕâ¸ö²»ÊÇÓзûºÅλµÄ¡£

ÔÚsdccµÄд·¨ÊÇ:(ReadData!=Data).
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. dqwit ÓÚ 2011-06-04 10:38:01·¢±í:

    ¶¥

  2. yzs ÓÚ 2011-06-03 20:58:06·¢±í:

    Ö§³Ö