Est. 1998 Beginner

BASCOM-AVR

A Windows-based BASIC compiler and IDE for Atmel AVR microcontrollers, designed to make embedded programming accessible to hobbyists and engineers without requiring assembly language expertise.

Created by Mark Alberts (MCS Electronics)

Paradigm Procedural
Typing Static, Weak
First Appeared circa 1997–1998
Latest Version 2.0.8.5 (2025)

BASCOM-AVR is a Windows-based BASIC compiler and integrated development environment (IDE) for Atmel AVR microcontrollers, created by Dutch developer Mark Alberts through his company MCS Electronics. It represents one of the longest-lived commercial embedded BASIC compilers in continuous production, having served hobbyists, educators, and small-scale professional developers for roughly three decades. By shielding users from assembly language complexity while compiling to native machine code, BASCOM-AVR occupies a distinctive niche between high-level languages like C and bare-metal assembly in the embedded development world.

History & Origins

The BASCOM Family and Its 8051 Roots

The story of BASCOM-AVR begins not with AVR microcontrollers, but with the Intel 8051 architecture and the challenges of Windows 3.1-era embedded development. In 1995, Mark Alberts released BASCOM-LT, a BASIC compiler for 8051-family microcontrollers targeting the Windows 3.1 platform. The motivation, as Alberts has described it, was the absence of any tool that was both simple enough for non-specialists and powerful enough for real embedded work.

BASCOM-LT was subsequently rewritten as a 32-bit application for Windows 95, gaining support for arrays and floating-point arithmetic. When Atmel introduced the AVR microcontroller architecture in 1996, Alberts recognized that AVR’s linear memory addressing and in-system self-programming capability offered features architecturally superior to the 8051 for the kinds of projects his users were building. He adapted the BASCOM compiler to target the new platform, producing BASCOM-AVR.

The AVR Architecture Context

The AT90S1200, Atmel’s first commercially released AVR microcontroller, reached market in 1997. BASCOM-AVR’s release is not dated with precision in any publicly available primary source; a release window of approximately 1997–1998 is consistent with the historical record of AVR hardware availability and community usage reports. MCS Electronics’ product documentation states the BASCOM product line was “developed in 1995,” but this refers to the BASCOM-LT predecessor, not the AVR-specific variant.

Name and Identity

The “BASCOM” name in MCS Electronics’ products is unrelated to Microsoft’s DOS-era BASCOM compiler (a GW-BASIC-compatible compiler for MS-DOS). MCS Electronics’ BASCOM is an independent product family developed entirely by Alberts. The product family currently includes two distinct compilers: BASCOM-AVR (for Atmel AVR) and BASCOM-8051 (for 8051-family microcontrollers, also known as BASCOM-51). Each targets its respective architecture but shares common syntax and design philosophy.

Design Philosophy

BASCOM-AVR was designed around a single governing principle: make microcontroller programming accessible without sacrificing the ability to produce real, deployable firmware. The documentation states the goal as providing a tool that “hides much of the complexity for the user — no ASM to deal with, simple statements.”

This philosophy manifests in several concrete design decisions:

  • BASIC syntax: The language uses a QBasic-compatible structured BASIC dialect that millions of personal computer users encountered in the 1980s and 1990s. The shallow learning curve enables developers familiar with desktop BASIC to transfer knowledge directly to embedded targets.
  • Native code compilation: Unlike interpreted BASIC systems, BASCOM-AVR compiles to native AVR machine code. Programs run at hardware speed without a runtime interpreter layer.
  • Hardware abstraction via definition files: Rather than managing multiple device-specific header files (as in C-based toolchains), BASCOM-AVR uses chip definition files that describe the target microcontroller’s peripherals and memory layout. Switching targets requires selecting the appropriate definition file rather than restructuring code.
  • Built-in peripheral support: Common embedded peripherals — LCD displays, I2C bus, 1-Wire protocol, SPI, infrared remote control protocols — are supported through built-in statements rather than requiring external libraries.
  • Integrated toolchain: The IDE includes a simulator, programmer interface, terminal emulator, and the compiler in a single Windows application, reducing the configuration burden that plagues many embedded development environments.

Elektor Magazine characterized the result as BASCOM-AVR providing an ideal programming language for newcomers to microcontroller development, with a short path to working prototypes.

Key Language Features

Data Types

BASCOM-AVR provides a set of fixed-size data types appropriate for 8-bit and limited-resource microcontroller environments:

TypeSizeRange
Bit1 bit0 or 1
Byte8-bit unsigned0 to 255
Integer16-bit signed−32,768 to 32,767
Word16-bit unsigned0 to 65,535
Long32-bit signed−2,147,483,648 to 2,147,483,647
Single32-bit IEEE 754 float~1.5×10⁻⁴⁵ to ~3.4×10³⁸
Double64-bit IEEE 754 floathigher precision
StringVariable lengthup to 254 bytes

Variables must be declared with DIM before use. Variable names may be up to 32 characters long, and arrays are supported with up to 65,535 elements.

Control Structures

BASCOM-AVR supports standard structured programming constructs:

' Conditional branching
If temperature > 100 Then
    Print "Overtemp!"
ElseIf temperature > 80 Then
    Print "Warning"
Else
    Print "Normal"
End If

' Select-Case for multi-way branching
Select Case mode
    Case 0 : Gosub Init
    Case 1 : Gosub Run
    Case 2 : Gosub Stop
    Case Else : Gosub Error
End Select

' Counted loop
For i = 1 To 10
    Print i
Next i

' Conditional loop
Do While running = 1
    Gosub ProcessInput
Loop

' Pre-test loop
While sensorReady = 0
    Waitms 10
Wend

Hardware Peripheral Support

One of BASCOM-AVR’s most distinctive features is its rich set of built-in statements for common embedded peripherals:

' LCD display (HD44780-compatible)
Config Lcd = 16 * 2
Lcd "Hello, World!"

' I2C bus communication
I2cstart
I2cwbyte &H50        ' Write device address
I2cwbyte data
I2cstop

' 1-Wire protocol (Dallas/Maxim sensors)
1wwrite &HCC         ' Skip ROM command
1wwrite &H44         ' Convert temperature

' Software UART for additional serial ports
Open "COM2:9600,8,N,1" For Binary As #2
Print #2, "Hello"

Infrared and Communication Protocols

BASCOM-AVR includes built-in decoders for several consumer infrared remote control protocols, including RC5, RC6, and Sony SIRC — a feature particularly valued in home automation and remote control projects that would require significant hand-coding in C.

Floating-Point Mathematics

Full IEEE 754 single-precision floating-point arithmetic, including trigonometric functions (Sin, Cos, Tan, Atn), is available. Given the limited resources of many AVR targets, floating-point operations are available but have an associated code-size cost that developers must weigh against target memory constraints.

Platform Support

Supported Microcontrollers

BASCOM-AVR supports the traditional AVR microcontroller families manufactured by Atmel (and now Microchip Technology following Atmel’s 2016 acquisition):

  • ATtiny series (small, low-pin-count devices)
  • ATmega series (mid-range, most widely used)
  • ATxmega series (extended feature devices)
  • AT90 series (early AVR devices)

Following Microchip’s introduction of newer processor families using the UPDI (Unified Program and Debug Interface) in approximately 2019 — including the megaX series (mega4808, mega4809), AVR-Dx series, and Xtiny series — MCS Electronics released a separately purchasable add-on to support these parts. The core BASCOM-AVR product targets the traditional AVR families with the legacy PDI/ISP programming interfaces.

Development Environment

The BASCOM-AVR IDE runs on Microsoft Windows. MCS Electronics’ documentation lists compatibility from Windows 95 through Windows 11, reflecting the product’s long development history. No native Linux or macOS version exists. Community members have reported running BASCOM-AVR under Wine on Linux with varying degrees of success; a common workflow is to compile under Windows (or Wine), then transfer the resulting Intel HEX file to a Linux machine for programming the device using avrdude, a widely used open-source AVR programming tool.

No official Docker image for BASCOM-AVR exists, consistent with its Windows-only architecture.

BASCOM-AVR Syntax: A Taste

The following examples illustrate the language’s BASIC-derived syntax in an embedded context:

Variable Declaration and Constants

' Constants
Const MaxTemp = 100
Const DeviceAddr = &H48      ' Hexadecimal literals with & prefix

' Variable declarations
Dim temperature As Integer
Dim sensorData(10) As Byte   ' Array of 10 bytes
Dim message As String * 20   ' Fixed-length string

' Bit variables (single bits, efficient on AVR)
Dim ledState As Bit

Interrupt Handling

' Configure external interrupt
Config Int0 = Rising
On Int0 ButtonPressed
Enable Int0
Enable Interrupts

' Main loop
Do
    ' Main program logic
    Waitms 100
Loop

' Interrupt service routine
ButtonPressed:
    Toggle portb.0       ' Toggle LED on Port B, pin 0
Return

Port and Pin Manipulation

' Direct register access
Config Portb = Output         ' Set entire port as output
Portb = &B11110000            ' Binary literal with & prefix

' Individual pin control
Config Pinb.0 = Input
Config Portb.1 = Output

Set Portb.1                   ' Drive pin high
Reset Portb.1                 ' Drive pin low
Toggle Portb.1                ' Flip pin state

' Read a pin
If Pinb.0 = 1 Then
    Gosub HandleButton
End If

Evolution and Version History

BASCOM-AVR has followed a long-running release cadence under MCS Electronics’ sole stewardship. The compiler moved through a 1.x version series and into the 2.0.x series, with the current release being version 2.0.8.5 (as of late 2025). MCS Electronics distributes detailed changelogs via a history.txt file included with each installation rather than publishing them online, which limits the reconstruction of a precise public version history.

A notable policy distinguishing BASCOM-AVR from many commercial tools is MCS Electronics’ stated commitment to providing free updates to registered owners since the product’s inception. The Update Wizard mechanism for delivering these updates was phased out around version 2.0.8.0 in favor of direct downloads from the product website.

Community and Ecosystem

BASCOM-AVR’s strongest community presence is in Europe, particularly Germany and the Netherlands. The German-language forum at bascomforum.de is the most active dedicated community space. MCS Electronics also maintains official regional forums in Italian and other languages, reflecting international adoption within the European hobbyist electronics ecosystem.

Educational Presence

The compiler has been adopted in formal educational settings. An academic paper published on ResearchGate documents its use in an embedded systems microcontroller course, and Elektor Magazine’s multi-part tutorial series (2008–2009) and accompanying book by Burkhard Kainka have served as standard instructional resources.

Compared to Alternatives

The embedded development landscape has shifted considerably since BASCOM-AVR’s introduction. Free, open-source alternatives now include:

ToolLanguageNotes
avr-gccCFree, widely used, cross-platform
Arduino IDEC++ (subset)Free, large community, hardware abstraction
MicroPythonPythonFree, interpreted, for AVR variants with sufficient memory
Atmel Studio / MPLAB XC/ASMFree IDE from manufacturer

BASCOM-AVR occupies a different position from all of these: it is a commercial product (reportedly approximately $80 USD as of the mid-2020s for the full version, though pricing has varied over time) with a demo version available that supports the ATmega48 and imposes a code-size limit of 4KB. Its continued commercial viability after three decades suggests a loyal user base that values the BASIC syntax, the integrated toolchain’s simplicity, and the depth of built-in peripheral support.

Current Relevance

BASCOM-AVR remains in active commercial development under MCS Electronics. Version 2.0.8.5 was released in 2025, confirming ongoing maintenance. The compiler’s niche — accessible, high-level embedded programming for AVR microcontrollers within a Windows development environment — has become narrower as the Arduino ecosystem and free toolchains have proliferated, but the BASCOM-AVR community retains dedicated practitioners.

For developers who learned BASIC on home computers of the 1980s and 1990s and later moved into embedded electronics, BASCOM-AVR offers a genuinely familiar path into microcontroller programming. The language’s procedural structure, familiar keywords (IF, FOR, PRINT, DIM), and minimal ceremony make it an effective teaching tool for introducing embedded concepts without the syntactic overhead of C.

Why It Matters

BASCOM-AVR represents an important class of programming tool: the domain-specific high-level language designed to democratize access to a specialized hardware platform. In an era before Arduino made microcontroller programming approachable for a mass audience, BASCOM-AVR played that role for AVR-based embedded development in Europe, enabling a generation of hobbyists, students, and small-business engineers to build real firmware without mastering assembly language or the C compilation toolchain.

Its longevity — approximately 28 years of continuous commercial development and sales from a small Dutch company — is itself a testament to the durability of the BASIC idiom and the enduring appeal of tools that prioritize simplicity and accessibility over raw capability. BASCOM-AVR demonstrates that a well-designed, purpose-built tool with a focused community can sustain itself in a market dominated by free and open-source alternatives.

Timeline

1995
MCS Electronics releases BASCOM-LT, a BASIC compiler for the 8051 microcontroller family targeting Windows 3.1 — the direct predecessor to BASCOM-AVR
1996
Atmel develops the AVR microcontroller architecture, featuring linear memory addressing and in-system self-programming — capabilities that attracted Mark Alberts to port BASCOM to the new platform
1997
Atmel releases the AT90S1200, the first commercially available AVR microcontroller, establishing the hardware foundation for BASCOM-AVR
1998
BASCOM-AVR is released by MCS Electronics (Netherlands) as a distinct product targeting Atmel AVR microcontrollers; the exact release date is not publicly documented — circa 1997–1998 is consistent with available evidence
2002
Elektor Magazine publishes a feature article on BASCOM-51 (the 8051 variant), tracing the history of the BASCOM product family and introducing the compiler to a wider European hobbyist audience
2008
Elektor Magazine launches a six-part BASCOM-AVR course series, cementing the compiler's role as a hobbyist and educational standard
2011
Elektor publishes 'Elementary Course BASCOM-AVR' by Burkhard Kainka (ISBN 9781907920110), a dedicated instructional book for the compiler
2016
Microchip Technology acquires Atmel, bringing AVR microcontrollers under Microchip's stewardship; BASCOM-AVR continues development for the expanded product family
2019
Microchip introduces newer AVR families (megaX, AVR-Dx, Xtiny series) using the UPDI programming interface; MCS Electronics releases a separate add-on for BASCOM-AVR to support these processors
2025
BASCOM-AVR version 2.0.8.5 released, confirming active development more than 25 years after the compiler's introduction

Notable Uses & Legacy

Hobbyist Embedded Projects

BASCOM-AVR is widely used in the European hobbyist community for building LCD controllers, frequency counters, infrared remote decoders, I2C analyzers, digital clocks, and robotics platforms — projects where the BASIC syntax enables rapid prototyping without deep assembly language knowledge.

Elektor Magazine Course Projects

Elektor Magazine, a major Dutch-founded electronics publication with wide European circulation, featured BASCOM-AVR in a multi-part course series and dedicated book, establishing it as a standard teaching tool for embedded microcontroller development.

University Embedded Systems Courses

An academic paper documented on ResearchGate ('Embedded System Microcontroller Interactive Course using BASCOM-AVR') confirms BASCOM-AVR's use in formal higher education, demonstrating its adoption as a pedagogical tool for teaching microcontroller fundamentals.

BiPOM Electronics Commercial Distribution

BiPOM Electronics is a documented commercial distributor of BASCOM-AVR licenses and supplementary libraries, indicating the compiler's presence in small-scale professional embedded development environments, particularly in industrial automation and sensor interfacing.

Language Influence

Influenced By

BASIC QBasic GW-BASIC

Running Today

Run examples using the official Docker image:

docker pull
Last updated: