eaquinte,
I was writing an A*****o style library for a LCDs with a PCF8574 based I2C backpack module and when I did a search of the Forum I found that this has already been done.
In 2015
rolfi@tisco.no posted an include file here
https://picaxeforum.co.uk/threads/subs-macros-for-i2c-displays.28211/ with the code to drive one of the 1602 LCDs with a PCF8574 based I2C backpack module like you describe.
Speddo posted his update of rolfi's include file together with two demo programs in this post:
https://picaxeforum.co.uk/threads/subs-macros-for-i2c-displays.28211/post-334059
Download the three files from Speddo's post into the same directory
Rename the file SubsMacros_Serial_LCD.txt to SubsMacros_Serial_LCD.basinc
Update Test_The_Include.bas demo program to use a 20M2 instead of a 14M2
and try downloading Test_The_Include.bas into your 20M2 chip.
I don't own a 20M2 chip but I just tested Speddo's demo program Test_The_Include.bas on a 14M2 chip and it worked first time.
Note that you may need to adjust the LCD contrast using the pot on the PCF8574 based I2C backpack module to see the displayed text.
The file SubsMacros_Serial_LCD has the following list of the functions that the library contains and the test program Test_The_Include.bas calls several of these functions to show how they are used.
;--------------------------------------------------------------
; InitD Initialize display
; ClrD Clear display
; WriteN(number,"R") Write byte or word number at
; WriteN(number,"L") cursor pos, right or left adjust
; WriteC(byte) Write char at cursor pos (byte)
; GotoXY(xpos,line) Place cursor at pos x, line y
; EraseC Erase character at cursor
; EraseCN(N) Erase N char starting at cursor
; BackStp Backstep cursor
; HideCur Hide cursor
; BlinkCur Blink cursor on top of ev. char
Once you have it working with your 20M2 and 1602 LCD with an I2C module you can try out calling these other functions.
You must call the InitD fuction first, to initialize the 1602 LCD display, before you call any or the other functions.
'Initialise the display
InitD ;initialise LCD