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.

Messages - jonmon6691

Pages: [1]
OLEDs / Re: Problem setting "function select c" register
« on: May 04, 2016, 01:10:09 PM »
I tried writing 0xDC00 to that register and still have the same problem.

Is there a way to query the value of a register? The only reason that I'm writing to it, is that my library maintains the POR state of all the registers locally. This allows me to change individual bits and keep track of the state of the other bits in the same register. This requires a register sync during initialization in which I write a known state into every register. It's not strictly necessary to do this with function select c, since I have no immediate use for it, but I would like it to work for the sake of completeness. This would all be unnecessary of course, if the state of the internal registers could be read back.

Here's where I got 0x02 as the power on state, I was assuming (RESET) was meant to indicate the POR value

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]
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);

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]