November 24, 2024, 08:07:09 AM

Programming using C

Started by Ckr, June 14, 2013, 11:12:14 PM

Previous topic - Next topic

Ckr

Hello all,

Pleeeeease somebody help me sort things out with Duino C programming:
   a. Do I only need MPLAB C32 v.1.11b and MPLAB-X 1.10?
   b. Do I also need a PIC32 programmer/debugger (PIC-KIT3 and PIC-ICSP)?
   c. Can I use the Pinguino IDE and Compilers instead? Where can I find them?
   d. Which method is better?
   e. In order to go back to my original 2.7A Basic, which is the right .hex file to upload?
   f. What is the difference between the DMBasic .hex file and the firmware .hex file?
   g. Are there different .hex versions for the various Duinos (mini, mega etc)?
I hope I didn't overwhelm you, but I've reading the forums for several days now and I can find no straight answer to my questions.  :(

Thanks

LubOlimex

Hey Ckr,

You didn't mention which Duinomite board you exactly have. Still I can give some answers to your questions. If you have further questions please specify which board you have.

   a. Do I only need MPLAB C32 v.1.11b and MPLAB-X 1.10?
It is imperative to use the same compilers and compiler versions as mentioned in the text files accompanying the Olimex demos. The compiler and MPLAB are only needed if you either wish to change the firmware or you want to use the Duino board as general-purpose board (not BASIC dependent).

   b. Do I also need a PIC32 programmer/debugger (PIC-KIT3 and PIC-ICSP)?
Only if you wish to restore an overwritten/corrupted bootloader or if you wish to use the Duino board as general-purpose board.

   c. Can I use the Pinguino IDE and Compilers instead? Where can I find them?
If you wish to use Pinguino you would have to change the bootloader firmware inside Duinomite. That would require PIC32-compatible programmer/debugger.

   d. Which method is better?
Depends on the person, the time available, the resources needed, etc. For me bare programming is the best but millions of people praise Arduino.

   e. In order to go back to my original 2.7A Basic, which is the right .hex file to upload?
The latest firmware is "Olimex DuinoMite Mega MMBasic Project.hex" (has one extra "e" for the eMega) located at https://github.com/OLIMEX/DuinoMite.

   f. What is the difference between the DMBasic .hex file and the firmware .hex file?
DM basic comes from Duinomite Basic, MM basic means Maximite Basic, but the names of the hex files are completely irrelevant.

   g. Are there different .hex versions for the various Duinos (mini, mega etc)?
There are two types of hexes - one for eMega and the other for all other boards (mini, mega, regular Duino).

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

taucapic

#2
Hi Ckr!
      I can recommend a book "Programming 32-bit Microcontrollers
in C, Exploring the PIC32", Lucio Di Jasio
The book is  well written  and suitable for people having minimal experience
in microcontrollers. After reading the book, you can understand  all line of DUINO,and use :
memory 
interrupts , timers , I/O
serial or parallel interfaces ,
LCD display, PS/2 keyboard
  ADC/DAC 
generating black/white video signal 
SD/MMC cards interface
implementation of the FAT
sound generation via PWM
And you'll be closer to the use of a simple operating system .
     The book was published in 2008 and the author
used MPLAB and the C32 compiler . Microchip  strongly recommend migrating to MPLAB-X .
Project files can be easily converted to the new MPLAB-X format.This work has already
been done (See web site: http://www.exploringpic32.com )

      With best regards  taucapic.

PS!
b. You need  PIC-KIT3 and PIC-ICSP from OLIMEX.  For example, DM-MINI has mini ICSP, so you connect
PC (USB A to B)- PIC-KIT3 - PIC ICSP(mini) - DM-MINI.
DUINO can be programmed using the bootloader.
If successful, report it to the forum

d. MPLAB IDE
e. You will no longer be needed Basic, after migrating to C  :D.
I put my second DUINO  with BASIC in my own museum ...
To be serious, we can return to  this problem later.