Go to advanced search

by pkhandelwal
Sat Aug 01, 2015 2:37 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

OK, I got it working!! :D It was a wire problem. One of the data wire was faulty. :cry: Thank you very much DougieLawson and all the guys for their time and inputs. Even though the problem came out to be a different one than I thought, I still learned new things from you guys. Thanks a lot again :)
by pkhandelwal
Sat Aug 01, 2015 12:22 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

I checked many times, but GPB0-GPB3 are wired correctly. What else I can check?
by pkhandelwal
Sat Aug 01, 2015 11:32 am
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

Check your Wiring. http://i2.wp.com/tronixstuff.com/wp-content/uploads/2011/08/pinouts.jpg My code uses GPIOB / OLATB GPB0 (pin#1) :arrow: LCD_D4 (pin#11) GPB1 (pin#2) :arrow: LCD_D5 (pin#12) GPB2 (pin#3) :arrow: LCD_D6 (pin#13) GPB3 (pin#4) :arrow: LCD_D7 (pin#14) GPB4 (pin#5) :arrow: LCD_EN (pin#...
by pkhandelwal
Sat Aug 01, 2015 5:32 am
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

Here it is what I have tried so far. I tried using DougieLawson's C library but it didn't worked either. I changed the wiring as suggested in the readme file before using Dougie's code. Compilation was successful, but when I execute the i2clcd noting happened, the terminal just frozen up. I have to ...
by pkhandelwal
Fri Jul 31, 2015 3:22 am
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

Douglas6 wrote:Adafruit has a Python library for their 16x2 display wired to an MCP23017: https://github.com/adafruit/Adafruit_Python_CharLCD.git. I'm not saying it's wired the same way.
Thanks!! I will try it tonight and let you know.
by pkhandelwal
Fri Jul 31, 2015 3:21 am
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

http://i.stack.imgur.com/Dk1kz.png What's that MCP23017 doing there? Why are you trying to use the GPIO library when your LCD is connected on the MCP23017 on the I2C bus? You need to find a python library that will drive an LCD on I2C (device 0x20) on GPIOA on the MCP23017. My C code sample has a I...
by pkhandelwal
Thu Jul 30, 2015 3:57 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

Massi wrote:
pkhandelwal wrote:

Code: Select all

pins_db=[4,5,6,7]
i don't know the code, but are you sure this has not to be

Code: Select all

pins_db=[7,6,5,4]
?

if you swap datalines you'll get "something" on the display, but not what you expect (blocks and broken chars)
I tried changing the pins, but still same blocks are being displayed on the LCD.
by pkhandelwal
Thu Jul 30, 2015 1:59 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

This is the wiring I have done. As I mentioned, I don't have a 10k pot. right now with me. I will get it in a day or 2. The Adafruit library has a constructor which I am overriding by passing my pin numbers when I am initializing it. http://i.stack.imgur.com/Dk1kz.png This is the code I have for ini...
by pkhandelwal
Wed Jul 29, 2015 3:04 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

Try using my C program, if that works then we know it's a bug in Adafruit's python library. If it doesn't work then it's a hardware problem. The common hardware problem with LCDs is not wiring a 10K pot on the V0 pin. When the voltage on V0 isn't present (you get a blank display) when it is 5V0 you...
by pkhandelwal
Tue Jul 28, 2015 4:04 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

BMS Doug wrote:do you mean the MCP23017 example code or the LCD example code?
MCP23017 example. I am using the sample code from their git repo and have connected the pins as per the code. But when I run it, the LCD displays blocks in the first line of the LCD. I have checked and re-checked the wiring.
by pkhandelwal
Tue Jul 28, 2015 3:35 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

One more thing, I am using python for development. Just wanted to know if there is something I can do with Python code from the Adafruit library to make it working.
by pkhandelwal
Tue Jul 28, 2015 2:51 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

Re: 16x2 LCD displaying blocks when connected with MCP23017

DougieLawson wrote:Try this: https://github.com/DougieLawson/Raspber ... nified_LCD that's running right now on a RPi with a quick2wire MCP23017 I2C expansion board.
Thanks! I will try and post the update here.
by pkhandelwal
Tue Jul 28, 2015 1:49 pm
Forum: Beginners
Topic: 16x2 LCD displaying blocks when connected with MCP23017
Replies: 24
Views: 5801

16x2 LCD displaying blocks when connected with MCP23017

I am using a 16x2 LCD and have it connected with MCP23017 16-bit IO port expander. To display message to the LCD, I am using Adafruit LCD library. The also have a test python code to get it working with MCP23017. I have changed the pin according to the connections I have made but it seems to be disp...

Go to advanced search