PIC32MX220D Code Generator Project

PIC32

Few days ago Antonio Leite sent me this e-mail:

Dear Mr. Tsvetan Usunov

A few weeks ago I purchased a board PIC32-Pinguino-MX220 and started working on it.

As I was new to PICs 32 microcontrollers, I started searching code and samples on the internet, besides reading the user manual and the library pdf to have the minimum code to make a led to blink and understand how this pic32 family works.

I started thinking that lots of people must overtake the same boring tasks before having the board fully functional.

Then I started writing an application that generates code automatically for me and my colleagues. The application was a success and everybody started saying that Olimex should be interested in this application.

I am sending a pdf that I would like Mr Usunov to have a view and see if this kind of application has some interest for Olimex.

I am attaching a project so that it can be open on the MPLABX environment. The files .c and .h generated by the application are ADCDrv, CoreTimerDrv, GPIODrv, PWMDrv, UARTDrv and configurator.xml.

To connect the board to the computer I used a USB-Serial-Cable-F

Best regards

Project files are available here.

Project description is here.

On this video you can see how it works:

 

 

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.

New Product in Stock: Bluetooth 4.0 BLE module

Image

MOD-nRF8001 is a low cost EUR 9.95 Bluetooth low energy module (Bluetooth 4.0) which works with Arduino, Pinguino, Maple boards. Demo examples for these three platforms have been tested.

BLE is interesting for iPhone developers since BLE is not subject to a bogus license from Apple as normal Bluetooth, this means you can connect devices to iPhone via BLE without the need to be “approved” by Apple. Other phones and tablets with Bluetooth 4.0 also can work with MOD-nRF8001. This makes interfacing to sensors and physical computing possible at low cost. MOD-nRF8001 has a range of up to 50-60 meters when no obstacles and walls are present.

MOD-nRF8001 is made for easy integration to existing PCBs and can be soldered on the PCB using the cut-through pads, those who want to work with breadboards can solder 2 x 0.1″ step connectors to MOD-nRF8001 and plug it to a breadboard, the third way to connect MOD-nRF8001 to board is by soldering 10 pin UEXT connector to it.

Special OLIMEXINO-NANO nRF8001 shield is designed and will be in stock in February.

Android, PIC32-PINGUINO-OTG and Pure Data project

Image

Roberto Becerra submitted to our Project section his project with Android and PIC32-PINGUINO-OTG.

With the Android app he wrote he have access to all features PIC32-PINGUINO offers: Digital output, inputs, Analog inputs etc.

MOD-RGB – Arduino, Maple and Pinguino Examples

Image

Here we will demoнstrate you how to use our new MOD-RGB LED driver UEXT module with our Arduino, Pinguino and Maple boards which have UEXT connector.

Getting the Libraries and Examples

The library/example .zip files for Arduino, Maple and Pinguino can be downloaded from:
https://www.olimex.com/Products/Modules/LED/MOD-RGB/

Installing the Libraries and examples

For Arduino, use the Fade sketch directly, no additional files or configuration needed.

For Maple:
1. Make sure that the Maple IDE is not running
2. Copy the MODRGB folder to the /libraries folder of your Maple IDE installation folder
3. Start the IDE. The “MODRGB” examples should now appear under File/examples.
4. Include the library in your projects as such:
#include “MODRGB.h”

For Pinguino, use the example directly. It has been tested with PIC32-PINGUINO, PIC32-PINGUINO-OTG, PIC32-PINGUINO-MICRO, PIC32-PINGUINO-MX220

 Examples

All packages include the same example – Fade.

It uses built-in functons or the MODRGB library to set the RED, GREEN and BLUE values that the MOD-RGB board outputs.

The example fades the lights from blue to red to green to blue again in an endless loop.
If you want to adjust the speed at which the colors change, change the value of the delay period to your liking:
#define SPEED 500

ImageImageImage

FRIDAY FREE BOARD QUIZ ISSUE #32 IS PIC32-PINGUINO

Image

PIC32-PINGUINO is arduino like board with 32 bit processor working at 80Mhz and with 256KB of Flash and 32KB of RAM i.e. comparable with hardware capability to the new Arduino Due.

Today at 17.00 o’clock our local Bulgarian time (GMT+2) we will post on Twitter our questions.

You have one hour to reply to our tweet with the correct answer.

At 18.00 o’clock we will count the correct answers and ask random.org to generate random number in range then announce the winner and ship the board by airmail in Monday.

Good Luck!

MICROCHIP DIRECT IS SELLING PIC32-PINGUINO-OTG and PIC32-MAXI-WEB

Image

MIcrochip direct is the Microchip web shop, it’s nice web site where you can see what stock level Microchip keep from the different PIC microcontrollers they have.

Recently they start selling two of our PIC development boards:

http://www.microchipdirect.com/searchparts.aspx?q=olimex&resperpage=10

PIC32-PINGUINO-OTG is our popular PIC32 Arduino like board which runs Pinguino.cc IDE

PIC32-MAXI-WEB is development board running Microchips TCP-IP stack and the Microchip Graphics Library.

Previous Older Entries

Follow

Get every new post delivered to your Inbox.

Join 550 other followers