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

Not right setup contrast for driver u8g_dev_ssd1309_128x64_fn #327

Open
GoogleCodeExporter opened this issue Apr 13, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

Not right setup contrast for driver u8g_dev_ssd1309_128x64_fn

File "u8g_dev_ssd1309_128x64.c"

uint8_t u8g_dev_ssd1309_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void 
*arg)
{
...
    case U8G_DEV_MSG_CONTRAST:
      u8g_SetChipSelect(u8g, dev, 1);
      u8g_SetAddress(u8g, dev, 0);          /* instruction mode */
      u8g_WriteByte(u8g, dev, 0x081);
>>>>> u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
      u8g_SetChipSelect(u8g, dev, 0);      
      return 1; 
...
}

u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2) - not right,

must be

u8g_WriteByte(u8g, dev, (*(uint8_t *)arg));

Original issue reported on code.google.com by D.Sheshu...@gmail.com on 4 Mar 2015 at 8:07

@GoogleCodeExporter
Copy link
Author

Correct. Thanks for the bugfix.

From the datasheet:
10.7
Set Contrast Control for BANK0 (81h)
This command sets the Contrast Setting of the display. The chip has 256 
contrast steps from 00h to FFh. The
segment output current increases as the contrast step value increases. 

Original comment by olikr...@gmail.com on 6 Mar 2015 at 5:25

  • Added labels: Milestone-1.18

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