Shop OBEX P1 Docs P2 Docs Learn Events
BASIC for the micro:bit — Parallax Forums

BASIC for the micro:bit

bruceebrucee Posts: 242
edited 2026-05-05 11:48 in micro:bit

While I write C or Tcl, when I want to build a widget on a small board I still like BASIC. It has a good mix of simplicity and built in features to take advantage of wiggling the pins.

Our BASIC is now running on the V2 micro:bit

through the same path Microsoft MakeCode uses. No external dongles. No special drivers. No SDK install.

  • 64 MHz Cortex-M4F with full hardware floating point — your math runs fast
  • Programs up to 320 KB in flash — we've already shipped a 206 KB user program with room to spare
  • 96 KB of variable space — 24,576 variables ready to go
  • Sub-millisecond timing with native SysTick, plus full 12-bit ADC for analog reads

    Instant interactivity

  • Ctrl-C interrupts a running program — one keystroke, clean prompt, no rituals

  • Auto-run on power-up — your program is in flash and running before the welcome banner finishes
  • Direct register access from BASIC — GPIO_P0_OUTSET= 1<<21 turns on an LED

    The full peripheral palette

    Drive the 5×5 LED matrix with pure BASIC. Read the edge-connector ADC with ad(1). Toggle GPIOs P0 and P1 with out()
    and in(). Time things with microsecond precision. Sort with the built-in quicksort or roll your own — both fly.
    Built-in NRF52833.bas peripheral library exposes every register at every address, ready to embed.

  • Boots from cold in 3 seconds and runs the user program

  • Bare-metal — no RTOS, no libc bloat

Comments

  • MicksterMickster Posts: 2,921

    Brilliantly Advanced Symbolic Instruction Code

    It's not going away. None of that Python library nonsense B)

    More info?

  • bruceebrucee Posts: 242
    edited 2026-05-05 13:41

    Lots of info on BASIC itself at https://coridium.us/coridium/helpfiles/basictools

    The help manual is at https://coridium.us/files/armbasic/

    I don't see any reason for us to draw pictures of the micro:bit and add them to the manual

    The setupBASIC.exe will be built later this week, which will include nRF52833 files (the register definitions)

    I have V2.00 boards which require a firmware upgrade to 0258 (beta), as the earlier versions did not pass UART_RX from the nRF52833

    The BASIC does have an emulator that runs on a PC, you can download and install it to give it a whirl https://coridium.us/coridium/files/setupBASIC.exe

  • PS the microbit:bit will function a lot like the ARMstamp for reference as it is also programmed over a USB

    We will also have to provide a link to the BASIC.hex file to load onto the micro:bit which has the BASIC runtime support, the compiler live on the PC

  • Oh it's a compiler. Have you checked out our FlexBASIC for the Props? Even the P1 has eight processors @80MHz.

Sign In or Register to comment.