吉林大学通信工程学院通信工程专业2022级CAN总线生产实习
烧录的话,需要手动安装一下pyserial
,而不是serial
,安装命令如下:
pip install pyserial
89C52 的点灯例程,使用 SDCC 编译器进行编译
#include <reg52.h>
#include <stdio.h>
void delay_100ms(void) //@12MHz
{
unsigned char i, j;
i = 195;
j = 138;
do
{
while (--j)
;
} while (--i);
}
void main(void)
{
while (1)
{
P00 = !P00;
delay_100ms();
}
}
默认设置:--iram-size 256 --xram-size 0 --code-size 8192
,对应参数如下:
- IRAM SIZE: 256 Bytes
- XRAM SIZE: 0 Bytes
- FLASH SIZE: 8192 Bytes
要修改上述参数,请到 构建器选项 -> Other Global Options
中进行修改。