Welcome! Log In Create A New Profile

Advanced

Repetier with i2c LCD - Not initing

Posted by peter6960 
Repetier with i2c LCD - Not initing
October 12, 2012 04:26PM
Hi

I built a i2c LCD with a PCF8574A (as per [forums.reprap.org])

Using the test firmware from my Arduino test, and putting it on the Gen 7 - my LCD initialises and displays the test program just fine. This proves Wiring is fine, as is the i2c Pullups etc. Also, my pinout on the PCF8574 is noted from the firmware

If however I enable Display type 3 (i2c lcd) on Repetier and upload that, the LCD never initialises. Display just hangs there with the row of black blocks, but never starts displaying anything firmware related

Test Firmware: (See post referenced above - where I have it working wonderfully)

#define I2C_ADDR    0x38  // Define I2C Address where the PCF8574A is
#define En_pin  6
#define Rw_pin  0
#define Rs_pin  7
#define D4_pin  4
#define D5_pin  3
#define D6_pin  2
#define D7_pin  1

and in Repetier's UICONFIG.H I changed it to

*/
#define UI_DISPLAY_TYPE 3 

// This is line 2 of the status display at startup
#define UI_VERSION_STRING2 "Orig. Mendel"

/** Number of columns per row

Typical values are 16 and 20
*/
#define UI_COLS 20
/**
Rows of your display. 2 or 4
*/
#define UI_ROWS 4

/* What type of chip is used for I2C communication
0 : PCF8574 or PCF8574A or compatible chips.
1 : MCP23017
*/
#define UI_DISPLAY_I2C_CHIPTYPE 0
// 0x40 till 0x4e for PCF8574, 0x40 for the adafruid RGB shield, 0x40 - 0x4e for MCP23017
#define UI_DISPLAY_I2C_ADDRESS 0x38
// For MCP 23017 define which pins should be output
#define UI_DISPLAY_I2C_OUTPUT_PINS 65504
// Set the output mask that is or'd over the output data. This is needed to activate
// a backlight switched over the I2C. 
// The adafruit RGB shields enables a light if the bit is not set. Bits 6-8 are used for backlight.
#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0
// For MCP which inputs are with pullup. 31 = pins 0-4 for adafruid rgb shield buttons
#define UI_DISPLAY_I2C_PULLUP 31
/* How fast should the I2C clock go. The PCF8574 work only with the lowest setting 100000.
A MCP23017 can run also with 400000 Hz */
#define UI_I2C_CLOCKSPEED 100000L
/**
Define the pin
*/
#if UI_DISPLAY_TYPE==3 // I2C Pin configuration
#define UI_DISPLAY_RS_PIN _BV(7)
#define UI_DISPLAY_RW_PIN _BV(0)
#define UI_DISPLAY_ENABLE_PIN _BV(6)
#define UI_DISPLAY_D0_PIN _BV(4)
#define UI_DISPLAY_D1_PIN _BV(3)
#define UI_DISPLAY_D2_PIN _BV(2)
#define UI_DISPLAY_D3_PIN _BV(1)
#define UI_DISPLAY_D4_PIN _BV(4)
#define UI_DISPLAY_D5_PIN _BV(3)
#define UI_DISPLAY_D6_PIN _BV(2)
#define UI_DISPLAY_D7_PIN _BV(1)

What am I doing wrong (or using wrong) - as I understand this should work. Pins match my test firmware (unless I understand wrong and BV(4) is not equal to bit 4 (i.e. physical pin 5 on the PCF8447 like it works in my test firmware)

Please help
Re: Repetier with i2c LCD - Not initing
October 12, 2012 05:15PM
Also, I notice with #define UI_DISPLAY_TYPE 0 I can still connect from Pronterface, but with #define UI_DISPLAY_TYPE 3 I cannot - it does not connect.

I thought it might be out of RAM so swopped the 644 for a 1284, bootloaded and reuploaded. Same results.

Next, to rule out i2c, I tried with #define UI_DISPLAY_TYPE 1 - also hangs (i.e. fails to connect from Pronterface) - changed back to #define UI_DISPLAY_TYPE 0 and reupload - connects as usual...

So as soon as LCD support is added, it seems like the ATmega hangs

I tried this on two of my Gen 7 boards so doubt strongly it's hardware.

Edit:

Also, I tried #define UI_DISPLAY_TYPE 4, and uncommented LiquidCrystal from the Repetier.pde file. Aha! After upload I can still connect from pronterface. So must be something in Repetier's own LCD routines?

I opened a serial terminal and pressed reset. the 'start' gets returned, seems thereafter the CPU hangs

Unfortunately I don't have enough pins, I definately will need to go I2C on this...

Please help


Peter

Edited 3 time(s). Last edit at 10/12/2012 05:26PM by peter6960.
Re: Repetier with i2c LCD - Not initing
October 13, 2012 03:11AM
The hang happens if you enter the wrong I2C address. 0x40 till 0x4e for PCF8574
The original arduino libraries take an other address range, beacuse they take the half of the value. I had the same problem when using wrong addresses.


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: Repetier with i2c LCD - Not initing
October 13, 2012 05:04AM
I run PCF8574A - what would be the correct address in your library for A1,2,3 all tied low...
Couldn't find PCF8574s around me. The A has a offset address range.


Apart from the I2C address, why would it be hanging with direct connected LCD then?

Appreciate all your help, and PS: Repetier has made a two-fold increase in speed and quality on my gen-7 powered printrbot over Teacup...

Just want to get LCD working, and then figure out why I am skipping steps on models bigger than 3x3cm (i.e. extruder bodies etc - i suspect the acceleration is going to high as soon as the run gets longer...

Peter
Re: Repetier with i2c LCD - Not initing
October 13, 2012 05:26AM
Slave adress for PCB8574A is 0111 A2 A1 A0 0 in binary. All Ax low is then 0x70 or 112 in decimal notation.

If you connect it directly it can only hang if you have the UI_DISPLAY_RS_PIN set. In that case it reads signals from the display and if it is not connected in reality it can wait for ever.

With your skipping steps it can also be speed. I like high travel speeds but on longer ways the speed is really reached which causes the motor force to be reduced. Also it normally works a short scratch with printed filament may be enough to have skipped steps. If you get skipped steps only in one direction disable endstops during normal print. Crosstalk can also cause missing steps.


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: Repetier with i2c LCD - Not initing
October 13, 2012 05:51AM
You sir, have just achieved Legend status in my books!




Thank you Thank you Thank you

Also, dropped Accelaration to 1000 and looking a lot better.
Re: Repetier with i2c LCD - Not initing
November 26, 2012 05:45AM
ARGH...angry smiley and I was struggling yesterday evening with just that. Cause the I2C LCD example programm worked with "0x20" I've configured Repetier fw with that too. As a result of it the firmware responded with "start" and nothing else. (On GEN7 as well as on Mega1280). Note to me : read the f****ing manual eye rolling smiley

Thank's for the hint!!! smiling bouncing smiley I'll give it a try today!!


repetier Wrote:
-------------------------------------------------------
> The hang happens if you enter the wrong I2C
> address. 0x40 till 0x4e for PCF8574
> The original arduino libraries take an other
> address range, beacuse they take the half of the
> value. I had the same problem when using wrong
> addresses.
Re: Repetier with i2c LCD - Not initing
December 23, 2012 02:00PM
Okay have to reopen this one...

Same firmware, just changed MOTHERBOARD == to 62 (Sanguinololu) for my new Sanguinololu... Same sympton back again

Exact same lcd/pcb/pcf8574 as above- so Address is not to blame this time...
All A pins are low, so its 1111110 = 0x70 still

Anything Sanguinololu specific I should be aware of (and yes DO I have a 1284p instead of a 644 (: in there)


Again, the test below works, somehow proving hardware is fine...

/*
** Example Arduino sketch for SainSmart I2C LCD2004 adapter for HD44780 LCD screens
** Readily found on eBay or [www.sainsmart.com] 
** The LCD2004 module appears to be identical to one marketed by YwRobot
**
** Address pins 0,1 & 2 are all permenantly tied high so the address is fixed at 0x27
**
** Written for and tested with Arduino 1.0
** This example uses F Malpartida's NewLiquidCrystal library. Obtain from:
** [bitbucket.org] 
**
** Edward Comer
** LICENSE: GNU General Public License, version 3 (GPL-3.0)
**
** NOTE: TEsted on Arduino NANO whose I2C pins are A4==SDA, A5==SCL
*/
#include 
#include 
#include 

#define I2C_ADDR    0x38  // Define I2C Address where the PCF8574A is
#define En_pin  6
#define Rw_pin  0
#define Rs_pin  7
#define D4_pin  4
#define D5_pin  3
#define D6_pin  2
#define D7_pin  1

int n = 1;

LiquidCrystal_I2C	lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
  lcd.begin(20,4);
  
// Switch on the backlight
  lcd.home();                   // go home

 lcd.print("I2C tester");  
  lcd.setCursor ( 0, 1 );        // go to the 2nd line
  lcd.print("F Malpartida library");
  lcd.setCursor ( 0, 2 );        // go to the third line
  lcd.print("Test By OpenHardware");
  lcd.setCursor ( 0, 3 );        // go to the fourth line
  lcd.print(".co.za ");}

void loop()
{
  // Backlight on/off every 3 seconds
  lcd.setCursor(14,3);        // go col 14 of line 3
  lcd.print(n++,DEC);
}-



Here's UICONFIG.H



#define UI_DISPLAY_TYPE 3 

// This is line 2 of the status display at startup
#define UI_VERSION_STRING2 "Orig. Mendel"

/** Number of columns per row

Typical values are 16 and 20
*/
#define UI_COLS 20
/**
Rows of your display. 2 or 4
*/
#define UI_ROWS 4

/* What type of chip is used for I2C communication
0 : PCF8574 or PCF8574A or compatible chips.
1 : MCP23017
*/
#define UI_DISPLAY_I2C_CHIPTYPE 0
// 0x40 till 0x4e for PCF8574, 0x40 for the adafruid RGB shield, 0x40 - 0x4e for MCP23017
#define UI_DISPLAY_I2C_ADDRESS 0x70
// For MCP 23017 define which pins should be output
#define UI_DISPLAY_I2C_OUTPUT_PINS 65504
// Set the output mask that is or'd over the output data. This is needed to activate
// a backlight switched over the I2C. 
// The adafruit RGB shields enables a light if the bit is not set. Bits 6-8 are used for backlight.
#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0
// For MCP which inputs are with pullup. 31 = pins 0-4 for adafruid rgb shield buttons
#define UI_DISPLAY_I2C_PULLUP 0
/* How fast should the I2C clock go. The PCF8574 work only with the lowest setting 100000.
A MCP23017 can run also with 400000 Hz */
#define UI_I2C_CLOCKSPEED 100000L
/**
Define the pin
*/
#if UI_DISPLAY_TYPE==3 // I2C Pin configuration
#define COMPILE_I2C_DRIVER
#define UI_DISPLAY_RS_PIN _BV(5)
#define UI_DISPLAY_RW_PIN _BV(6)
#define UI_DISPLAY_ENABLE_PIN _BV(7)
//#define UI_DISPLAY_D0_PIN _BV(5)
//#define UI_DISPLAY_D1_PIN _BV(5)
//#define UI_DISPLAY_D2_PIN _BV(5)
//#define UI_DISPLAY_D3_PIN _BV(5)
#define UI_DISPLAY_D4_PIN _BV(3)
#define UI_DISPLAY_D5_PIN _BV(2)
#define UI_DISPLAY_D6_PIN _BV(1)
#define UI_DISPLAY_D7_PIN _BV(0)

Edited 1 time(s). Last edit at 12/23/2012 02:02PM by peter6960.
Re: Repetier with i2c LCD - Not initing
December 23, 2012 02:08PM
Why don't you use the same pin assignment as in your test code.

Test code:
#define En_pin  6
#define Rw_pin  0
#define Rs_pin  7
#define D4_pin  4
#define D5_pin  3
#define D6_pin  2
#define D7_pin  1

Firmware:
#define UI_DISPLAY_RS_PIN _BV(5)
#define UI_DISPLAY_RW_PIN _BV(6)
#define UI_DISPLAY_ENABLE_PIN _BV(7)
#define UI_DISPLAY_D4_PIN _BV(3)
#define UI_DISPLAY_D5_PIN _BV(2)
#define UI_DISPLAY_D6_PIN _BV(1)
#define UI_DISPLAY_D7_PIN _BV(0)

shoulnd't it be

#define UI_DISPLAY_RS_PIN _BV(7)
#define UI_DISPLAY_RW_PIN _BV(0)
#define UI_DISPLAY_ENABLE_PIN _BV(6)
#define UI_DISPLAY_D4_PIN _BV(4)
#define UI_DISPLAY_D5_PIN _BV(3)
#define UI_DISPLAY_D6_PIN _BV(2)
#define UI_DISPLAY_D7_PIN _BV(1)


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: Repetier with i2c LCD - Not initing
December 23, 2012 02:19PM
Oops

My apologies - too many hours staring at code got to me

Mispasted the original test firmware I had in Post #1 above again, sorry

Here's the Schematic for the Backpack I'm using



And this is what I have in uiconfig.h in fact, plus it is a PCF8574A no PCF8574 (sorry late night here)

#define UI_DISPLAY_RS_PIN _BV(5)
#define UI_DISPLAY_RW_PIN _BV(6)
#define UI_DISPLAY_ENABLE_PIN _BV(7)
#define UI_DISPLAY_D4_PIN _BV(3)
#define UI_DISPLAY_D5_PIN _BV(2)
#define UI_DISPLAY_D6_PIN _BV(1)
#define UI_DISPLAY_D7_PIN _BV(0)

Still same issue though, chip hangs after "start"


Peter

Edited 1 time(s). Last edit at 12/23/2012 02:20PM by peter6960.
Re: Repetier with i2c LCD - Not initing
December 23, 2012 02:26PM
From what I understand, Repetier will hang if it cannot find the i2c address specified, correct?

Definately not i2c wiring either:

I2C Scanner
Scanning...
I2C device found at address 0x38 !
done

thats with the [playground.arduino.cc]

So it seems like thats not the only cause, as I can see device...

Edited 1 time(s). Last edit at 12/23/2012 02:41PM by peter6960.
Re: Repetier with i2c LCD - Not initing
December 24, 2012 04:10AM
Ok, i googled a bit. It looks like the firmware always hangs in this code:
	// wait until transmission completed
	while(!(TWCR & (1< // Uncomment this if you are using liquid crystal library
#endif
in Repetier.pde

and in ui.cpp
#if UI_DISPLAY_TYPE==4
// Use LiquidCrystal library instead
#include 

LiquidCrystal lcd(UI_DISPLAY_RS_PIN, UI_DISPLAY_RW_PIN,UI_DISPLAY_ENABLE_PIN,UI_DISPLAY_D4_PIN,UI_DISPLAY_D5_PIN,UI_DISPLAY_D6_PIN,UI_DISPLAY_D7_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: Repetier with i2c LCD - Not initing
December 27, 2012 12:28PM
Okay gave up in the end... going to reetch a Gen 7 - that worked... seems lik the Sanguinololu's are not as nice (:
Re: Repetier with i2c LCD - Not initing
January 17, 2013 08:38AM
Me again... Okay so we finished layout of the panel with the new SD you helped me get working last week, and the i2c LCD as well:
Etched boards and soldered up - all very neat. SD still working

Test sketch works:
/*
** Example Arduino sketch for SainSmart I2C LCD2004 adapter for HD44780 LCD screens
** Readily found on eBay or [www.sainsmart.com] 
** The LCD2004 module appears to be identical to one marketed by YwRobot
**
** Address pins 0,1 & 2 are all permenantly tied high so the address is fixed at 0x27
**
** Written for and tested with Arduino 1.0
** This example uses F Malpartida's NewLiquidCrystal library. Obtain from:
** [bitbucket.org] 
**
** Edward Comer
** LICENSE: GNU General Public License, version 3 (GPL-3.0)
**
** NOTE: TEsted on Arduino NANO whose I2C pins are A4==SDA, A5==SCL
*/
#include 
#include 
#include 

#define I2C_ADDR    0x38  // Define I2C Address where the PCF8574A is
#define En_pin  6
#define Rw_pin  5 
#define Rs_pin  4
#define D4_pin  3
#define D5_pin  2
#define D6_pin  1
#define D7_pin  0

int n = 1;

LiquidCrystal_I2C	lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
  pinMode(13, OUTPUT);
  lcd.begin(20,4);
  
// Switch on the backlight
  lcd.home();                   // go home

 lcd.print("I2C tester");  
  lcd.setCursor ( 0, 1 );        // go to the 2nd line
  lcd.print("F Malpartida library");
  lcd.setCursor ( 0, 2 );        // go to the third line
  lcd.print("Test By OpenHardware");
  lcd.setCursor ( 0, 3 );        // go to the fourth line
  lcd.print(".co.za ");}

void loop()
{
  // Backlight on/off every 3 seconds
  lcd.setCursor(14,3);        // go col 14 of line 3
  lcd.print(n++,DEC);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  
}


FEATURE_CONTROLLER set to 1
Display type set to 3
I2C Address set to 70 (all Address pins low, PCF8574A)


*/
#define UI_DISPLAY_I2C_CHIPTYPE 0
// 0x40 till 0x4e for PCF8574, 0x40 for the adafruid RGB shield, 0x40 - 0x4e for MCP23017
// Official addresses have a value twice as high!
#define UI_DISPLAY_I2C_ADDRESS 0x70
// For MCP 23017 define which pins should be output
#define UI_DISPLAY_I2C_OUTPUT_PINS 65504
// Set the output mask that is or'd over the output data. This is needed to activate
// a backlight switched over the I2C. 
// The adafruit RGB shields enables a light if the bit is not set. Bits 6-8 are used for backlight.
#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0
// For MCP which inputs are with pullup. 31 = pins 0-4 for adafruid rgb shield buttons
#define UI_DISPLAY_I2C_PULLUP 0
/* How fast should the I2C clock go. The PCF8574 work only with the lowest setting 100000.
A MCP23017 can run also with 400000 Hz */
#define UI_I2C_CLOCKSPEED 100000L
/**
Define the pin
*/
#if UI_DISPLAY_TYPE==3 // I2C Pin configuration
#define UI_DISPLAY_RS_PIN _BV(4)
#define UI_DISPLAY_RW_PIN _BV(5)
#define UI_DISPLAY_ENABLE_PIN _BV(6)
#define UI_DISPLAY_D0_PIN _BV(7)
#define UI_DISPLAY_D1_PIN _BV(7)
#define UI_DISPLAY_D2_PIN _BV(7)
#define UI_DISPLAY_D3_PIN _BV(7)
#define UI_DISPLAY_D4_PIN _BV(3)
#define UI_DISPLAY_D5_PIN _BV(2)
#define UI_DISPLAY_D6_PIN _BV(1)
#define UI_DISPLAY_D7_PIN _BV(0)


But alas, on boot ATmega hangs

Definitely not hardware (so perhaps unfairly blamed the Sanguinololu)


Setup used:
Gen 7 1.5 AVR
OpenHardware.co.za Gen 7 Shield (Eagle Board file attached)
OpenHardware.co.za Gen 7 UI Panel (Eagle Board file attached)
Repetier Development Version you sent me which had the working SD card config for Gen 7 (http://forums.reprap.org/read.php?267,175177,176749#msg-176749)

I can't get the I2C Scanner to run (Gen 7 compile issues) but the I2c looks reliable, have the pullups on the Shield PCB - and voltmeter shows they do get pulsed low as it should be.
Address verified both by it being the same as protoboard tests, as well as calculated from 8-bit binary again

Peter
Attachments:
open | download - Gen7Shield.brd (45.2 KB)
open | download - i2clcdsdENC.pdf (24.6 KB)
Re: Repetier with i2c LCD - Not initing
January 17, 2013 10:13AM
Sure that the adress of PCF is 0x70h? Sometimes i read for Repetier adress should 0x70h but on my TeeCup (with Hardware I²C) i need 0x40h (all address pins low, PCF8574A). With 0x70h my Atmel hanks too...
Re: Repetier with i2c LCD - Not initing
January 17, 2013 10:19AM
Yes, it worked on Protoboard - with older version of Repetier

Peter
Re: Repetier with i2c LCD - Not initing
January 17, 2013 10:33AM
Compile with 0 errors/warnings? I²C switched off in PRR? (power reduction register) SCL toggle at startup?
Re: Repetier with i2c LCD - Not initing
January 17, 2013 11:01AM
I can't see an error in your configuration. If your test script runs the firmware should do the same.

You said you had an other firmware version running with the lcd. How does this version work with your soldered version? With this version you should at least expect success. And if it succeeds we know it has to do with the configuration. You may have seen that I changed the ui config a bit to make it easier for most users with known popular controller.


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: Repetier with i2c LCD - Not initing
January 17, 2013 11:04AM
Unfortunately with all the SD trouble I trashed all the old stuff

As a suggestion, how difficult would it be to merge the test libraries in as DISPLAY_TYPE=5

Peter
Re: Repetier with i2c LCD - Not initing
January 17, 2013 12:02PM
Not very difficult. You can use the code for type 4 and only need to change 3 lines I guess.

ui.cpp lines 651..
#include 

LiquidCrystal lcd(UI_DISPLAY_RS_PIN, UI_DISPLAY_RW_PIN,UI_DISPLAY_ENABLE_PIN,UI_DISPLAY_D4_PIN,UI_DISPLAY_D5_PIN,UI_DISPLAY_D6_PIN,UI_DISPLAY_D7_PIN);

and Repetier.pde 119:

#if UI_DISPLAY_TYPE==4
//#include  // Uncomment this if you are using liquid crystal library
#endif

change them to your i2c library and use type 4 and it should compile with the liquid_crystal_i2c library if it compatible as stated.


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: Repetier with i2c LCD - Not initing
January 17, 2013 12:23PM
The wiring library it uses seems incompatible with Traums Gen 7 cores - again ...

sigh...

wish I was better at software dev sometimes

Edit:

Although, with Gen 7 selected in boards - sample sketch compiled. Now mid-print so have not uploaded yet
So as soon as I integrate it into Repetier I get compile errors about t_size, and String does not name type, etc

Edited 1 time(s). Last edit at 01/17/2013 12:37PM by peter6960.
Re: Repetier with i2c LCD - Not initing
January 17, 2013 12:30PM
The only thing different from these than the protoboard is that I am using pins 0-6 instead of 1-7 - do you think it could be a bug with bv(0) being ignored or something?

Peter
Re: Repetier with i2c LCD - Not initing
January 17, 2013 01:08PM
I tried to compile it with a LiquidCrystal_I2C libraray I found and looks a bit like yours (there seem to be quite some with that name)

But until now without succes and now I have to go. You could try with an older version from Pre Arduino 1.0 which may work better with Gen7.


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: Repetier with i2c LCD - Not initing
January 17, 2013 01:14PM
): older then SD breaks again...

Will see if I have enough pins to just scratch I2C until this becomes stable

Peter
Re: Repetier with i2c LCD - Not initing
January 17, 2013 01:27PM
I meant an older I2C library. I2C should be independent of the SPI stuff.

But now you see why I prefer my own I2c solution independent of any board driver:-)


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: Repetier with i2c LCD - Not initing
January 17, 2013 01:33PM
I do now indeed! Much less gray hair...

Will maintain trust in your driver rather... In a hurry to get my rack printing PC less as Serial and PC issues costs me a small fortune in wasted prints, and time wasted when it doesnt want to connect and i have to do a poweron/poweroff/reset/reboot dance to get USB to connect (which all firmwares and all USB solutions do equally bad)

Will check pins tomorrow.

In the meantime, if you find anyone who is running Dev branch, with 1.0.3 on a Gen 7, let us know(;
Re: Repetier with i2c LCD - Not initing
January 18, 2013 03:25AM
Hi Peter!
As you might know i've experienced the same problems on my experiments with i2c lcd and repetier fw. I've stoped my researches at that time and implemented the LiquidCrystal_I2C lib to marlin which works just fine (unfortunately my pull request wasn't accepted till now). If you have compile problems, the Arduino-Gen7 Support Files from the Marlin repository may be worth a try.

by the way:
have you seen my post to your "Brown-out Issue" on Marlin github? Have you allready changed L1 on Gen7 to 10uH?
We've identfied this issue cause one user had brown-outs by activating the i2c lcd option in Repetier FW....
Re: Repetier with i2c LCD - Not initing
January 18, 2013 08:50AM
Have not tried Repetier-dev branch on Marlin's Gen 7 cores yet - good idea! Will give it a try after work!

I actually have not changed L1 yet, as I still maintain that if Repetier and Teacup runs, why does Marlin cause a brownout... Must be a configuration issue, perhaps some pin being put in wrong state or something. Those tests were without any accesories plugged in, just bare boards

Also not powering the LCD from the filtered circuit anyway

Peter
Re: Repetier with i2c LCD - Not initing
January 18, 2013 10:34AM
Great suggestion! Compiled with SD Support and LiquidCrystal_I2C.h using Marlin_Arduino1_test branch's Gen 7 add-on instead of Traumflug's without any tuning.

Turned of Repetiers Pre-1.0 Compatibility with
//#define COMPAT_PRE1

Just mid print, as soon as print is done it is time to Flash and see if it works!

Peter
Re: Repetier with i2c LCD - Not initing
January 18, 2013 01:01PM
Hmmm, now things get interesting...

With the new Marlin cores, I can actually run the I2C Scanner sketch - and it DOES NOT FIND an i2c device!

wire my shield pins to my Uno, same sketch, finds device on 0x38 no problem!

I did not understand TimoS's request below. Where can I turn I2c on/off? Checked fuse calc, only mention JTAG (which is disabled)

[edit]
After a few minutes of reminiscing... I now remember the last time I did get it working, was on a 644. Ticked of that part of development. Then bough 1284s as adding SD was too big for 644 - worked on SD for a while to get it working. Now last few weeks with integration, could not get i2c working again! Of course since forgotten the switch from 644 to 1284!!!

This must be it!

Googled, can't find why the 1284 TWI/i2C does not work out of the box - its not fuses

Anyone got it working on a 1284 with I2C yet?

Peter

[ /edit]


TimoS Wrote:
-------------------------------------------------------
> Compile with 0 errors/warnings? I²C switched off
> in PRR? (power reduction register) SCL toggle at
> startup?

Edited 2 time(s). Last edit at 01/20/2013 02:09AM by peter6960.
Sorry, only registered users may post in this forum.

Click here to login