DUINOMITE BASIC INSTRUCTIONS PER SECOND SPEED (BIPS)


Image

We got question on Duinomite support forum if small delays of 10 uS could be implemented with Duinomite Basic (DM-BASIC).

Duinomite Basic is interpreted language and it’s relatively slow, I write relatively as for some applications it’s still fast but for other slow. So I was interested how much time DM-BASIC needs to execute one BASIC instruction.

It was easy to implement as DM-BASIC have TIMER which increments every 1 mS, so I wrote this code:

10 TIMER = 0     ‘ clear the TIMER

20 I = I + 1         ‘ do one basic command like adding 1 to I variable

30 IF TIMER < 1000 THEN 20   ‘and execute this command until 1 second pass

40 PRINT “Speed approx.: “;I*3;” BIPS” ‘ print the result

RUN

Speed approx.: 31044 BIPS

BIPS = BASIC instructions per second

In the result we multiply I * 3 as the IF statement is composed by two instructions – the IF and the GOTO which forward the code to line 20

so the one simple BASIC instruction in DM-BASIC takes approximately 32 uS.

32 uS is slow for some processes, but if you want to do something fast you can always include it in the firmware as it’s open source and available for users to modify. this way was added support for the iButtons they require uS timing for communication and was impossible to do this in BASIC, so Gerard Sexton wrote additional BASIC commands which to communicate with MAXIM-DALLAS iBUTTONs.

7 Comments (+add yours?)

  1. olimex
    Jan 12, 2012 @ 11:18:21

    I just asked Don McKenzie from Dontronics to run the test on the different Maximite firmwares as I have no maximite hardware and here is the result:

    V2.7A 30699 BIPS
    V2.7B 30828 BIPS
    V3.0 29415 BIPS
    V3.0A 29289 BIPS

    i.e. about the same as DuinoMite

    Reply

  2. Rob Gray
    Jan 12, 2012 @ 15:50:27

    BIPS, bugger I thought it was Billion Instructions Per Second for a while.

    Reply

  3. iyahdub
    Aug 09, 2012 @ 18:04:59

    lol

    Reply

  4. Trackback: Olimex DuinoMite Mini | Wizard From Oz

Leave a comment