Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - jonmon6691

Pages: [1]
1
OLEDs / Problem setting "function select c" register
« on: May 03, 2016, 09:38:59 PM »
I have my NHD-0220CW-AR3 working fine, but I can't seem to get the "Function Select C" command to work. The datasheet says the POR value should be 0xDC02, I am pretty sure I have the SD bit set before I send the command too.

Here's a snippet:
Code: [Select]
set_sd(d);
command2(0x81, d->sd_reg_contrast); // This function works, can see the contrast change. so set_sd() and command2() must work...?
command2(0xD5, d->sd_reg_clock);
command2(0xD9, d->sd_reg_phase_length);
command2(0xDA, d->sd_reg_SEG_config);
command2(0xDB, d->sd_reg_Vcom_deselect);
command2(0xDC, 0x02); // This line stops the display from working (cursor and display enabled elsewhere) commenting it out makes the code work
//command2(0xDC, d->sd_reg_function_select_c)
//command2(0x23, d->sd_reg_blink_fade);
clear_sd(d);

The weird part is that I've tried all possible values for VSL bit and GPIO bits and they all keep the display from turning on. Never sending the command to 0xDC** is the only way to get it to work.

I can post more code if needed

Pages: [1]