Basic language micro controller.

djsfantasi

Joined Apr 11, 2010
9,237
To give you a full answer we need more information. Function of microcontroller (what are you using it for), Power requirements, microcontroller memory requirements, GPIO, GPIO voltage requirements, number of GPIO, ADC, PWM pins, etc…

Having said that you simply asked if there were any microcontrollers you could program in BASIC. The answer to your question is Yes.

Parallax Basic Stamp 2 microcontroller.
 

Thread Starter

ulms

Joined Mar 19, 2024
179
I'd like to read input from a few sensors and switches. Maybe write 50 to 100 lines of logic/code and drive relays to turn on/off motors or lights.
 

djsfantasi

Joined Apr 11, 2010
9,237
I haven’t found a microcontroller that can be programmed in BASIC other than the Parallax Basic Stamp 2sx. That’s not saying there isn’t one. I haven’t programmed a Stamp since the first release. And no one else is responding. So I suggest you google and get a reference for the 2sx.
 

sagor

Joined Mar 10, 2019
1,046
You can get Basic compilers for PIC and AVR processors. I use Oshonsoft Basic for simple PIC processors. There are others like GreatCow Basic (free and can do AVR chips) and Swordfish.
For Arduino, most work is done with the Arduino development suite (C+ type of language).
 

0ri0n

Joined Jan 7, 2025
161
There are BASIC compilers for many uC families like AVR, PIC, PIC23, PIC32, dsPIC, 8051, ARM etc. out there. Choice is yours. If you rather meant a OS with a BASIC interpreter running on a controller then something like PicoMite (Pi Pico) or MicroMite (PIC32MX). Programs are written/changed in a terminal window, are saved directly on the target and are running forever as long as power is supplied.

https://geoffg.net/picomite.html
https://geoffg.net/micromite.html
 

boostbuck

Joined Oct 5, 2017
1,034
I've written a few programs for Microchip PICs in Great Cow Basic. It writes assembler that can be run and debugged effectively on the Microchip development tools.
 

Jon Chandler

Joined Jun 12, 2008
1,560
Swordfish Basic for PIC18F chips is highly recommended by yours truly. It is a fast compiled language, similar to VB6. It's got support for the latest PIC18F devices and many modules are available to support various functions.

The "special edition" is a trial version with very generous limits and no expiration to the point where many users never upgrade to the paid version.
 

MisterBill2

Joined Jan 23, 2018
27,186
OK, there you have the answer, which is to use a compiler!! The problem with "the original Basic" was explained to me many years ago, which is that it is an interpreted language, meaning that the resident operating system needs to examine each command and tell the CPU what to do. THAT TAKES A LOT OF TIME. So a compiler/assembler/linker working from your BASIC listing should be able to produce machine usable instruction files.
 

nsaspook

Joined Aug 27, 2009
16,251
I would only suggest the OP move from BASIC to another language for the actual coding of a programming task if the OP is a beginner at programming.

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." -- Edsger W. Dijkstra

It's not that BASIC is a bad language but it's sold as "easy" so beginners skip the important step of learning structured programming methods first before jumping directly into 'coding', using disjoint and buggy programming ideas without proper structure because of that lack of exposure to structured programming.

https://dl.acm.org/doi/pdf/10.1145/953032.804608
Structured programming using BASIC

Learn programming as a skill first and coding in a specific language, next.
 
Last edited by a moderator:

nsaspook

Joined Aug 27, 2009
16,251
"Mutilated" - No. It is unfair to say that BASIC ruined good programming. It IS fair to say that AI will.

ak
No, BASIC didn't ruin good programming, it ruined potential good programmers until they could be reprogrammed on how to write structured programs in BASIC.

AI will only ruin the lazy, the unskilled and the untalented. Those with engineering minds will use AI (when it is finally created, the crap we have today is not AI) to build better things.
 

MrChips

Joined Oct 2, 2009
34,628
My introduction to HLL programming began with Fortran and then BASIC in the 1970s.

One of my projects then was to implement an automated sample changer system for nuclear irradiation in a nuclear reactor. The only computer available at the time was a DG Nova minicomputer running BASIC. This proved to be a nightmare having no knowledge of structured programming techniques.

Then I discovered Algol which allowed me to implement proper structured programming structures. This led to Pascal which was the game changer for me.

I did a lot of programming in VB for its ease of GUI development. All my projects today involve Pascal, C, MATLAB or Java.
BASIC is no more.
 
Top