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.

REMEMBER OLD TIMER GAMES PACMAN AND SPACE INVADERS?

PACMAN and SPACE INVADERS retro games are rewritten in BASIC and available for Duinomite. You can even use the MOD-WII-UEXT-NUNCHUCK to play with them.

Here is the start page of MAXMAN (Pacman) for Duinomite:

Image

and video of the game in action: http://www.youtube.com/watch?v=BaXAY_kdyvA

This is the SPACE INVADERS picture:

Image

and video of the game in action: http://youtu.be/lInXVR_v1pU

WII NUNCHUCK LOW COST GAME CONTROLLER NOW CONNECTS ON UEXT

Image

WII NUNCKUCK is game controller for Nintendo Wii, as it’s produced in large quantities it may be obtained on very attractive price.

Inside the WII NUNCKUCK you have: 3 axes accelerometer, XY Joystick, 2 buttons. All this available through I2C communication so this makes it perfect candidate for UEXT connection.

We offer WII-NUNCKUK with MOD-WII-UEXT connector board set which allow the NUNCHUCK to be accesable by any of our boards with UEXT connector for only EURO 6.95!

As you guess the first boards we used to test the NUNCHUCKs is DuinoMite :)

There are now two games which use MOD-WII-UEXT-NUNCHUCK: Space invaders and Maxman (Pacman).

They both are uploaded on GitHub: https://github.com/OLIMEX/DuinoMite/tree/master/SOFTWARE/GAMES

UNIX ON PIC32 – meet RetroBSD for DuinoMite

Image

Can you run UNIX on PIC32 with onlt 128KB of RAM? Yes absolutely! Serge Vakulenko proves this with his RetroBSD port for PIC32 (MIPS).

The project is hosted at http://retrobsd.org/

Serge did amazing job by porting the old days  2.11BSD Unix used to run on PDP-11 to PIC32 (MIPS). In just 128KB RAM footprint he manage to boot UNIX OS and you have 96KB left for applications.

RetroBSD is multi tasking and you have access to the PIC32 GPIO and ADCs via API, so you can write embedded applications on it!

To make your DuinoMite Unix machine you need:

1. To download RetroBSD compiled image from http://retrobsd.org/wiki/software-2/ the release I check is retrobsd-duinomite-r425.zip

the files inside are UNIX.HEX which contains PIC32 firmware, filesys.img which contains the SD card disk image with the different tools

2. Unpack on your local drive, there are few files you need: Bootloader is same as Olimex DuinoMite bootloader so you may not need it if you have already Olimex bootloader installed

the filesys.img this is the UNIX diskcontent you should write it to SD-card, for Windows users you need Win32 Image writer software, download from https://launchpad.net/win32-image-writer/+download you have to open the filesys.img with Win32DiskImager and to write it to SD card.

3. then you have to put the written SD card in DuinoMite and press reset+button to put DuinoMite in bootloader mode and launch USB Bootloader v2.90a to write Unix.HEX file (the Bootloader in the RetroBSD zip didn’t work for me for some reason)

4. when finished you press reset and Duinomite will boot RetroBSD, if you are under Linux there will be no need for USB CDC drivers as Linux will load them automatically, Ifyou are on Windows you have to point it to DuinoMite CDC Virtual com port drivers.

5. check which virtual com port is created (in linux you can do this in termianl mode by running dmesg | grep tty* command, in windows you can check in device manager which com port is created when you plug in DuinoMite) and run terminal program minicom for linux or hyperterminal for windows

you will see this welcome message on top of this post, login is logically root with empty password

Image

you can see the tools by listing the bin folder:

Image

As you see you got CC compiler, I immediately wrote hello world, but for some reason it fails to compile, I guess I have to RTFM :)))

Image

Anyway I’m amazed how fast this RetroBSD works on PIC32, actually it works faster than the Linux on my 3Ghz machine. I guess because it’s very lightweight and have no so much features as real Linux.

It boots in 2 seconds, CC compiles in 1 second!

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.

iMX233-OLinuXino development started today

Image

The goal is to develop ultra low cost EUR 30 Linux single board computer with these features:

- iMX233 454Mhz ARM9 processor

- 64MB of RAM

- Linux bootable image from SD-CARD

- TV-Video Output

- USB host for Keyboard, camera, WiFi, etc interfacing

- lot of processor ports available on UEXT connector and GPIO connectors same style as DuinoMite.

with two separate optional plug-in modules: iMX-LCD 4.3″ TFT 24 bit color LCD with touchscreen for EUR 30, and iMX-HUB hub board which adds to OLinuXino two USB hosts and Ethernet EUR 15

This board will run Linux, Android, Windows as the BSPs are available on Freescale web.

Additionally we will try to port DuinoMite BASIC to be available as option, on this monster the speed should be around 1 million BASIC instructions per second.

The first hardware prototypes will be available in 2 weeks, and if everything runs smoothly we will have these boards for sale end of April :-)

If there are interested software developers please contact us at http://www.olimex.com in 2 weeks we will have some limited number of hardware prototypes to ship to the interested to participate in the project development.

This will be completely Open Hardware / Open Source Project, all CAD files will be available so everyone can download modify and use them, same will be with the software.

This low cost board goal is to bridge the linux development community and the Duinomite/Arduino/Maple/Pinguino world of developers.

With the UEXT and GPIOs which could interface Zigbee, Bluetooth, RFID readers, relays, switches, sensors this would be highest performance prototyping platform on the market.

Embedded World 2012

I’m back from Embedded World! As always being there was great, you can sense the pulse of the Embedded developments, see the trends and what’s new.

It was 4 days fun! We met with all our important silicon chip vendors and planned many new boards for release which you will see very soon ;)

This year our German distributor Elektronikladen had no booth and we co-exhibited with our Global distributor Mouser Inc. Their booth they built was beautiful:

Image

If you do wonder where Olimex is,  here we are:

Image

Image

Image

These pictures I took early in the morning at 9.00 AM they let the visitors in and it got crowdy.

We chatted with hundreds of young and interesting people who came to our booth:

Image

Image

We had one DuinoMite-Mega running on the booth with Wii-nunchuk and many were interested to see the code themself:

Image

Lucio Di Jasio who wrote the book “Programming 32-bit Microcontrollers in C – Exploring the PIC32″ and who’s idea Geoff Graham used to make Maximite came to our booth also and we talked about DuinoMite.

Then we have been visited by some key PIC32 people in Microchip and they all have been charmed by DuinoMite and Pinguino boards.

1000 PIC32-PINGUINO-MX220 boards were given-away and I hope this will be a nice kickstart for Pinguino project. Lot of students and people who use Arduino  were hear about this promotion and came to get their free Pinguino to test.

I also had some time to look around.

Olimex’s boards were on Texas Instruments 3rd party display:

Image

Image

As this event is huge and you have to catch the crowd attention, some booths had even ‘live’ bears on them:

Image

On ARM booth there was Lego robot which solves Rubic cube in less than 6 seconds:

Image

Being on Mouser booth I had chance to talk to some of the managers and I was amazed to learn about the logistic capabilities they have.

MOUSER stock hundreds of thousands different components, but once you fill your order on their web 15 minutes later the order is ready to load on the FedEx truck.

This is trully amazing (comparing to our Olimex humble shipping possibilities).

I learned that they do consolidated shipments for Europe and clear the import export procedures for their European customers. So if you place your order at their web latest 8.00 PM Texas time, your order is loaded on the last FedEx truck which leave their facility at 8.30 PM. All EU shipments are consolidated in a big container. The container is loaded on the plane and while it flyes the export/import paper work is processing, so it gots unloaded at Fedex facility in France and all small parcels are distributed within Europe shipping from France. So if you live in EU you don’t have to deal with import and customs like if you order from other vendors like Digikey.

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

DuinoMite new boards: T-shaped breadboard adapter, Wii-nunchuk to UEXT and ICSP adapters

Image

DUINOMITE-TBA

Ken Segler again had nice idea for T-shaped breadboard adapter which brings all DuinoMite GPIOs in easy to access form to breadboard + adds +5V/GND bus on top and +3.3V/GND bus on bottom of the breadboard – small and elegant solution for all who want to experiment with DuinoMite / MaxiMite.

This is our first prototype, we will have stock of this board around end of February.

Image

For all retro computer Game lovers there is good news, now there is easy way to connect Wii-nunchuk to DuinoMite! For this purposes two adapters were built:

Image

one is with UEXT connector so connects directly to the DuinoMite UEXT connector, the other is with PIC-ICSP connector layout and could be wired with 6 pin ICSP cable to DuinoMite PIC programming ICSP connector – as DuinoMite uses bootloader for new firmware upgrades the ICSP connector is used just once when the bootloader is programmed then stays with no use, so interfacing the Wii-nunchuk is good use for the ICSP.

Wii-nunchuk offers: X-Y Joystick and 3-Axes accelerometer + 2 Buttons and works with I2C.

In this thread on TBS forum you can download ready to use Wii-nunchuk BASIC code which is tested to work just fine with the UEXT connector, to work with ICSP connector new soft-emulated I2C communication should be implemented in the firmware.

Previous Older Entries

Follow

Get every new post delivered to your Inbox.

Join 509 other followers