Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LCDi2c.pde It doesn't work as expected.
03-06-2019, 07:02 PM, (This post was last modified: 07-06-2019, 05:11 AM by orlandomax. Edit Reason: Add information )
LCDi2c.pde It doesn't work as expected.
It doesn't work as expected.

In the example LCDi2c.pde the variable "I" is only displayed or counted up to 999, then disappears. Using "lcdi2c.printNumber(intf, i++, DEC);" Only counts up to 99 then shows 3333. I'm using the IDEv12 with pingüino4550.  I ran tests on the IDE11 and this doesn't happen. Does anyone have a solution? Thank you.

In the aggregate image you can see what happens or doesn't happen.

No funciona como se espera.

En el ejemplo LCDi2c.pde La variable “I” solo se muestra o cuenta hasta 999, luego desaparece. Usando “lcdi2c.printNumber(intf, i++, DEC);” solo cuenta hasta 99 luego muestra 3333. Estoy usando el IDEv12 con pingüino4550. Hice pruebas con el IDE11 y esto no pasa. ¿alguien tiene una solución?. Gracias.

En la imagen agregada pueden ver lo que pasa o que no pasa.

Attached Files Thumbnail(s)
06-06-2019, 07:51 PM,
RE: LCDi2c.pde It doesn't work as expected.
I think it's a problem with the SDCC compiler. I tested with the XC8 compiler and worked as it should.

Creo que es un problema con el compilador sdcc. hice pruebas con el compilador XC8 y funciono como debe.
07-06-2019, 05:20 AM,
RE: LCDi2c.pde It doesn't work as expected.
This is the example I try to run with the SDCC compiler in the Ide12

const u8 intf = I2C1;
u16 i=996;

void setup()
   lcdi2c.init(intf, 16, 2, 0x3F, 4, 3, 2, 1, 0);//modulo hecho por mi(0X3F)
   lcdi2c.noBacklight(intf);          // turns backlight off (for DIY module or DFRobot)
   lcdi2c.clearScreen(intf);          // clear screen
   lcdi2c.home(intf);                 // set cursor at (0,0)
   lcdi2c.print(intf, "lcdi2c demo");

void loop()
   lcdi2c.setCursor(intf, 0, 1);     // set cursor at col 0, line 1,
   lcdi2c.printf(intf, "i=%u ", i++);
   lcdi2c.print(intf, "i=");
   lcdi2c.printNumber(intf, i++, DEC);
   lcdi2c.print(intf, " ");
   LATAbits.LATA4 ^= 1;//toggle(USERLED);// alternate ON and OFF

If anyone has a light thank

Forum Jump:

Users browsing this thread: 3 Guest(s)