Programming An ARM With BASIC

For those of us old enough to remember the beginnings of the microcomputer revolution, we can look back fondly on ‘the programming environment is the OS,’ a ton of BASIC programs, and typing in small programs found in the backs of computer magazines. It’s a whole new world now with cell phones and Linux computers the size of credit cards, but some companies still remember the beginning.

Coridium is releasing an ARM microcontroller in the vein of old fashioned microcomputers updated for the 21st century. Based on the LPC1114 Cortex M0 ARM microcontroller stuffed into a DIP28 package, the Coridium ARM BASIC provides a programming environment in the firmware.

The ARM BASIC is a complete system on a chip, with Rx and Tx connections to connect to a serial terminal. To get this BASIC microcontroller up and running, all you’ll have to do is connect 3.3 Volts of power. Then, it’s a simple matter of plugging in an FTDI cable and pretending it’s 1989.

Coridium is planning on giving away a few hundred of these ARM BASIC chips to makers in a few days. I’ll put up the announcement of free microcontrollers up in a few days, but [Bruce] at Coridium is sending me one very shortly. Hopefully I’ll be able to do a demo before the stock of free chips is completely depleted.

54 thoughts on “Programming An ARM With BASIC

    1. what are you talking about? windows was not main stream until windows 95. up until then almost every single computer used the ‘the programming environment is the OS’ scenario. I for one would love this kind of setup. It is one of the reasons I have not gotten in to microcontrollers. I do not know how to program in modern languages, but I used to program like crazy on my commodore 64/128 in basic. I wish I knew of a microcontroller that I can write code in the same fashion (like basic).

        1. Hello: See if you can find an old Heathkit microprosser trainer. You can program it for the 6800 series micro chip. It won.t be easy, but it can be done. You can also rig up an interface on the included breadboard with the trainer. I found mine at the local DOODWILL store and it works fine!! Bud

      1. Windows became mainstream in the later days of Windows 3.0 (about 1991) and certainly by the time Windows 3.1 was released, in early 1992.

        If you count Visual Basic, then BASIC remained “mainstream” until at least VB6 in 1998, and perhaps later if you still count “Visual Basic.NET” in the early 2000s. Visual Basic 2010 is still available today.

      2. Bit of a late reply, but besides Parallax’s Basic Stamp (PBASIC) you might want to also check out MELABS’ Pic Basic. I believe they have an intro version and their Pic Basic Pro” version for the serious developer. Pic Basic is largely code compatible with PBASIC, can use Microchip’s MPLAB IDE or their own IDE developer, directly compiled not interpreted basic like PBASIC. A knowledgable bunch and they support a large number of Microchips’s 8-bit series of PIC MCU’s. Possibly 16-bit as well, though when I asked last year if they would be supporting 32-bit PIC32 anytime soon, then said “any day now…” still nothing and only downside is they are getting a bit long in the tooth, not many examples and Nothing really new in years.

        They also have a good forum hosted in the UK and a core group of dedicated users. I actually developed a product six years back using the Basic Stamp (i’m and EE hardware type who sucks at C and all the variants) and then ported to PIc Basic Pro.

        I think the guys at Coridium Corp are on to something and looks like they also have somewhat code compatibility with PBASIC. Can’t wait to order a couple!

    2. 1989? I was a latecomer, and didn’t start programming in BASIC until 1972 (timesharing on a PDP-11/20, which did cost slightly more than $10 :-), though if you were doing BASIC retrocomputing in 1989, you at least would have had a CRT and some storage, instead of a model 33 teletype and paper tape.

  1. From the website:

    “With our hardware, and FREE software, users rapidly develop technical solutions–no need to learn a new programming language or a complex development system.”

    If all of the software is on the MCU, and the software is free, and the only hardware on the FN28 i the chip, does this mean that anyone is free to load software onto a bare chip purchased elsewhere?

  2. IMHO the HAD write up is at the very least misleading , this is a chip with a (windows only as far as i see) basic *compiler* which then loads the compiled code into the chip.

    This is NOT a chip with “on board” basic.

    1. Exactly:
      I already have a 32bit chip with ON BOARD BASIC and it has been available for some time. This is no ordinary interpreted BASIC either but a high speed threaded code type. All that is required is a serial connection and a terminal emulator – no need for any software tools or compilers and it is not meant to be nostalgic but a proper working tool giving direct access to all of the IC’s hardware register’s in an interactive fashion. You can knock up a prototype in about 1/10th of the time it would take using conventional methods. And comes with a complete tutorial!!

      1. Awesome! The more the merrier! :D

        I plan on expanding mine by uisng a LCD panel, and making an interface to either a PS2 keyboard, or a second arduino that scans and converts the matrix from a C64 keyboard as input, to make it a standalone device thingy. :D

  3. I suspect this is just like the picaxe, a bootloader is included on the chip to facilitate loading software with a simple programmer.

    You have to get the chips from them.

    I’ll look at one for free but $10 seems a bit steep.

    1. I wonder how this compares to the Picaxe. I love using the Picaxe, but floating point would be nice. Still, the Picaxe has a strong user group and lots of good support in books and articles.

  4. Can I hook up my old cassette to it and load my program or is it the newer style with the 5-1/4 floppy?
    BTW, any market for old Atari 800/800XL machines? I still have some 75 floppy ROMs and a few cartridges laying around….

    1. I second that wholeheartedly. At least that way, those starting out can start off with a language that encompasses both procedural and OO programming methods. From there, they can branch out.

      Which leads me to the question, how hard would it be to bootstrap PyMite on it?

  5. As noted above like the PicAxe, the compiler resides on the PC and there are loader functions as well as other routines called from BASIC in what we call the firmware on the ARM. Those functions include string operatoions, divide, PRINT and others.

    Unlike the PicAxe, the compiler emits ARM hex code that is downloaded, so your BASIC program is compiled, not interpreted.

    Also unlike the PicAxe, floating point routines are also part of the firmware and BASIC.

    Our very first product did have a compiler resident on chip, but as memory footprints have gotten smaller we’ve more the compiler to the PC. Though on the PC it incrementally compiles and does have a bit of a feel of an interpreter for small programs.

    1. Just curious Brucee, why not support Linux and Mac OS X? These two operating systems probably have a much greater penetration in your target market space than in the professional market. Many of your competitors (Basic, C and Arduino) support these platforms. It seems like hobbling yourself unnecessarily.

      1. Why not Linux of Mac–

        We aren’t Linux/Mac-Unix people. But we have ported the compiler and partially the IDE (written in Tcl) to both those platforms.

        There just hasn’t been enough interest to complete the job, and we could use a hand from the community to do that.

      2. Thanks for the reply. I took a look at your site. I don’t see anywhere you are asking to help make it run on other platforms. I guess if you’re making money hand over fist with only Windows developers then great. Otherwise it seems prudent to at least say something to Linux and Mac OS X users. And perhaps to make a command line dev environment available to them as they’re probably pretty familiar with terminal-oriented editors. ;-)

        Please don’t take this as anything other than constructive feedback. I think you have a neat product and I wish you the best in your business. I hope you are wildly successful. I love all the ways people are making embedded design accessible.

        1. The main site may not be the place to post that. We do have a Yahoo Forum and it occasionally comes up there. Or it comes up in a tech support email.

          Our IDE consists of 3 components

          BPP — pre-processor — actually Linux cpp modified for BASIC and ported to the PC (so it runs on Linux, doesn’t link on the Mac)

          ARMbasic — BASIC compiler, this has run on all platforms

          BASICtools — Tcl combination front end to manage the 2 programs above, downloader, and terminal emulator. In the past this has partially run on both Mac and Linux. You wouldn’t really need this if you want to do it all from the command line.

          This is a work in progress, I could post them all as that.

  6. Far out. Sadly my BASIC listings are on floppy disks, and probably lost forever due to the age of the disks, or on hard drives in computers that don’t support my connection to the internet, or media my newer computers use. In any event they would have to be edited to conform to this ARM BASIC.I can see how there are going to be “old timers who are going to love this. I can see old timers who have moved on beyond basic, and those who entered programming using a newer programming language being meh about this product.Having said that, if I miss out on any free offer I probably will spend the 10 bucks.

  7. Anybody remember 8052ah I perchesed the chip over 15 years ago I guess, breadboard it up based on an old radio electronics article followed the digital temp example.I just found the chip, now to find the documents hummm…Anyway this chip has an interpreter basic added,though not native,I wonder if still available? 40 pin chip easy to breadboard.

  8. Just a follow up on the give-away. Some 210 people followed the directions and have been sent a BASICchip. Don’t worry we won’t flood you with emails, but in a month or 2 we’ll ask what you did with it, what you like about it, and what we might improve.

    So what’s shipping out 200+ units look like–

    picture of give away

    All the units were claimed in about 90 minutes, and most people answered their email in a day. Though a couple stragglers went out today.

    1. I got mine day before yesterday!!

      Here in South Australia!

      Thanks guys!

      When I went out to buy a 28 pin socket, I picked up 3 HC-SR04 ultrasonic range finders for $5 each!!

      I’ll get the ARM Basic chip to control the 3 range finders on my Rover 5, process the data, send it back to one of the Arduino’s on my rover.

      8 days between you sending it by mail and me getting it!

  9. Is it only I who thinks this is a terrible idea? Maybe I’ve just gotten a bad impression from Basic Stamp, which contains every error possible (one of the worst PICs, bitbanging I2C to an external flash memory where instructions are intepreted in (well, slowly) real time, some 32B of user RAM, only Windows support and so on,). Well, BASIC is in my opinion inferior to C in all ways so I see this as a complete waste. But, an ARM in DIP is something you don’t see every day. Also, no external components? I would still think you would need capacitors. Well, I think I can find more or less any other ARM with lots of more power and memory for a cheaper price (ST has some really nice circuits). And ST also has a very nice free library which is really easy to use and tons of examples. I’ll think I’ll stick with them, thank you.

    1. Well this is NOT a BASIC stamp. The BASIC is compiled not interpreted. The syntax has a pre-processor, FUNCTION, SUB, interrupts, string and floating point built in.

      The native compiled code runs at 50 MHz from on chip Flash Memory. It has 2K of space available to the user rather than a few hundred bytes, hardware multiply and a 32 bit architecture.

      As for BASIC vs C, the speed and code density compare favorably (within 20% of each other).

      Now BASIC is a great language for people learning to program or those that had some programming course 10-15 years ago. And it’s hard to beat the ready to run out of the box setup.

      1. After messing around with my *free* sample for a couple of days,

        – “Basic” is a relative term, besides not have dynamic variables, records and the other trappings of a 4GL, it’s pretty cool to code in.

        – Built in I2C, SPI and 1 wire is great to have.

        I’ve only tried the I2C so far, a digital compass, SHT11 temperature and humidity sensor and an I2C RAM.

        The software serial seems solid, I was parsing NMEA sentences and displaying them on my Sparkfun serial LCD.

        These guys who post this crap are missing the point!

        There was some dwip on the Arduino forum bitching he couldn’t do multi-tasking and/or multi-threading, on a microcontroller that comes in a 28 pin DIP!!!

        You gotta wonder where their heads are at…

      1. Unfortunately you discovered that all USB to serial devices are not the same. The chip kit device you were using inserts extra characters into the serial stream so it’s not compatible with our software.

        So it would work fine with an FTDI cable, Sparkfun breakout board, PICaxe cable with inverters, or the dongle we offer. Most of which are cheaper.

    1. I received a Chipkit PGM device today, and that is not what you were using to communicate with the BASICchip, as that is a JTAG programmer, not a USB-serial connection.

      As you mentioned a ChipKit Max, I’m assuming you were connecting the BASICchip in parallel with the PIC connection to the FTDI part. I can tell you this will NOT work, as you pretty much are trying to have 2 parts drive the serial line. What you saw looks like some data coming from the PIC and some data coming from our part.

      Obviously this is going to confuse our software which it threw up it’s hands and suggested you need a firmware upgrade.

      Now what you are trying to do might (I repeat might) work if you can hold the PIC in reset and if it tri-states the TXD line.

      But realistically you should be using a device we have tested, which includes the FTDI-TTL serial cable that can be picked up on ebay for $5

        1. What is strange is that it works at all.

          You have 2 CPUs transmitting on the same serial line.

          The PIC is sending —

          *** Uart chipkit 19200 baud
          *** Serial to Usb

          The LPC1114 is sending —

          Welcome to ARMbasic Kernel[8.16] with Floating Point Copyright 2012, Coridium Corp.
          for the BASICchip

          I’m sure if you probe the serial transmit line with a scope you will see the signal is degraded as most of the time one CPU is driving that line low while the other one is trying to drive it high.

          list is not sent on the serial bus, that is handled by the BASICtools program on the PC

          @0 is a very simple command that sends out 2 bytes and gets about 100 back.

          run is quite complex. BASICtools asserts reset with DTR or RTS, then sends an ESC character to stop any user BASIC program from running. It then sends a ? which queries the LPC1114 about vector locations. The LPC1114 sends back 600 or so bytes of vectors to be used by the BASIC compiler. The BASIC compiler on the PC takes those vectors and then generates an Intel hex file that is then downloaded to the LPC1114. In the midst of this the PIC is sending back *** Uart chipkit. In the very least this is going to confuse the BASICtools program that is not expecting extraneous messages.

          So to get it to work by using the FTDI link on the ChipKit Max32 you will have to disable the PIC, and I don’t know whether that is even possible.

Leave a Reply to BudCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.