[PIC®/AVR®/dsPIC®产品] 发现一个开发51很给力的软件,开源免费

[复制链接]
 楼主| wanduzi 发表于 2022-6-23 10:57 | 显示全部楼层 |阅读模式

哈哈,比用Keil好用,软件比较小,编译速度快。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| wanduzi 发表于 2022-6-23 10:58 | 显示全部楼层
  1. /**
  2. * Very very simple demonstration code written in C language
  3. * [url=home.php?mod=space&uid=288409]@file[/url] demo_c_0.c
  4. */

  5. // This file defines registers available in AT89x51 MCUs
  6. // See /usr/share/sdcc/include/mcs51/ for alternatives
  7. #include <at89x51.h>

  8. unsigned long some_variable=0;        ///< Documentation for this variable comes here
  9. int i;                                ///< General purpose interator

  10. /**
  11. * These lines are a doxygen documentation for this function
  12. * See doxygen manual for more details (http://www.stack.nl/~dimitri/doxygen/manual.html)
  13. * Note: Try to click on the 1st line of the function declaration and then press Ctrl+E
  14. * <b style="color: #FF0000">Some bold text</b>
  15. * @param somevalue Some agrument
  16. */
  17. void someFunction(unsigned char somevalue)
  18. {
  19.         // P1 and P3 are variables defined in "at89x51.h"
  20.         P1=somevalue;
  21.         P3=somevalue^0xFF;
  22. }

  23. /** Main loop */
  24. int main()
  25. {
  26.         // Infinite loop
  27.         while(1) {
  28.                 for(i=0; i<255; i++) {
  29.                         someFunction(i+2);
  30.                         some_variable++;
  31.                 }
  32.                 some_variable-=22;
  33.         }

  34.         // Report success
  35.         return 0;
  36. }


 楼主| wanduzi 发表于 2022-6-23 11:01 | 显示全部楼层
  1. #include <at89x51.h>
  2. void delay(unsigned int x)
  3. {
  4.         while(x--);
  5. }
  6. void main(void)
  7. {
  8. int i=0;
  9.         while(1)
  10.         {
  11.                 P0=~(1<<i);
  12.                 delay(10000);
  13.                 i++;
  14.                 if(i==8) i=0;
  15.         }
  16. }
烧录使用

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
WoodData 发表于 2022-6-23 17:02 | 显示全部楼层
软件在哪?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

154

主题

1857

帖子

3

粉丝
快速回复 在线客服 返回列表 返回顶部