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.

***sdcc version 2.6.4 or newer is expected. The "release" version at
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? :-)
LOL, I added that check at the last minute, good thing too. Sourceforge has snapshots again if you feel like upgrading.

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?
Pic architecture is strange in a few more ways than that, especially the 16F family. First off you have a VERY short interrupt stack. On top of that there is no way to determine whether or not the little bit of stack you have is about to overflow or not, or even if it has overflowed.

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.
Yes, a very short stack. I've been counting my function calls, never fear.

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.
Nice picture, I wish I rewrote neatly like that, mine is always scribbled. I assumed you meant 4 wires when you first said telephone. I went and got some to do just that cause I liked the idea.
I've worked on probably a dozen or so operating systems over the years including Unix of which Linux is but a flavour. I had extensive exposure to the evil ways of Sun Microsystems back in the 1990's and look at the whole Java experience as Sun and C programmers' revenge on the world. :-D

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.
i like the design of that.... it looks very simple / modular. i especially like the idea of using off the shelf wiring like telephone / ethernet because of its availability and also signal quality. its a very elegant judo style hack move.
i like the design of that.... it looks very simple / modular.

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
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]