Subs/macros for I2C displays

A while ago I asked the forum about how to use these cheap ebay I2C displays (like Hitachi 1602), and I was made aware of work by Rick100 and Hippy.
Based on their work, I made an #include file containing macros and subroutines implementing these display functions for ..M2 chips:
; InitD......................... Initialize display
; ClrD..........................Clear display
; WriteN(number,adjust)...Write byte or word number variable or constant at cursor pos, right og left adjusted
; 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
; push(mspar)..............Push/pop var or const onto/from stack,
; pop(mspar)................beginning at RAM loc 127 and downwards

Quite useful , and to anyone who might like to use the file, please find it attached. Just replace .txt with .basinc before use. (That file extension is not accepted for upload to the forum)

The file Displaytest.bas is a kind of demo/test file for the #include file itself.
It seems to work well, but of course, there might be undiscovered bugs, so no guarantee issued
If this is posted to the wrong part of the forum, I trust it can be moved to the proper place..
 

Attachments

hippy

Technical Support
Staff member
I have copied the post over to the Finished Projects / Code Snippets section of the forum.
 
Top