RamboLCD

From RepRap
Revision as of 23:48, 28 November 2012 by Johnoly99 (talk | contribs) (For Marlin firmware)
Jump to: navigation, search
Crystal Clear action run.png
RAMBoLCD

Release status: Working

Rampslcd.jpg
Description
Hook up an LCD display to RAMBo
License
GPL
Author
Contributors
Based-on
Categories
CAD Models
External Link


Rambolcd2.jpg












Introduction

This page will help you set up the reprapdiscount.com Smart LCD controller to work on the RAMBo boards by UltiMachine. You will find all the instructions needed here to modify the cables (for now, until the adapter PCB is born), firmware mods, arduino mods and more to get your LCD controller working.


This has been tested on REVD and REVE boards from UltiMachine. There is an adapter PCB in the works hopefully soon (Dec. 2012) that will use the standard cables shipped with the smart controller, so no more wiring hacks will be needed. Until then, follow the simple steps below to make your own wiring adapter





Instructions

The following file was created by user:os1r1s and is a great guide to have handy while setting up your LCD controller. It's a good reference to go with the instructions below.

Media:Rambo-LCD.pdf


Step 1: Making the cables

This step involves modifying two of the 10-pin ribbon cables supplied with the smart LCD controller. Depending on the length of cable you need, you may be able to just use one of the long cables and simply cut it in half to make the two cables needed. You will end up with two cables with the black connector on one end, and the other ends will be soldered onto the connectors. This step will be eliminated once the adapter PCB is done.

The two ribbon cables supplied with the smart LCD have one red wire on one side of the cable. That is wire 10, so anywhere you see a wire label called out, you can start at the red wire (#10) and count back, or the opposite side (#1) and that will help you in wiring the cables.

The smart LCD board has two connectors on the back. One is labeled EXP1 on the other is EXP2. EXP1 will also be called A in these instructions, and EXP2 will be called B

Rambolcd3.jpg


Make up one 2X8 or 2X10 connector and one 2X4, if you don't have any, by using female header pins and super-gluing them together. Now, using the PDF, solder the wires coming from the smart LCD to the headers. Take note of the location of the U$2 and U$7 symbols on the RAMBo SPI and EXT pics, they are oriented on the board just as they are shown in the pictures. Remember, EXP1 is A in the PDF, and EXP2 is B, and that the red wires are wire number 10. When you are done, you should have two wires left unused, A9 and A10. Also, notice that in the pics, I used a 2X8 header on the EXT connector, so the first 2 rows of pins are exposed on the board. Notice the red wires orientation on the 2X4 pin connector going to the SPI header on the RAMBo.

Rambospi.jpg Ramboext2.jpg

Rambolcd4.jpg Rambolcd5.jpg


Step 2: Updating your Arduino IDE

This step has been tested and known to work with Arduino 0022 and 0023. If you try another version, and it works, post it here please.

The Arduino IDE does not have all the pins mapped out because the MEGA 2560 boards didn't have them broken out and accessible. UltiMachine broke these un-used pins out knowing that one of us out there would find a use for them and a way to get at them eventually. So, we need to update a file in our Arduino IDE to show it how to talk to those pins. It sounds hard, but all you need to do is download the following zip file, extract the file named arduino_pins.c and copy it into arduino-(yourversion)/hardware/arduino/cores/arduino

File:Update arduino pins.zip

Go ahead and overwrite/replace the existing file, or if you'd like, rename the original file first to something like arduino_pins_ORIG.c then paste this file into the folder. That's it for updating your arduino IDE.

Step 3: Modifying your firmware

For Marlin firmware

Open up your marlin.pde and go to the fastio.h tab. Go down to line 1387 and copy/paste the following lines directly below the line that reads #define DIO69_PWM NULL


#define DIO76_PIN    PINJ5
#define DIO76_RPORT  PINJ
#define DIO76_WPORT  PORTJ
#define DIO76_DDR    DDRJ
#define DIO76_PWM    NULL
#define DIO77_PIN    PINJ6
#define DIO77_RPORT  PINJ
#define DIO77_WPORT  PORTJ
#define DIO77_DDR    DDRJ
#define DIO77_PWM    NULL
#define DIO78_PIN    PINE2
#define DIO78_RPORT  PINE
#define DIO78_WPORT  PORTE
#define DIO78_DDR    DDRE
#define DIO78_PWM    NULL
#define DIO79_PIN    PINE6
#define DIO79_RPORT  PINE
#define DIO79_WPORT  PORTE
#define DIO79_DDR    DDRE
#define DIO79_PWM    NULL
#define DIO80_PIN    PINE7
#define DIO80_RPORT  PINE
#define DIO80_WPORT  PORTE
#define DIO80_DDR    DDRE
#define DIO80_PWM    NULL
#define DIO81_PIN    PIND4
#define DIO81_RPORT  PIND
#define DIO81_WPORT  PORTD
#define DIO81_DDR    DDRD
#define DIO81_PWM    NULL

Now save that file. Next open up the configuration.h file, and scroll down to about line 250. Make the changes so your firmware looks like what is below


/LCD and SD support //#define ULTRA_LCD //general lcd support, also 16x2 //#define SDSUPPORT // Enable SD Card Support in Hardware Console //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.

  1. define ULTIPANEL //the ultipanel as on thingiverse
  2. ifdef ULTIMAKERCONTROLLER //automatic expansion
#define ULTIPANEL
#define NEWPANEL
  1. endif
  1. ifdef ULTIPANEL
  2. define NEWPANEL //enable this if you have a click-encoder panel
 #define SDSUPPORT
 #define ULTRA_LCD
 #define LCD_WIDTH 20
 #define LCD_HEIGHT 4
 

// Preheat Constants

 #define PLA_PREHEAT_HOTEND_TEMP 170 
 #define PLA_PREHEAT_HPB_TEMP 60
 #define PLA_PREHEAT_FAN_SPEED 0! ! // Insert Value between 0 and 255
 #define ABS_PREHEAT_HOTEND_TEMP 240
 #define ABS_PREHEAT_HPB_TEMP 100
 #define ABS_PREHEAT_FAN_SPEED 255! ! // Insert Value between 0 and 255
  1. else //no panel but just lcd
 #ifdef ULTRA_LCD
   #define LCD_WIDTH 16
   #define LCD_HEIGHT 2    
 #endif
  1. endif