Welcome! Log In Create A New Profile

Advanced

demitasse - An Experimental Firmware for Pic32 Microcontrollers

Posted by madscifi 
demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 04, 2011 05:18PM
I've started a new firmware project designed for Pic32 microcontrollers, specifically the ChipKit Uno32 board.

It is hosted on github and can be downloaded from here.

The code is largely a derivative of Teacup but it is no longer strictly C code. The step generation code is completely new and it uses the output capture hardware on the Pic32 chip to generate the step pulses in order to reduce jitter.

At present it is only partially functional - it can control the x, y, z and e steppers, but it does not yet read temp sensors, min/max/home switches, or control heaters. Essentially there is more missing at this point there is present. However, the following plate of half-sized octopi was printed using demitasse to run the steppers and an Arduino running Teacup to control the extruder's heater (silver PLA, .25mm layer height, .4mm nozzle). The prints are pretty much indistinguishable from ones printed with Teacup from the same GCODE.



Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 04, 2011 07:21PM
here is an article as well [www.eetimes.com]


i think that the pic chip is an excellent alternative. even the 8 bit pic chips. there was a pic project a while ago called pinguino [www.hackinglab.org] that i often considered.

the world has a high demand for atmel processors, but there are some times i can not find them for months!

microchip is big enough and diverse enough that pics are cheap and everywhere!


anyway i also wanted to comment on the possibility of the extruder controller being a pinguino.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 04, 2011 08:25PM
Since the pic32 and other larger variants are so much more capable than the atmega, check out Soupcup as another possibility for your codebase. It's another project I'm working on rather more quietly than teacup, with quite a different approach. I intend to run them both in parallel since they have quite different design goals and fill different niches in the firmware field. Soupcup is where I intend to explore options that may be too large or slow for the little atmegas, but should suit larger chips like the mips-based pic32 or arm-based cortex m3 family.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 05, 2011 09:11PM
Triffid_Hunter - Thanks, I'll take a look. I'm not quite at the stage of wanting to stop worrying about floating point operations outside of interrupts, the Pic32 chips are not quite that fast, but it is one of the things I plan to do some timing tests on.

jamesdanielv - 8 bit pics certrainly could run a RepRap. One of the reasons, i think, that there has not been a lot of work done with them in the RepRap world is that Microchip has never had good open source support. I appears that this is about to change, although at the moment how committed they are remains to be seen. What they have released (the MPIDE) is a nicely done upgrade for the Arduino IDE (and they've done the IDE changes generically so that someone else can come along and plug a different compiler/chipset into the system relatively easily), but at present their library files are still a mix of open and closed source. I'm hoping I won't regret spending a lot of time working with it. I decided to take a look because it is a significant increase in performance at a price that is actually a couple of dollars less than an Arduino.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 06, 2011 11:43AM
There is already an (experimental) 8-bit PIC design aimed at low cost, using the PIC's native USB instead of a USB-serial converter. There are also at least two PIC32 designs.

Microchip's development tools/libraries are mostly "free of charge but for use with our hardware only" licensed (though the 16- and 32-bit compilers are based on gcc and hence GPL); the MPLAB X beta doesn't make them open source, but does allow them to run on Linux. There are open source alternatives to some of the libraries.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
June 06, 2011 11:02PM
rebecca.palmer - thanks for the references. I was not aware of the two PIC32 firmwares you've listed.

I believe that Microchip/Diligent's plan is not to open source the current PIC32 libraries but to provide new open source libraries in conjunction with the Multi-platform version of the Arduino code. But, we shall see if they follow through.

Edited 1 time(s). Last edit at 06/06/2011 11:17PM by madscifi.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 29, 2011 04:47PM
I created a IRC Channel for chipKIT RepRap Dev. its #chipkit I had been planning on porting to the ChipKIT Max32 since I got my boards 2 weeks before release. Is this still active?


Charles Gantt.
Build blog [themakersworkbench.com] <---- my personal site
Build worklong [www.thebestcasescenario.com]
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 29, 2011 09:58PM
By "this" I assume you mean this firmware? It's not dead, but I have not had time to do any significant work on it recently. Although the approach used in the firmware to generate the stepper pulses has some technical advantages, I think the approach used by EMC and some other firmwares (single high speed constant interrupt driving all axis) probably makes more sense as it simplifies handling acceleration significantly.

At present what is limited the quality of the prints I'm making has little to do with the electronics or firmware. I'm pretty certain that there are several mechanical issues that are causing the most significant issues, so I've been spending what time I do have attempting to understand and figure out a way to address them. So the firmware is not presently a very high priority.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 12:06AM
I like your work into this and have been monitoring the open source seriousness of microchip. My main interest is how this work you are doing will decrease risk of those that want to supply hardware. at several points in time arduino platforms become scarce. Also microchip does offer a cost advantage here as well.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 01:03AM
Jamesdanielv, I think the chipkits are nice boards that are very inexpensive given the capabilities of the hardware. However, I still have concerns about their software. They've certainly oversold their compatibility with Arduino and I've not seen any movement on an opensource c-library. What bothers me most is that they seem to be mostly ignoring questions about the topic on the chipkit forum.

Edited 1 time(s). Last edit at 07/30/2011 01:04AM by madscifi.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 04:03AM
is this the forum for that? [chipkit.cc]
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 12:01PM
jamesdanielv Wrote:
-------------------------------------------------------
> is this the forum for that? [chipkit.cc]

yes.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 06:13PM
i guess we will just need to watch the forum there for a while. I think registering on that forum would show us support for it right? I'll make an effort with them... hopefully some of us will go there as well... FYI un32 has 35 times the float math of arduino uno. that alone has my interest peeked. again there are issues with open sourcing of code. there are the example libraries from microchip here, [www.microchip.com]

I am in now way indicating the switch from arduino, just something that compliments it and makes life easier as a supplier. there are some nasty economics that come into play when a shortage of arduinos are available.

madscifi, you may want to consider branching your firmware with reprap wiki.

I will purchase a microchip chipkit uno32, and test your firmware sometime in the next few months as i need to purchase the product.

I would encourage anyone else here to do the same, and join the forum for the chipkit set as well. that hopefully will show microchip that there is a market of interested people that just want open sourced examples, other that referencing the arduino web site, which they do.

i am not a lawyer, but it seems that by hosting there ide on github, they agree to the terms and conditions that state it is considered open source here:

[help.github.com]

here is there wiki page [www.chipkit.cc]

that specify you agree to people making changes, modifying code........



i will know more when i get the actual chip set.... i have been burned before by thinking the mplab was free with c optimizations, but it ended up only working for 2 months, then it no longer did optimizations ... we will see...

either way i will post my experiences here.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 06:47PM
There is no question about the IDE and the compiler itself - they are both open source. The only point of contention is the c runtime library. I don't believe that the c runtime is on github. There is nothing wrong, per se, with a proprietary runtime library - lots of open source software has been developed/used on systems with proprietary runtime libraries. However, I'd like to see an opensource version, or I'd at least like to see them be upfront about the fact that it is proprietary.
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
July 30, 2011 07:58PM
also i see in the software forum compatibility with arduino code issues...


as for rights to software it is here:
[www.microchip.com]


Microchip Software: Use of software including, but not limited to, source code from the Site is subject to the copyright notices, disclaimers, and any license terms accompanying such software, whether set forth at the install of each program or posted in a header or text file. If such notices or terms accompany the software, then in addition to these Terms of Use the terms set forth below shall apply:

Microchip retains all ownership and intellectual property rights in the software and in all derivatives thereto. You may use this software, and any derivatives created by any person or entity by or on your behalf, exclusively with Microchip’s proprietary products. You agree that you are solely responsible for testing the software and determining its suitability. Microchip has no obligation to modify, test, certify, or support the software.


they retain the rights, but give the user permission as long as it is with there products. so the issue seems to be whatever is made must have a disclaimer 'only to be used with chipkit and other microchip products..'
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
August 09, 2011 03:20PM
just a heads up, i received the chipkit, within 3 days of sending payment. so far the examples work well, but i have not ventured off into reprap firmware stuff yet. i am currently wiring up gen3 for a modified Mendel, and after it is printing, will venture off with the experimental firmware listed above to try it out. don't know when that will be, but hopefully in the next month or so... one i/o difference is the chipkit is organized into 16 bit wide i/o ports, also not all pins have resistor pull ups... still reading info.....
Hi guys,

Don't worry anymore about closed source libc of Microchip. There is a completely open source development chain for PIC32 using newlib instead of libc:
Pinguino 32bit project

They ported the Arduino library in 99% percent :
Compatibility.
And you have everything to get you started with your RepRap projects.

Vasi
Re: demitasse - An Experimental Firmware for Pic32 Microcontrollers
August 25, 2011 05:22PM
very cool. 99% working.

seems the 1% is string manipulation and Ethernet issues. string manipulation is very important.
Sorry, only registered users may post in this forum.

Click here to login