MX7 and I2C LCD

Post Reply
aabfm
Posts: 31
Joined: Mon Aug 14, 2017 4:28 pm
Location: UK

MX7 and I2C LCD

Post by aabfm » Tue Sep 12, 2017 1:13 pm

Hi everyone,
Here is another bit I have been looking around for some clue but everything is down to Arduino only.
I bought on eBay one of those very common 20x4 LCD displays already with an I2C converter at the back.
Simple question: does anyone know how to make this display to work on a MX7 platform? or where can I get information on how to make it work?
All the sketch examples on UECIDE point to Arduino but not to MX7.
As a quick note I've already tested it with a standard Arduino Uno and it works perfectly.
Thanks in advance.

aabfm
Posts: 31
Joined: Mon Aug 14, 2017 4:28 pm
Location: UK

Re: MX7 and I2C LCD

Post by aabfm » Tue Sep 12, 2017 2:37 pm

I've just downloaded a LiquidCrystal_I2C library which requires the wire.h library. Is it possible to use it directly with the MX7?
If so how can I define which of the I2C ports to use?
Thks

aabfm
Posts: 31
Joined: Mon Aug 14, 2017 4:28 pm
Location: UK

Re: MX7 and I2C LCD

Post by aabfm » Tue Sep 12, 2017 6:48 pm

After trying the library, although the LCD display worked as expected I had this message back from UECIDE:
• Error at line 1145 in file cpudefs.h:
‣ "OPT_BOARD_INTERNAL" redefined [enabled by default]

User avatar
majenko
Site Admin
Posts: 2179
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: MX7 and I2C LCD

Post by majenko » Wed Sep 13, 2017 12:52 pm

It's just a warning and can be ignored. It's because UECIDE defines that symbol as default and the chipKIT core redefines it. It's not actually a problem, just noise.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

aabfm
Posts: 31
Joined: Mon Aug 14, 2017 4:28 pm
Location: UK

Re: MX7 and I2C LCD

Post by aabfm » Wed Sep 13, 2017 4:20 pm

Hi,
Actually I've 'solved' it by commenting line 1145 with the "#define" statement as shown below:

Code: Select all

//Fix issue 213
#ifndef __PIC32_PPS__
  //#define OPT_BOARD_INTERNAL
#endif
No more warnings.
BTW the cpudefs.h is located at:
/home/user/.uecide/cores/chipkit/pic32

aabfm
Posts: 31
Joined: Mon Aug 14, 2017 4:28 pm
Location: UK

Re: MX7 and I2C LCD

Post by aabfm » Wed Sep 27, 2017 12:51 pm

If you want the location in Windows it will be
C:\Users\<username>\AppData\Local\UECIDE\cores\chipkit\pic32

Post Reply