xxkj2010
发表于 2024-1-8 12:04:45
kksk 发表于 2024-1-8 10:52
https://www.pjrc.com/tech/8051/contrib/tb51/index.html
这有一个basic的解释器
即使有了BASIC 解释器支持,但是可以实现的功能,估计不多吧。
用单片机我一直都用C语言,需要一些软件工具什么的,就用VB。
jmg
发表于 2024-1-8 12:21:04
本帖最后由 jmg 于 2024-1-9 06:27 编辑
xxkj2010 published on 2024-1-8 11:50
I don't understand English. It is estimated that BASIC cannot be applied to microcontrollers, and there is very little relevant information.
Google Chrome has a translate function.
Google Chrome has a translation function
hackaday.io has a Jan 2023 project: 8052ah basic single board computer, that runs BASIC52 on a FPGA & has links to the 1.31 source code.
Addit: dos4ever site has 8031board, that includes an extension to BASIC51 v1.31, addingI2C command extensions designed by H.-J. Böhling.
The features in the original BASIC52 were very constrained by the 8K code limit of the intel 8752 parts.
success
发表于 2024-1-8 13:40:52
非常感谢大家对BASIC编程的热心,我竟然尝试成功了......
success
发表于 2024-1-8 13:45:16
一个简单的点灯灭灯程序
success
发表于 2024-1-8 13:52:00
本帖最后由 success 于 2024-1-8 13:55 编辑
非常感谢大家对BASIC编程如此热心!
xxkj2010
发表于 2024-1-8 15:49:47
本帖最后由 xxkj2010 于 2024-1-8 15:59 编辑
success 发表于 2024-1-8 13:45
一个简单的点灯灭灯程序
看起来有点像VB,我以前曾做过一个24c并口读写器,上位机用VB程序编写,也需要把C转变B
jmg
发表于 2024-1-8 16:06:43
本帖最后由 jmg 于 2024-1-8 16:10 编辑
success Published on 2024-1-8 13:45
A simple program to turn on and off lights
Which version of BASIC did you test here?
I think that is BASCOM51, a commercial (e110) BASIC compiler, not an interpreter ?
杨为民
发表于 2024-1-8 16:29:18
success 发表于 2024-1-2 19:17
噢,BASIC是可以的,可以一起学习和交流一下。
请问什么软件可以实现用BASIC语言编程,然后生成可以在8051单片机上运行的代码?
jmg
发表于 2024-1-8 16:46:11
本帖最后由 jmg 于 2024-1-8 16:50 编辑
杨为民 发表于 2024-1-8 16:29
请问什么软件可以实现用BASIC语言编程,然后生成可以在8051单片机上运行的代码? ...
There are two broad types :
Compilers : that operate very like C compilers - source code is parsed and converted into HEX on a PC, and the HEX is downloaded to the 8051.
Search BASCOM-8051, for a commercial compiler example.
Drawbacks: no floats, and not great at supporting 1T 8051 parts
Not BASIC, but another readable compiler is Turbo51, based on Turbo Pascal. Free download.
Interpreters: These operate like Python, also an interpreted language. The first PC languages were BASICs, and intel released a ROM BASIC52 back in 1980's.
Here, a BASIC engine is programmed into the 8051 Flash once, and then ASCII source is sent to RAM/EEPROM, and it can be listed and run.
One limitation is the RAM size of the host 8051.
杨为民
发表于 2024-1-8 23:18:13
jmg 发表于 2024-1-8 16:46
There are two broad types :
Compilers : that operate very like C compilers - source code is parsed...
谢谢