<<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.8 - 26 Mar 2009 - ZachSmith)

META TOPICPARENT SoftwareDocumentation

OUTDATED: UPDATE ME...

Changed:
<
<

The RepRap microcontroller firmware

>
>

RepRap Firmware


TOC: No TOC in "Main.RepRapMicrocontrollerSoftware"

Changed:
<
<

Introduction

>
>

Introduction


Changed:
<
<
This page links to documentation describing the firmware for the PIC stepper controller board and the PIC extruder controller board.
>
>
Each set of electronics for RepRap contains some sort of microcontroller (uC). Each uC is a miniature computer which needs its own software in order to do useful things. The term for the type of software that runs on a microcontroller is 'firmware'. The reason is that ideally, the software doesn't change very often as it is fairly simple and the code should be very robust. Uploading this software to the chip is called 'burning' or 'programming' the microcontroller.

Changed:
<
<

Building the RepRap PIC firmware under Linux

>
>
Due to the physical and electronic setup of each generation of electronics, new firmware generally must be written for each set. The various firmwares for each are discussed below.

Changed:
<
<
This page gives instructions on how to compile all the PIC firmware on a Linux system.
>
>

Generation 3 Firmware


Changed:
<
<

Programming RepRap PIC chips

>
>
This is the firmware for the third generation electronics based on the Sanguino. You can read more on the third gen documentation page. It is currently a work-in-progress.

Changed:
<
<
This page gives instructions on how to use a conventional PIC programmer to do in-circuit programming of the PIC chips in the RepRap controllers above.
>
>

Generation 2 Firmware


Changed:
<
<

Stepper motor timings

>
>
This is the firmware for the second generation electronics based on the Arduino / Sanguino. Read more on the second gen documentation page.

Changed:
<
<
This page describes how the PIC stepper controller boards do timing to get different stepper motor speeds.
>
>

Generation 1 Firmware


Changed:
<
<

Extruder heater control and temperature measurement

This page describes how the PIC extruder controller board senses temperatures and uses that information to control its heater.

>
>
This is the firmware for the first generation electronics based on the PIC16F648. Read more on the first gen firmware documentation page.

-- AdrianBowyer - 02 Dec 2007

 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.7 - 27 Sep 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation
Changed:
<
<

The RepRap microcontroller firmware

>
>

OUTDATED: UPDATE ME...

The RepRap microcontroller firmware


TOC: No TOC in "Main.RepRapMicrocontrollerSoftware"

 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.6 - 03 Mar 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Changed:
<
<

Building the RepRap PIC firmware under Linux

>
>

Introduction


Changed:
<
<

Prerequisites

>
>
This page links to documentation describing the firmware for the PIC stepper controller board and the PIC extruder controller board.

Changed:
<
<
You will need to have g++, subversion, cvs, flex and bison (or yacc) installed. You also need to have gputils and SDCC installed. The standard version of gputils contains a bug, so you need to download a later one. Uninstall gputils and/or sdcc if the standard versions are already installed on your machine. Then...
>
>

Building the RepRap PIC firmware under Linux


Changed:
<
<

GPUTILS

>
>
This page gives instructions on how to compile all the PIC firmware on a Linux system.

Changed:
<
<
Create a directory for tools needed for RepRap firmware build and put gputils in it:
>
>

Programming RepRap PIC chips


Changed:
<
<
$ mkdir $HOME/reprap-tools
$ cd $HOME/reprap-tools
$ cvs   -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils   login
$ cvs -z3   -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils   co -P gputils
$ cd gputils
$ ./configure --prefix=$HOME/reprap-tools
$ make
$ make install
>
>
This page gives instructions on how to use a conventional PIC programmer to do in-circuit programming of the PIC chips in the RepRap controllers above.

Changed:
<
<

SDCC

>
>

Stepper motor timings


Changed:
<
<
Not all versions of SDCC work. In particular some later revisions have bugs that are not present in earlier versions. Revision 4943 is known to work with RepRap. Once again, put this in the directory you created:
>
>
This page describes how the PIC stepper controller boards do timing to get different stepper motor speeds.

Changed:
<
<
$ cd $HOME/reprap-tools
$ svn co -r 4943 https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc
$ cd sdcc
$ ./configure --prefix=$HOME/reprap-tools --disable-mcs51-port   --disable-gbz80-port --disable-z80-port --disable-avr-port   --disable-ds390-port --disable-ds400-port --disable-xa51-port   --disable-hc08-port --disable-ucsim
$ make
$ make install
>
>

Extruder heater control and temperature measurement


Deleted:
<
<

RepRap PIC Firmware


Changed:
<
<
If you are doing RepRap development you will almost certainly be using Eclipse for the Java host code anyway. Use subversion in Eclipse to check out

https://reprap.svn.sourceforge.net/svnroot/reprap/trunk/reprap/firmware

and move to the directory where Eclipse put that:

$ cd ~/workspace/firmware

Add the directory you created previously to your path:

$ PATH=$HOME/reprap-tools/bin:$PATH
$ export PATH

Now make the RepRap PIC firmware:

$ ./configure
$ make

Files Built

That should create five .hex files for the PIC16F648 (or PIC16F648A - either will work):

~/workspace/firmware/stepmotor/stepmotorx.hex
~/workspace/firmware/stepmotor/stepmotory.hex
~/workspace/firmware/stepmotor/stepmotorz.hex

~/workspace/firmware/extruder_0/extruder0.hex
~/workspace/firmware/extruder_1/extruder1.hex

The first three are for the axis stepper controllers.

The file extruder0.hex is for the standard thermoplast extruder.

The file extruder1.hex is for the experimental paste extruder.

Rebuilds and options

To do a rebuild, in the ~/workspace/firmware directory type

$ make clean
$ make

The standard distribution has the X, Y, and Z axis code set to do half-stepping on the stepper motors. To change this to full stepping edit the file:

~/workspace/firmware/stepmotor/stepmotor.h

comment out the line that says:

#define HALFSTEP

and do a rebuild.

Stepper motor timings

HyperbolicSpeed

>
>
This page describes how the PIC extruder controller board senses temperatures and uses that information to control its heater.

-- AdrianBowyer - 02 Dec 2007

 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.5 - 02 Mar 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Line: 8 to 8

Prerequisites

Changed:
<
<
You will need to have subversion, cvs, flex and bison (or yacc) installed. You also need to have gputils and SDCC installed. The standard version of
>
>
You will need to have g++, subversion, cvs, flex and bison (or yacc) installed. You also need to have gputils and SDCC installed. The standard version of

gputils contains a bug, so you need to download a later one. Uninstall gputils and/or sdcc if the standard versions are already installed on your machine. Then...
Line: 36 to 36

SDCC

Changed:
<
<
Once again, put this in the directory you created:
>
>
Not all versions of SDCC work. In particular some later revisions have bugs that are not present in earlier versions. Revision 4943 is known to work with RepRap. Once again, put this in the directory you created:

$ cd $HOME/reprap-tools
Changed:
<
<
$ svn co https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc
>
>
$ svn co -r 4943 https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc

$ cd sdcc $ ./configure --prefix=$HOME/reprap-tools --disable-mcs51-port --disable-gbz80-port --disable-z80-port --disable-avr-port
 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.4 - 02 Mar 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Line: 8 to 8

Prerequisites

Changed:
<
<
You need to have gputils and SDCC installed. The standard version of
>
>
You will need to have subversion, cvs, flex and bison (or yacc) installed. You also need to have gputils and SDCC installed. The standard version of

gputils contains a bug, so you need to download a later one. Uninstall gputils and/or sdcc if the standard versions are already installed on your machine. Then...
 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.3 - 01 Mar 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Changed:
<
<
Under construction...
>
>

Building the RepRap PIC firmware under Linux

Prerequisites

You need to have gputils and SDCC installed. The standard version of gputils contains a bug, so you need to download a later one. Uninstall gputils and/or sdcc if the standard versions are already installed on your machine. Then...

GPUTILS

Create a directory for tools needed for RepRap firmware build and put gputils in it:

$ mkdir $HOME/reprap-tools
$ cd $HOME/reprap-tools
$ cvs   -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils   login
$ cvs -z3   -d:pserver:anonymous@gputils.cvs.sourceforge.net:/cvsroot/gputils   co -P gputils
$ cd gputils
$ ./configure --prefix=$HOME/reprap-tools
$ make
$ make install

SDCC

Once again, put this in the directory you created:

$ cd $HOME/reprap-tools
$ svn co https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc
$ cd sdcc
$ ./configure --prefix=$HOME/reprap-tools --disable-mcs51-port   --disable-gbz80-port --disable-z80-port --disable-avr-port   --disable-ds390-port --disable-ds400-port --disable-xa51-port   --disable-hc08-port --disable-ucsim
$ make
$ make install

RepRap PIC Firmware

If you are doing RepRap development you will almost certainly be using Eclipse for the Java host code anyway. Use subversion in Eclipse to check out

https://reprap.svn.sourceforge.net/svnroot/reprap/trunk/reprap/firmware

and move to the directory where Eclipse put that:

$ cd ~/workspace/firmware

Add the directory you created previously to your path:

$ PATH=$HOME/reprap-tools/bin:$PATH
$ export PATH

Now make the RepRap PIC firmware:

$ ./configure
$ make

Files Built

That should create five .hex files for the PIC16F648 (or PIC16F648A - either will work):

~/workspace/firmware/stepmotor/stepmotorx.hex
~/workspace/firmware/stepmotor/stepmotory.hex
~/workspace/firmware/stepmotor/stepmotorz.hex

~/workspace/firmware/extruder_0/extruder0.hex
~/workspace/firmware/extruder_1/extruder1.hex

The first three are for the axis stepper controllers.

The file extruder0.hex is for the standard thermoplast extruder.

The file extruder1.hex is for the experimental paste extruder.

Rebuilds and options

To do a rebuild, in the ~/workspace/firmware directory type

$ make clean
$ make

The standard distribution has the X, Y, and Z axis code set to do half-stepping on the stepper motors. To change this to full stepping edit the file:

~/workspace/firmware/stepmotor/stepmotor.h

comment out the line that says:

#define HALFSTEP

and do a rebuild.


Stepper motor timings

 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.2 - 25 Feb 2008 - AdrianBowyer)

META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Under construction...

Added:
>
>

Stepper motor timings

HyperbolicSpeed


-- AdrianBowyer - 02 Dec 2007
 <<O>>  Difference Topic RepRapMicrocontrollerSoftware (r1.1 - 02 Dec 2007 - AdrianBowyer)
Line: 1 to 1
Added:
>
>
META TOPICPARENT SoftwareDocumentation

The RepRap microcontroller firmware

Under construction...

-- AdrianBowyer - 02 Dec 2007

View topic | Diffs | r1.8 | > | r1.7 | > | r1.6 | More
Revision r1.1 - 02 Dec 2007 - 18:04 - AdrianBowyer
Revision r1.8 - 26 Mar 2009 - 20:38 - ZachSmith