IchigoJam – Single ARM chip PC with Video and Keyboard support

PC

Everyone who has made their first steps with Apple ][, BBC micro, or Commodore 64 remembers the BASIC language, which nowadays is used by almost no one.

A few days ago, I was directed to an interesting project named IchigoJam BASIC. It was made in Japan and it was about creating a small computer with a BASIC interpreter, made on single LPC1114 Cortex-M0 ARM controller from NXP with only 32KB of Flash and 4KB of RAM.

Ichigo means Strawberry, so this keeps the tradition PCs to be named on fruits.

Although it is built on tiny resources, IchigoJam BASIC has quite an impressive list of commands including I2C read and write!

The schematic is quite simple.

The composite video generation is made via a couple of resistors, and the keyboard is connected with a simple USB-A connector, so with just a few components you have a small personal computer!

And this is not everything, the same hardware has firmware for Javascript called IchigoLatte , for Ruby called IchigoRuby, for IchigoFORTH and here.

On top of this, if you want to try IchigoBASIC you can do it on the web. How cool is that?

Needless to say, I wanted to try this project. I choose our LPC-H1114 board as it has almost everything already pre-soldered.

I had to connect:

for power supply:

LPC-H1114.pin50 – to GND
LPC-H1114.pin49 – PWR to +5V DC

for firmware update:

LPC-H1114.pin46 – to USB-Serial Tx
LPC-H1114.pin47 – to USB-Serial Rx
LPC-H1114.pin4  – to GND

for Videop output

LPC-H1114.pin27 – 470 ohm to video connector
LPC-H1114.pin28 – 100 ohm to video connector

for USB keyboard connector:

LPC-H1114.pin23 – DP
LPC-H1114.pin14 – DM

You can update the firmware using the instructions here.

If you did everything correctly when you apply the power supply you will see on the monitor the text “IchigoJam BASIC 1.4.2 by jig.jp”:

IchigoJam

Then you can use the keyboard to write your program!

You can repeat the project with quick dirty wire connections like I did:

LPC

What you need is a LPC-H1114, a Video RCA jack, a USB connector for the keyboard, a small monitor, a keyboard, and some jumper wires.

This project would be a very good fit for some next Soldering workshop as it has few components but it completes a fully functional BASIC/Ruby/JavaScript/Forth computer.

With the current state of COVID-19 probably TuxCon would be postponed for the Autumn, so there is plenty of time to make a small PCB for soldering 🙂

IchigoBASIC has a button, an LED, plays music on a buzzer and you have access to 4 Digital Inputs and 6 Digital outputs and I2C interface connector.

Too bad most of the educational stuff is in Japanese and needs translation.

 

Duinomite MINI, MEGA and eMEGA back in stock

DuinoMite-Mega

Duinomite-MINI, MEGA, eMEGA boards were made specially to run BASIC on PIC32 processors, but are well packed with features boards, so people were using them not only with BASIC interpreter but also programming them in C.

There were not high runners, so at one point we were selling just few per month and when the blank boards were out of stock we had hesitated if to run them again or not, with the time lot of people signed for notification when back in stock so we decided to run small batch of all these three and re-stock.

Now we got them back in stock.

MPIDE Arduino like IDE for PIC32-Pinguino and Duinomite boards

Image

With this tutorial video below we will show you how to setup MPIDE Arduino like IDE to work with PIC32-PINGUINO, PIC32-PINGUINO-OTG, PIC32-PINGUINO-MICRO, DUINOMITE, DUINOMITE-MINI, DUINOMITE-MEGA, DUINOMITE-eMEGA.

Here is video tutorial how to install MPIDE and add support for Pinguino and Duinomite boards:

MPIDE installation is also described in our Wiki

Why to use MPIDE?

It’s an alternative to Pinguino IDE and Duinomite Basic. You have one more option to use these boards.

Pinguino IDE  ( pinguino.cc ) was made as parallel project to Arduino but for PIC microcontrollers, instead of Java it uses Python for the IDE, with the latest Oracle – Google lawsuit we still wonder if Java was the best choice for Arduino IDE, but nevertheless Arduino was made earlier and managed to attract huge community. Pinguino community is still small and the demo codes for Pinguino are not so many as for Arduino.

Microchip and Digilent financed the release of MPIDE which is pure Arduino IDE fork and thus more familiar for the Arduino community to use. As MPIDE already have good PIC32 support it was very easy to add support for PIC32-Pinguino and Duinomite there.

Why to use MPIDE and C for Duinomite?

Duinomite boards are low cost but powerful boards initially made specially for project named Maximite.
Two years ago we found interesting project which makes Basic computer with just PIC32 processor.
I started with Apple ][ so it was very nostalgic to see BASIC computer made with embedded processor and to control GPIOs and resources in BASIC.

At that time Maximite was advertised as “open source” project, i.e. firmware sources were available for download. The hardware schematic also was present in JPEG format.

As hardware engineers we immediately spotted some weakness in the Maximite hardware design – the author being mostly software engineer omitted lot of hardware features PIC32 have.

While PIC32 have ultra low power modes, hardware SPI, I2C, UARTs, parallel interfaces which could work with MHz clock speed, for some weird reason the Maximite author decided to implement them by bit-banging purely in software – cripple-ing these interfaces to very low speeds only. Low power modes were not implemented at all.

So we decided to improve the hardware – this is how we made our board with low power design, hardware UARTs and SPIs, UEXT and Arduino connectors so Arduino shields like Gameduino etc could be placed on top of the board and so on.

We completed our hardware design and we proudly offered the Maximite author to check it and tell us his opinion … but he told us that he is not interested and demanded us to choose different name than Maximite. It was a quite surprising open source project author to refuse contribution. So we named our board Duinomite (Maximite is also explosive so we wanted to show where our board roots are).

Being mostly Hardware company we couldn’t implement the software our self, so we contacted Ken Seggler who at this time made port of Maximite for ChipKit board with same PIC32 processor. He was unemployed at that time and he accepted to make the port and even to implement our new ideas we had about low power sleep modes, the new hardware UART and SPI, SETUP command for general board setup, Gameduino commands, we discussed on public forum how to implement editor inside the BASIC and label-less commands etc.

Unfortunately this move really pissed off the Maximite author. He saw the Maximite BASIC port to our board as direct competition as now our hardware had more features than his own.

He closed the Maximite Basic source, then wrote one nasty page about Duinomite on his web presenting him as victim of the big bad company who steal his work and removed his name out of it.
From day one Duinomite Basic fork is on GitHub and anyone can check how true these blames are – Maximite author’s name have been always on our Duinomite Basic fork and display on startup . We had to fork his BASIC just because he refused to support our hardware.

Meantime Ken found full time job and couldn’t contribute to the project anymore, the Maximite author released new version of Maixmite Basic with label-less commands, build-in editor and his new Maximite hardware has … Arduino connectors  (surprise surprise 🙂 ), so after all he has listened to us and took our contributions silently back !

Duinomite software left at that stage as no one was interested to duplicate Maximite Basic work and to run in parallel two same language implementations. The Maximite author had one problem though – while Duinomite quality build hardware cost just EUR 20 the Maximite less capable hardware in kit form cost was something like x3 times more and obviously people were buying Duinomite hardware, so to increase his followers he made Duinomite support and offered HEX compiled version of his Maximite BASIC for Duinomite – actually doing what we originally asked him for to do!

As far for the Duinomite BASIC fork – none of the younger and capable developers is interested in BASIC. Most of Maximite / Duinomite BASIC users are 40+ years and just users but not contributors / developers, so Duinomite BASIC development is pretty much dead.

Although Duinomite boards are still high seller, I guess 99% of people buy them and use them as regular PIC32 development board and use C instead of Basic judging from the tech supports questions we get.

Now with MPIDE Arduino like IDE people who are familiar with Arduino can develop on Duinomite too.

Weekend Programming Challenge Issue-18 – Console Text Editor

Image

Problem: create simple text editor for VT100 terminal

Many of us remember Borland’s Turbo Pascal V3.0 which in 39K had compiler, linker, run-time library and minimal WordStar type text editor.

BAS-INT is freeware tiny Basic interpreter with the bare minimum for BASIC scripting language. It works with external files only and is with Basic Stamp like syntax.

The Challenge today is to write minimal console editor which to complement BAS-INT and to perform some very basic commands:

List – list the program in memory with numbers
Delete N(-M) – deletes line N or N to M from memory
Insert N – inserts line on number N
Run – runs the BASIC program in memory (this code is already available)

if one wants to make it even more advanced he may make also the
Edit N – prints the content of line N and allow it to be edited

Remember this is console application and you have just serial in and serial out, no fancy graphics and windows in this editor.

The BAS-INT template is uploaded on GitHub https://github.com/OLIMEX/WPC/tree/master/ISSUE-18/BAS-INT

The rules:

You can code the solution in any programming language (well obviously as you have to integrate BAS-INT which is written in C this any language for this problem must be C) during the weekend and have to submit it to info@olimex.com latest on Sunday July 21th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

DuinoMite is now on GitHub

DuinoMite software development was suffering from missing version control since we started it. There are 4 developers who contributed to the project but there was quite lack of coordination as we put all stuff on Ken’s shoulders.

Ken’s release from February 16th, 2012 was with few minor bugs on the UART configurations, but being busy he had no time to fix these. This weekend I had some free time after we finish the iMX233-OLinuXino design and took a look at the sources and fixed few port definition and UART initialization mistakes.

Now the source is on GitHub https://github.com/OLIMEX/DuinoMite

I put there also the latest Hardware CAD files and from now on the latest revisions will be there.

DuinoMite DM-BASIC now have CAN support

Good News! Frank Voorburg implemented CAN support BASIC commands for DuinoMite http://www.kenseglerdesigns.com/cms/forums/viewtopic.php?f=4&t=259

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

Previous Older Entries