Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrast assignment wrong for DOGXL240 #340

Open
GoogleCodeExporter opened this issue Jul 6, 2015 · 1 comment
Open

Contrast assignment wrong for DOGXL240 #340

GoogleCodeExporter opened this issue Jul 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Thanks for reporting this. It seems to be a bug.

Please locate this file/code in your folder structure:
https://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_uc1611_dogxl240.c
Setting of the contrast is done in lines 102

The wrong code is this:

   case U8G_DEV_MSG_CONTRAST:
     u8g_SetChipSelect(u8g, dev, 0);
     u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
     u8g_WriteByte(u8g, dev, 0x81);
     u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);  /* set contrast from, keep gain at 0 */
     u8g_SetChipSelect(u8g, dev, 1);
     return 1;

Correct code sould be:

   case U8G_DEV_MSG_CONTRAST:
     u8g_SetChipSelect(u8g, dev, 1);
     u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
     u8g_WriteByte(u8g, dev, 0x81);
     u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);  /* set contrast from, keep gain at 0 */
     u8g_SetChipSelect(u8g, dev, 0);
     return 1;


see http://forum.arduino.cc/index.php?topic=322256.new#new

Original issue reported on code.google.com by [email protected] on 12 May 2015 at 12:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant