Running StickOS BASIC on DuinoMite-Mega


Image
StickOS is BASIC interpreter which runs on Microchip PIC32 and Freescale MCF52XX microcontrollers. Recently in release 1.92 support for DuinoMite-Mega was implemented so I did a test drive this weekend.

To install StickOS on DuinoMite is very easy, you should go in bootloader mode and start DuinoMite bootloader then to load this HEX: http://www.cpustick.com/downloads/StickOS.PIC32.DuinoMite-Mega.v1.92d.elf.hex and then if you are on WIndows you need this INF file for the USB VID/PID which StickOS uses: http://www.cpustick.com/cpustick.inf

when you program the HEX code and press reset new COM port will be created you can use your terminal program of choice to connect to this port and you will see:

Welcome to StickOS for Microchip PIC32MX7-F512H DuinoMite-Mega v1.92d!
Copyright (c) 2008-2012; all rights reserved.
http://www.cpustick.com
support@cpustick.com
(checksum 0xe2e6)
>

StickOS pre-tokenize BASIC command and do syntax check while you enter your code

This is good as it speeds the execution of the code later also it prevent you to write code with syntax errors.

For instance if you want to write:

>10 non-existing command
^ – error

you will receive this error message and nothing will be stored to line 10

pre-tokenizing the source allow later the interpreter to switch the statements with single byte  comparison instead the multiply byte comparison which MM/DM BASIC does and this allow speed increase, another speed increase feature is that StickOS uses just the real PIC32 peripherials and do not make bit-banging as MM BASIC does, this result it x4 times faster execution:

10 dim a
20 configure timer 1 for 1 s
30 on timer 1 do print a
40 for a = 1 to 200000
50 next

prints 112518 BASIC instructions per second

what I missing in StickOS is:

– no VGA and PS2 keyboard support

– no SD card file system

– print command is very simplified

– not open source, although there is mechanism to add new commands by skeleton source which links the core basic as pre-compiled object code

It’s very easy to go back to MM/DM BASIC by simply entering bootloader mode and re-loading the HEX file for MM/DM BASIC.

If you want to give it try to StickOS BASIC you can first learn the commands by reviewing these PDFs:

Quickstart guide

http://www.cpustick.com/downloads/quickref.v1.90.pdf

and user manual

http://www.cpustick.com/downloads/stickos.v1.90.pdf

3 Comments (+add yours?)

  1. M.O.B.
    Apr 30, 2014 @ 22:58:44

    Could StickOS also run on DuinoMite-Mini? If not, why?

    Reply

    • izum
      May 02, 2014 @ 01:17:57

      Why would it not be possible? DuinoMite-Mini uses the same MCU as DuinoMite-Mega, but you should ask that guys from CPUStick.com, who make StickOS®, to provide an image for DuinoMite-Mini. Their image for DuinoMite-Mega might assume the presence of the additional components on the DuinoMite-Mega board.

      Reply

  2. RemnantMan
    Mar 18, 2016 @ 12:44:46

    “Bricked” my FR-JM-32 StickOS Basic and need a clone operation. CPUStick.com doesn’t have any for sale. Willing to wire a cable and mail unit for re-cloning or purchase a 2nd device. 73’s RemnantMan

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: