1
\$\begingroup\$

I am looking at interfacing to a HD44780 LCD display with an STM32VL discovery board. I am aware drivers exist but in the interest of learning I am doing it myself.

I am curious about the interaction between the DDRAM, CGROM and CGRAM. In the HD44780 datasheet an example of writing letters is given:

enter image description here

When I read the datasheet the character information for H (or any predefined letter/symbol) is in the CGROM as 01001000, as seen in the image. However it states that it is writing data to the CGRAM/DDRAM. I understand the CGRAM provides space for user created letters/symbols. So why does it state that we are writing to CGRAM and not accessing CGROM to create the pre-defined letter H which is stored in CGROM? (or any letter for that matter)?

Any help would be greatly appreciated!

Cheers

\$\endgroup\$
1
\$\begingroup\$

You write "1001001000" into the DDRAM. The controller then searches the CGROM for that value and displays the character it finds at that value.

Because you are currently writing into the DDRAM, and have not sent the command to switch into the CGRAM. It requires an additional command to switch between them.

When you send the CGRAM data, then send the DDRAM the corresponding address for the CGRAM character you created, the controller then references the CGRAM for the data.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.