Author Topic: Reading a register?  (Read 945 times)


  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Reading a register?
« on: June 03, 2018, 01:58:48 PM »

How would one read a register's contents? I'm trying to simplify my driver for the NHD-0420CW-AY320. Because some of the US2066 registers combine functionality of more than one setting, I initially wrote my driver the same way. For example, the common and segment bi-direction function are bits set in the same register, so I wrote my high-level function in a similar way: SetComSegBiDirection(com, seg). I'd like to separate things like this out, so in order to do it properly, if I want to for example change the 'seg' bi-direction only, I'd need to first read the settings of the register from the US2066 in order to preserve the current setting of the 'com' bit, then write the OR'd settings back to the US2066. I realize I could maintain a separate copy of the register settings on my MCU before writing them in the first place, but my feeling is it's better to query the display controller for the setting instead.
It wasn't obvious to me looking at the datasheet how to read a register - only how to read DDRAM/CGRAM.


EDIT: I forgot to mention: I connect using I2C
« Last Edit: June 03, 2018, 02:00:55 PM by avsa242 »


Problem setting "function select c" register

Started by jonmon6691Board OLEDs

Replies: 3
Views: 4608
Last post May 04, 2016, 02:44:37 PM
by Saurabh_B
Text orientation not changing with Extended Entry Mode Set Register

Started by tekknojoeBoard OLEDs

Replies: 5
Views: 4542
Last post January 27, 2017, 10:13:57 AM
by jmadsenee
Issue with reading busy flag in 4 bit mode.

Started by SwemarvBoard Character LCDs

Replies: 6
Views: 8826
Last post September 26, 2015, 10:12:49 AM
by acain829
ILI9341 Reading Display RAM

Started by JRBrownBoard TFTs

Replies: 1
Views: 3639
Last post May 04, 2015, 01:36:09 PM
by Michael_L
Reading display memory

Started by durianBoard TFTs

Replies: 2
Views: 3433
Last post August 07, 2015, 11:41:09 AM
by durian