Thursday, March 15, 2007
Biollante Boards and Firmware
On the right you will see the basic design I am using for all my modules except the comm controller. I broke my promise to use two-conductor phone cable to join the modules in their ring, but only a little; I now use four-conductor phone cable!
After a lot of cleaning up, I have also made version 0.1 of the firmware available on my site. It includes code for the stepper controller and comm controller, and hopefully a useful amount of documentation with them; they are licensed under the GNU GPL.
present does NOT work, particularly for EEPROM data, please build the
latest version of SDCC from subversion.***
When you get sick of it...
You're already a RepRap renegade. Why stop now? :-)
Sick of it? I love it! :D I haven't had to bodge a single workaround to make a recent SDCC build produce sane code, and C is my native programming tongue. I don't need inline ASM for anything but EEPROM writes and NOP instructions.
You have to keep the target in mind, though. PIC architecture is so very, very strange... There's four kinds of memory, array access is not reentrant(plagued me for weeks until I disabled interrupts for them!), things like 16-bit numbers become function calls, strings become freaking jump tables, and the register map looks like Pitfall!
Besides, I've got ideological reasons. I want to keep my software as open as possible. Open-source is meaningless when the build tools are closed platform-locked commercial software. Imagine subtracting the cost of Windows Vista, Visual Studio, and Oshon PIC Simulator from the projected reprap cost -- will there anything left over for hardware?
As I discovered with the 16F877A the first time you discover stack overflow is when your firmware starts behaving in a bizarre manner. That's why I shifted over to the 18F family. Bigger stack and the ability to monitor stack behaviour on-chip.
***Imagine subtracting the cost of Windows Vista, Visual Studio, and Oshon PIC Simulator from the projected reprap cost -- will there anything left over for hardware?***
First off, you're only going to be buying Visual Studio and the Oshon IDE if you are intent on doing development work, not if you just want to build a 3D printer. Same same with RepRap.
As to Vista (I use XP), I'm keeping the actual control panel for Tommelise very simple so that I can port it to Python or Java. Slice and Dice and and advanced versions of that genre I'm going to offer as web services that anybody with a browser can use, so your PC platform isn't really an issue.
I'm also formatting the transfer file between Slice and Dice and Tommelise as .xml, again so that anybody can write drivers and filters for it.
Slice and Dice as a web service is a terrific idea.
As for closed development environments, well, we have different perspectives. I'm a Windows programmer that moved to Linux, and it has not been lost on me that Linux programs are vastly easier to port to Windows than vice versa.
I've no love of Windows, having programmed for Windows environments for nearly fifteen years now and, given what an abomination Vista has morphed into will probably choose Linux as the operating system on my next PC.
That said, I can't see demanding that people who want to use, as opposed to develop, open source hardware 3D printers pass some shibboleth test for Linux ideological purity as a prerequisite for being able to do so. That's why I'm writing going to put up Slice and Dice as a web service on my servers where I have control of what kind of OS and development environments they can handle rather than as a PC app.
There is already a state department of education here in the US who wants to use Tommelises in high schools who use the Linux platform exclusively. That's why I'm doing things the way I am. Doing multiplatform compatability easily gets to be a full-time job. I'd rather develop apps that do intersting things than get into all the time consuming politics of guessing which operating system is going to dominate things at some time in the future. That's a mug's game that I've been forced to play all to often in my misspent life.
Thanks. I must give credit where credit is due of course; I did not create the idea. That came straight from the the official RepRap plans. I just shuffled pins around and redesigned the firmware. It's also just an outline... There's stuff left out to make it clearer, trivial things like the voltage regulator and reset switch.
its a very elegant judo style hack move.
I was pleased with how cheap and easy it was, but "judo hack" sounds much better :D
Links to this post: