Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfacing Max 32 with Hitachi HD44780 lcd screen using hello world example #62

Closed
rajjarl opened this issue Jul 22, 2011 · 5 comments
Closed

Comments

@rajjarl
Copy link

rajjarl commented Jul 22, 2011

Overall Description:
I am using Arduino 0022 IDE with a max 32 board and I have a standard 16 x2 Hitachi HD44780 liquid crystal display that I am trying to use with the hello world example.

Problem: The code compiles and uploads fine but nothing prints on the LCD screen.

Hardware Description:
Basically my hardware connection is similar to what is described for arduino uno in the following page:
http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

All I changed for the hardware is that I use random digital pins on max 32 bord instead of what is provide in the above link for the arduino uno board. currently I have the following hardware :

Hitachi HD44780 Max32
GND GND
5V 5V
V0 5v with a 10 k resistor in between
RS pin 22 (digital)
R/W GND
Enable pin 83 (digital/pwm)
DB4 pin 23 (digital)
DB5 pin 24 (digital)
DB6 pin25 (digital)
DB7 pin26 (digital)

Software: I am using the standard LiquidCrystal Library that comes with Arduino 0022 IDE and this library also shows up in the sketch/ import library menu when max 32 board is selected. My sketch is same as the example hello world sketch but just with pin numbers changed :
// include the library code:

include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(22, 83, 23, 24, 25, 26);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 1);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

    So can someone please help me with this problem. I fail to see what did I do wrong. I double checked the hardware multiple times. I also checked the libraries in the MAX_32_IDE\hardware\pic32\libraries\LiquidCrystal   folder and it si same as the one in the main libraries folder. So I don not know what is going wrong. Everything compiles fine uploads to the board fine but nothing comes on the lcd screen. I will really appreciate  any help. I am new to max 32 I just got my board 2 days ago so I am not that confident with it yet

Thank you

@msproul
Copy link
Contributor

msproul commented Jul 22, 2011

You say you are using Arduino 0022 IDE, you have to use MPIDE in order to program the pickit boards.

The most common problem with using the liquid crystal library is making SURE you have the pin numbers correct for how you have it wired.

Mark

@rajjarl
Copy link
Author

rajjarl commented Jul 22, 2011

I am sorry for the confusion, I am using MPIDE (mpide-0022-chipkit-win-20110619 version) to program the max 32 board and I also made sure the pin #s were correct, as I directly match them with the Hitachi HD44780 data sheet. Do you think so I am doing something wrong in terms of software level or the LiquidCrystal library is not comparable with max 32 yet? I mean I am using digital pins such 23,24...26 and so on as described in the hardware section of my original post. So the example code has pins 12, 11, 5, 4, 3, 2 which is for the arduino uno board. so i followed the circuit diagram for arduino uno from following link:
http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

and just used different digital pins and i changed the software in accordance with the digital pins that i used and their given function in the given example

@msproul
Copy link
Contributor

msproul commented Jul 22, 2011

It should work, try some different pins. I have tested the LiquidCrystal library on the chipkit and it works fine.

@rajjarl
Copy link
Author

rajjarl commented Jul 22, 2011

Thank You so much. I found the problem It was the contrast ( pin # 3 on Hitachi HD44780 lcd ) it should be grounded and then it works fine. I really appreciate all your help. This is the best forum. I have never seen this fast replies from forum administrators ever in my life. I really appreciate it. I will try out the Ethernet client example next with the arduino EthernetI shield. If it works I will definitely post it here. This is the best forum ever. Have a nice day. Thank you again

@rajjarl rajjarl closed this as completed Jul 22, 2011
@ricklon
Copy link
Member

ricklon commented Jul 22, 2011

You might need to double check the jumpers for the i2c port. Also, the
max has a different i2c connector than the UNO.

--Rick

On Thursday, July 21, 2011, rajjarl
reply@reply.github.com
wrote:

Overall Description:
I am using Arduino 0022 IDE with a max 32 board and I have a standard 16 x2 Hitachi HD44780 liquid crystal display that I am trying to use with the hello world example.

Problem: The code compiles and uploads fine but nothing prints on the LCD screen.

Hardware Description:
 Basically my hardware connection is similar to what is described for arduino uno in the following page:
http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

All I changed for the hardware is that I use random digital pins on max 32 bord instead of what is provide in the above link for the arduino uno board. currently I have the following hardware :

Hitachi HD44780        Max32
GND                                    GND
5V                                         5V
V0                                       5v with a 10 k resistor in between
RS                                          pin 22 (digital)
R/W                                      GND
Enable                                pin 83 (digital/pwm)
DB4                                    pin 23 (digital)
DB5                                 pin 24 (digital)
DB6                                pin25 (digital)
DB7                                pin26 (digital)

Software: I am using the standard LiquidCrystal Library that comes with Arduino 0022 IDE and this library also shows up in the sketch/ import library menu when max 32 board is selected. My sketch is same as the example hello world sketch but just with pin numbers changed :
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(22, 83, 23, 24, 25, 26);

void setup() {
 // set up the LCD's number of columns and rows:
 lcd.begin(16, 1);
 // Print a message to the LCD.
 lcd.print("hello, world!");
}

void loop() {
 // set the cursor to column 0, line 1
 // (note: line 1 is the second row, since counting begins with 0):
 lcd.setCursor(0, 1);
 // print the number of seconds since reset:
 lcd.print(millis()/1000);
}

       So can someone please help me with this problem. I fail to see what did I do wrong. I double checked the hardware multiple times. I also checked the libraries in the MAX_32_IDE\hardware\pic32\libraries\LiquidCrystal   folder and it si same as the one in the main libraries folder. So I don not know what is going wrong. Everything compiles fine uploads to the board fine but nothing comes on the lcd screen. I will really appreciate  any help. I am new to max 32 I just got my board 2 days ago so I am not that confident with it yet

Thank you

Reply to this email directly or view it on GitHub:
#62

President
Fair Use Building and Research (FUBAR) Labs
http://fubarlabs.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants