Jump to content
43oh

Very Basic HD44780 driver for Stellaris LaunchPad


Recommended Posts

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Here's a very basic HD44780 driver for Stellaris Launchpad.   Supports up to 20x4 LCD and a full PORTB register is used. Due to the nature of the GPIOPinWrite function which uses masking and whatnot

R/W pin should not be left floating. Tie it to ground (1 = Read, 0 = Write) - the library just writes commands to the LCD module

Thanks a lot ! Problem solved After grounding R/W pin display started to work.     Thanks guys !

Posted Images

  • 1 month later...
  • 2 weeks later...
  • 1 month later...

It doesn't use Port D as an output. From my understanding the code does nothing with Port D so putting it as an output to the LCD you should get nothing.

 

But anyways I am having problems trying to get my LCD display working. It is a 16x2 display. I have tried using 3 different programs to run it. One being the one given here, also tried the program given here http://forum.stellarisiti.com/topic/384-simple-hd44780-library-without-driverlib/ And also tried modifing a program for the LM3SXX microcontroller. All of which seemingly do nothing to the LCD.

 

Turning on the LCD I get the boxe's as "remick" was getting originally. I have the R/W grounded and I cannot change anything on the LCD display, cant even clear it. I tried using 2 different microcontroller boards and two different LCD display's and get the same thing.

 

I am trying to run the code in the CCS Debugger, and I am not sure if it is working properly. I had the microcontroller runing the Project 0 before and when I Debuged the LCD Display the microcontroller Blue LED stay's on. I noticed in all your pictures the build in LED's on the microcontroller are not on. I'm not sure if this has anything to do with the problem or not I am just confused.

Link to post
Share on other sites
  • 3 months later...

Is there a specific reason you use Port B for the RS and E signals? Is it possible to put these on another Port?

 

I would guess that Port B was used because it is the only full width port that is easily available on the launchpad.  

(Doesn't have some of the pins devoted to special functions).

 

It would be fairly easy to put them on another port - just rewrite the code a little.

e.g. define a new port macros for LCDPORT_RS and LCDPORT_E

run through the code and every place it does a pin write to RS or E, replace LCDPORT with the appropriate one of the above macros.

In the beginning of initLCD, enable the other port(s) and set E and RS as output.

The code in beginning of initLCD would wind up something like this


	SysCtlPeripheralEnable(LCDPORTENABLE);
	SysCtlPeripheralEnable(LCDPORT_RS_ENABLE);
	SysCtlPeripheralEnable(LCDPORT_E_ENABLE);

        GPIOPinTypeGPIOOutput(LCDPORT, D4 | D5 | D6 | D7);
	GPIOPinTypeGPIOOutput(LCDPORT_RS, RS);
        GPIOPinTypeGPIOOutput(LCDPORT_E, E);

 

Link to post
Share on other sites

Okay, that was what I was thinking, but the two examples I've seen both used those Port B pins even though they used different data pins.

 

I wanted to use Port B for other functions and all the pins there are currently taken up. I'm writing my own code based on the example here and am going to rewrite the macros to use Port A instead.

 

The end goal is to be able to write to shift registers serially and then output them in parallel to matrixes of LEDs.

Link to post
Share on other sites
  • 2 weeks later...
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...