Blinking Double Height Font NHD-0216CW
Hi.
I am using double height font with the NHD-0216CW. I would like to create a blinking effect by writing to DDRAM address 0x00 and 0x40 and switching between the two addresses. For example, i would write the following to each address:
0x00: 'Test: On'
0x40: 'Test: '
By switching between the two addresses, the right hand side of the display would appear to blink. This is to highlight to the user that the text 'On' is modifiable.
Currently I re-write to the display when I want the switch/blink to occur. But I suspect there is a better way to do this.
Thanks.
-
Hi Matthew,
Unfortunately, the display is not capable of having one side or portion of the display have a blinking effect, while leaving the other side alone. However, we can manipulate the commands and delays to help simulate this effect.
I would recommend adding a command in the display function, similar to how you've written, that writes to the DDRAM address as follows:
0x00: 'Test: '
This allows you to have the data text you want displayed at all times.
Then, you can incorporate two commands in the loop function, also similar to how you've written, that also write to a DDRAM address that is on the right side of the display. For example:
0x08: ' '
0x08: 'ON'
By writing those two commands to the same memory address in the loop function, you are overwriting that memory location every so often, which can help create the blinking effect, without having to manually re-write to the display each time.
I would also make sure the delay, for right after the data is latched, is set at most 1 millisecond. Anything over that, and it may not resemble the blinking effect you are looking for.
Hope this helps!0
Please sign in to leave a comment.
Comments
1 comment