Welcome! Log In Create A New Profile

Advanced

Adafruit "RGB" LCD Shield

Posted by jcabrer 
Adafruit "RGB" LCD Shield
May 13, 2012 10:30PM
Has anyone tried the new LCD Shield from Adafruit with Repetier? I'm not really sure where to begin with this device. It communicates over i2c, and typically makes use of the Wiring and Adafruit RGB LCD libraries. RGB refers to one type of supported LCD display with an RGB back light. I'm using it with a simple White/Blue LCD, so not need to handle color selection, although I will need to turn on the backlight through i2c at some point.

The shield uses the MCP23017 16 I/O Expander. All of the documentation in the firmware source refer to the PCF8574 chip, which has 8 I/O lines. So far, All I get in the display is a row of 16 white blocks in the top. I'm guessing there is an addressing change that needs to be made, but not sure. This is my first i2c device, and I'm not at all familiar with the protocol.

The device is connected properly though, as I am able to run the Hello World example provided with the Adafruit library.
Re: Adafruit "RGB" LCD Shield
May 14, 2012 02:58AM
The problem is that MCP23017 is not compatible with PCF8574. It has 16 output pins which makes it necessary to say which 8 pins you mean when you send data to the chip. The PCF8574 is much simpler. Send a 8 bit value and you get it on the output, Read a 8 bit and you get the input states.

To make it short - you need a new driver type, lets say type 5 and make some changes to the I2C protocol used in mode 3. After that you can use it as any other HD44780 device (no RGB support, don't know how this is set this).

Do you have a link to the product and datasheet for the board. I coulnd't find one with I2C.

I don't know how your programming skills are, but I like to add that to the default system. I had already an other guy wanting to use the MCP instead. So if you need help I could try a basic modification. But I don't have the hardware for tests, so you would need to do all tests and report problems.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Adafruit "RGB" LCD Shield
May 15, 2012 03:25PM
Repetier,

That "MCP" guy would be me :-) Sorry for not getting back to you right away.

I built up a Control panel based on the RGB LCD shield for arduino users but adapted it for 3D control panel. The reason why I went with the design is because adafruit made a Library(compatible with the LiquidCrystal library commands) for it and that makes is very easy to read the 5 buttons( but I also included a regular rotary encoder in the panel).

I hope we can get this working as I think the panel I made is pretty slick. My firmware talents are ok but can get confused easily when reading others code, but I will try to make it work, I need to make it work. My prototypes are arriving next week and instead of the 16x2 I used 20x4 LCD, I used the 3 LED backlight lines as indicator LEDs on the panel for something like extruder led/hotbed led or can be anything. it has the 5 buttons and an encoder. I would more than happy to send one to you. But for now I have the Adafruit RGB shield modified for testing.

Here are the links.

RGD Shield page

Githib page

Or maybe we can use the 8 output version of the chip used in this i2c back pack, might be closer to the PCF8574

i2c backpack

@jcabrer - Thanks for bringing this up.

Thanks

Royco
Re: Adafruit "RGB" LCD Shield
May 15, 2012 05:16PM
@royco jcabrer was so kind to send me one shield, so can test and modify the routines myself. In addition Lincomatic is already modifiying the firmware to get it working. I hope that results soon in a good addition, so everyone can use the mcp like the pcf with the additional capabilities needed to suport the rgb lcd shield. I think that will also allow to include the click encoder. But where did you get the three pins for that.
7 pins for lcd
3 pins for rgb
5 pins for buttons

that leaves only one free pin.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Adafruit "RGB" LCD Shield
May 15, 2012 06:11PM
@repetier The encoder is wired directly to 2 pins(third pin is gnd), so theres 6 wires coming from the panel, 2 for i2c, 2 for the encoder and +/-. I was thinking i2c might not be fast enough to capture the pulses of the encoder(i did not try tho).

I also did not use the 3 LEDs for back lighting, instead they are available on the front panel as indicators, they could be user assigned hopefully. The backlight is wired to be on all the time( but it has a solder jumper incase you have a free PWM pin).

Im excited to get this working!

Anybody going to the MakerFaire Bayarea?
Re: Adafruit "RGB" LCD Shield
May 15, 2012 06:57PM
@royco I be there. Maker table #8023. Come on by and say hello.
Re: Adafruit "RGB" LCD Shield
May 16, 2012 02:03AM
@royco Connecting the encoder directly to the board is a good idea. I have one over i2c working. When the printer is idle it is working quite good, but when it's running the control rate drops and you miss often some clicks.

I'm not sure what to do with your extra leds. The firmware has no code to control those. But when the mcp code is working it should be easy to add some fragments to enable/disable the leds when needed. The much easier way is to connect them to heater output with a greater resistors. That gives you the real feedback at no overhead costs.

The three pins for the click encoder were 2 pin for encoder and one for the push button function. I didn't count the gnd pins. But if you have only the encoder you have still five buttons for the click function left.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Adafruit "RGB" LCD Shield
May 16, 2012 01:07PM
@repetier I was also hoping that if the MCP code gets going it would be easy to access those LEDs, the RGB library just turns them high or low and maybe lincomatic can get that functionality running. The LEDs could be hard wired from the extruder/hotbed connector and the +12v but I was trying to minimize the wiring going to the panel. Now im up to 12 wires if you want to run the mSD adaptor on the panel, 6 if its just the lcd, encoder and buttons.

The encoder's push button function is wired to the MCP, on the RGB library it is the SEL button(center or fifth button).

Thanks

@jcabrer I will surely drop by your table.

Edited 1 time(s). Last edit at 05/16/2012 01:48PM by royco.
Sorry, only registered users may post in this forum.

Click here to login