micropython-Chinese-Community / mpy-lib

HTS221, LPS22, LIS2DW12, LIS2MDL, LSM6DSO, STTS751, si7051, bme280, bmp280, APDS9930, TM1650, TM1637, LCD1602, GNSS, all kinds of micropython drives, examples, libs
MIT License
170 stars 73 forks source link

Russian letters #11

Closed AlekseyMS closed 2 years ago

AlekseyMS commented 2 years ago

Hello. How do I add a display of Russian letters?

shaoziyang commented 2 years ago

First you need a Russian font, usually we use a dot matrix font of equal width. When it needs to be displayed, read the font file and display it. In some cases, font files need to be converted for quick display.

AlekseyMS commented 2 years ago

The display supports Russian letters. I attach the documentation. For some reason, there is an offset of 10 characters according to the table on page 9. For example, I enter the letter "ц", the display outputs "F". Can set the offset somehow. The display is slightly different, but it works similarly to the 1602 MT-20S4M_en LCD.pdf .

AlekseyMS commented 2 years ago

Or tell me another solution. Thanks

shaoziyang commented 2 years ago

MT-20S4M is similar to LCD1602, but with two build font pages. In every page, 0x20-0x7A is normal char, same as LCD1602, Russian char in high area. I think you may display Russian letters by write corresponding code to ram.

  1. Set DDRAM Address
  2. Write Data to RAM
AlekseyMS commented 2 years ago

Can you write how it will look in the code? Interested in modifying the library to work with the display 2004. MT-20S4M I do not plan to use.