Author Topic: Problem setting "function select c" register  (Read 2271 times)

jonmon6691

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
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

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Problem setting "function select c" register
« Reply #1 on: May 04, 2016, 08:38:51 AM »
The VSL pin is left open on these displays, modifying this value might make the display not work.

However I don't believe that the value is 0x02 on Reset. I believe that 0x02 might actually reset some registers on the display.
In our recommended initialization sequence we do set the whole register to 0.

jonmon6691

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Problem setting "function select c" register
« Reply #2 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
« Last Edit: May 04, 2016, 01:39:39 PM by jonmon6691 »

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Problem setting "function select c" register
« Reply #3 on: May 04, 2016, 02:44:37 PM »
Unfortunately there is no way to read the individual registers for this display.
However when you do change the value of this register it does disable your display.

Looking at the datasheet I would have also assumed that the POR was 0x02. The rest of the commands on the controller datasheet have the default values labeled as (POR) rather than (Reset).
Since these are GPIO pins, I am assuming that it is referring to the physical act of "resetting" these pins, or putting them into a low state.

 

NHD‐3.5‐320240MF‐ATXL#‐CTP‐1 Problem with standby mode

Started by guenterBoard TFTs

Replies: 0
Views: 1929
Last post June 16, 2016, 12:14:36 PM
by guenter
NHD‐2.4‐240320SF‐CTXL#‐FTN1 touch-screen problem

Started by hbcelebiBoard TFTs

Replies: 5
Views: 4160
Last post December 10, 2014, 11:19:05 AM
by Michael_L
Working on NHD‐2.4‐240320SF‐CTXL#‐FTN1, have problem in initialization

Started by sli25Board TFTs

Replies: 6
Views: 3772
Last post June 04, 2015, 09:52:25 PM
by sli25
Problem in bringing up NHD‐2.4‐240320SF‐CTXL#‐FTN1 on Renesas RL78/G14

Started by sli25Board TFTs

Replies: 3
Views: 3042
Last post May 28, 2015, 02:59:03 PM
by Michael_L
problem with NHD‐2.23‐12832UCB3

Started by luisvalsecaBoard OLEDs

Replies: 1
Views: 880
Last post January 24, 2017, 02:52:53 PM
by Saurabh_B