LCD16-02 I2C How to adresse it in a Byte form?



How can i adresse my LCD16-02 I2C Display?
Its says that the ADDR must be in bytes?
Isn’t it Hec dec or numbers?
XOD guides on youtube shows the ADDR pin in number form ?

Im so confused :stuck_out_tongue:


It is a decimal # (at least in version before 0.21.0…I don’t think that was one of the changes made), but # must be <255, hence the term “byte”.

Note that I2C addresses are usually given as Hex numbers in documentation, so you will need to convert that to decimal when using XOD patches.



It just sways Byte? :stuck_out_tongue:



And it always adds the d to the ADDR… Shouldn’t it be Decimal like 63 = 0x3F ?


Hello. Since from 0.21.0 XOD has a Byte type. Among other things, It is used to specify ADDR’esses of I²C devices. You can specify it in the decimal, hexadecimal, or binary form in Inspector. The following values are :100: equivalent:

  • 63d (d suffix = decimal)
  • 3Fh (h suffix = hexadecimal)
  • 00111111b (b suffix = binary/bits)

Use one that makes more sense in a particular case. As @gweimer said, documentation and datasheets usually specify the addresses as a hexadecimal (3F, 3Fh, or 0x3F), so it’s quite logical to use the hexadecimal XOD byte form (3Fh) for I2C addresses. No conversion is necessary now.

BTW, even if you enter 0x3F (C++ hexadecimal) via Inspector, XOD will understand it and auto-fix to canonical 3Fh.



Stil dosen’s work ? Am i still doing something wrong?


:thinking: You’ve set it right. Do you see nothing on the display? If so, please share Deploy → Show Code for Arduino as is. I’ll try to take a look.


In version 0.22.0 you van use hex notation e.g. 3fh


C code.txt (29.0 KB)

Here is the code

Thanks for helping nkrkv :smiley: