DMC 16204 LCD - On a whim

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Found one of these 2 line by 16 character LCD displays in my junk box. On a whim, I thought to hook it to a chip and display some gibberish.

I find a PDF with descriptions of the 15 pins and timing diagrams, but no command information. Seems to me these had commands to move to a position, write a string...

Anybody know where to find a description? I'm not above trying to use a library. Maybe there's one in the toolchain? This module has the 15 pins,

1. Ground
2. +5
3. VEE
4. Register Select
5. Read/Write
6. Enable
7. DB0
8. DB1
9. DB2
10. DB3
11. DB4
12. DB5
13. DB6
14. DB7
15. NC

I see it has a 4 bit and an 8 bit mode. My stupid idea only needs a couple other IOs, so I figured on using PB0-7 for the display, some others for Register Select, Read/Write and Enable.

(No, it's not for the Shakespearean insult program, though that does sound fun.)

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like a Regular Ol 44780 textmode to me.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah! I figured it was a regular old something. That's it. Now Google gives me http://josepino.com/circuits/hit... that tells me lots about how to work it.

hmm. Maybe I will use it for the shakespeare insult program. Naa.. Other idea is funner.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm not above trying to use a library. Maybe there's one in the toolchain?

The avrlibc documentation contains an example on usage with avr-gcc.
We have loads of discussions on 44780 displays here (at least two active right now).

I suppose you can learn all ins and outs of these displays w/o actually leaving AVRfreaks. :wink:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now that I know what to search for. Search would either get me 0 threads, or 1165 unrelated threads, and I couldn't get anything in between.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I search "hd44780" here I hit 1075 threads. Rather ironically they almost all say exactly the same thing...

Every HD44780 thread ever written here wrote:
OP: here's some code I cobbled together from not totally understanding the datasheet and I'm a bit unsure about what to do with pin 3

expert: put a pot across Gnd/Vcc and connect pin 3 to the wiper set initially to about 0.1 to 0.2V. Then get some proven library code either (a) that came with your compiler, or (b) library code from Peter Fleury or Pascal Stand or Peter Danneger (danni) or Johan Ekdahl (for simple - just prove it works code)

OP: yeah but here's the code I wrote

expert: yeah but forget that and use some proven code until you are sure the electronics is all proven - THEN start messing with the home brew if you want to do that rather than simply using the display to get on with something else

OP: yeah but I'm pretty sure I got the delays in the init() code right

expert: no you didn't - have you tried the library code yet

OP: so if I make the delay a bit longer do you think it will work

expert: do you speak English?


No one it seems is willing to look at proven wiring projects or library code as it seems to be a case of "giving in".

(the same people probably write their own printf() as they "don't need no stinking C library code")

So just pick any one of the 1075 hits and follow what it says - they are all the same.

(thinks: wonder how many times "hd44780" appears in the tutorial forum .. I wonder...)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, now that I know to look for 44780, I find those threads too. Before I could find nothing. Bob gave me the key and now I have lots of information.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Now that I know what to search for. Search would either get me 0 threads, or 1165 unrelated threads, and I couldn't get anything in between.

Are you using the quick search in the left column, or are you using the full-fledged search (link at the top of every AVRfreaks) page. Use the latter, and mark the check-box "Search for all words". Does wonders for quality of search results most of the time!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree people seem to have a lot of trouble using 44780 displays. Or maybe it's just the selection effect, since those without problems don't post that everything works fine for them. But don't get the impression that they're byzantine. They can be made to work from just reading the datasheet, and the code is not at all complex. Just FWIW.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
They can be made to work from just reading the datasheet, and the code is not at all complex.
But they're not like horseshoes or shotguns. Close is not good enough, you have to be right on. If you don't get everything implemented correctly the result is a display that does not display anything (except maybe a row of boxes).

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The code doesn't seem particularly hard, though you have to watch the delays and initialize it with the 3 commands. Finding the right doc was the trick. My PDF for the part listed the electrical signals, and lots of visual specifications for the LCD, but nothing about programming it.

Now I have my little board laid out. Saturday AM, or maybe tomorrow night, I'll etch one, slobber it together and see if I can make it say, "Heavens to Mergatroid," or something equally meaningless. Once I achieve that, then make the real program.

Read a how-to in "Garden Railways" of how to make a train odometer with an Arduino, LCD shield and an opto interrupter. Decided I wanted one, but don't have an Arduino or LCD shield in the junk box. I found some Hall Effect sensors, strong magnets, and this old display that I'd bought long ago with another project in mind. Add a Tiny 2313, and Bob's your uncle! The application is easy, count pulses, do a little arithmetic and display the result. Might even use a timer to keep time and figure the speed. The R/C osc should be at least as accurate as a car's speedo.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And if it seems like your power supply is always shorted, check that some goofball didn't solder your chip in backwards.

Goofball at your service.

"I looked for the 1!"

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ha ha!

And the barefoot brat accomplishes in mere weeks what would take the average freak hours to do!

The largest known prime number: 282589933-1

In my humble opinion, I'm always right.