LCD Config with Atmega8 & HD44780 lcd

Post Reply
Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hello,

i know, it´s possible to config the wii copter with sparkfun serial lcd. I don´t have a serial lcd, but i have a HD44780 and an atmega8, which "simulates" the sparkfun lcd.

Here is the result. It costs 10€ and is simple to build.

http://www.youtube.com/watch?v=DrKKnFOLH-k

Multi Wii Config is Version 1prebis7

Regards
Kayle
Last edited by Kayle on Wed Mar 23, 2011 9:01 pm, edited 1 time in total.

iontours
Posts: 5
Joined: Sat Mar 05, 2011 8:34 pm
Location: Corfu, Greece

Re: LCD Config with Atmega8 & HD44780 lcd

Post by iontours »

Hi Kayle,
Your project is very interesting. Is there any chance of releasing the mega8 source code here? :roll: :roll:


Regards
Spiros

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hi Spiros,

sure is there a chance of releasing the code ;) The code is written in Bascom. It receives the string from the arduino and split it in two strings.

Here it is:

Code: Select all

'--- Multi Wii copter ---
'--- LCD Config ---

'--- Chip ---
$regfile = "m8def.dat"
$crystal = 8000000
$baud = 9600

'--- lcd ---
Config Lcdpin = Pin , Db4 = Portc.0 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.3 , E = Portc.4 , Rs = Portc.5
Config Lcd = 20 * 2

'--- Dims ---
Dim Wii_string As String * 36
Dim Wii_name As String * 16
Dim Wii_wert As String * 16

'--- boot ---
Cls
Cursor Off
Wait 1
Locate 1 , 4
Lcd "Multi Wii LCD"
Locate 2 , 3
Lcd "by Kayle / V1.0"
Wait 2
Cls

'--- Main ---
Do
  Inputbin Wii_string

      Wii_name = Mid(wii_string , 3 , 16)
      Wii_wert = Mid(wii_string , 26 , 5)
      Locate 1 , 1
         Lcd "Para: " ; Wii_name
      Locate 2 , 1
         Lcd "Wert =   " ; Wii_wert
Loop




It´s quiete simple but works great.

Regards
Kayle

iontours
Posts: 5
Joined: Sat Mar 05, 2011 8:34 pm
Location: Corfu, Greece

Re: LCD Config with Atmega8 & HD44780 lcd

Post by iontours »

Thank you Kayle. It is very simple indeed. I think I will make one serial lcd this weekend since I have all the parts.

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Thank you Kayle, great project....

Do you have the schematics???

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey nosepo,

I don't have any shematic. There is only a atmega8 with internal 8 mhz oscillator, 100 nF on vcc -gnd and the lcd ( for connection see sourcecode ). There is nothing more.

Regards kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Thanks Kayle.

Please, could you adapt the code for 16x2 HD44780 display model?? It have a less price than 20x2 model ones.

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey Nosepo,

here is the code for 16x2 lcd.

Code: Select all

    '--- Multi Wii copter ---
    '--- LCD Config ---

    '--- Chip ---
    $regfile = "m8def.dat"
    $crystal = 8000000
    $baud = 9600

    '--- lcd ---
    Config Lcdpin = Pin , Db4 = Portc.0 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.3 , E = Portc.4 , Rs = Portc.5
    Config Lcd = 16 * 2

    '--- Dims ---
    Dim Wii_string As String * 36
    Dim Wii_name As String * 16
    Dim Wii_wert As String * 16

    '--- boot ---
    Cls
    Cursor Off
    Wait 1
    Locate 1 , 1
    Lcd "Multi Wii LCD"
    Locate 2 , 1
    Lcd "by Kayle / V1.0"
    Wait 2
    Cls

    '--- Main ---
    Do
      Inputbin Wii_string

          Wii_name = Mid(wii_string , 3 , 16)
          Wii_wert = Mid(wii_string , 26 , 5)
          Locate 1 , 1
             Lcd Wii_name
          Locate 2 , 1
             Lcd Wii_wert
    Loop





regards
Kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Thank you so much kayle.

I don't know electronics so much and i saw the atmega8 pins in the code but i dont know wich pins corresponds in the datasheet of the atmega. Sorry for my ignorance....

Image

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey nosepo,

That's no problem. You must connect following:

Rx pind.0 to arduino rxd
between vcc and gnd (pin 7+8) a 100nF
the lcd like in the code -> example: db4 on lcd connect it to pc0 on atmega, and so on...

If you have any questions, ask it.

Regards kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Thanks kayle.
I have bought all parts, after i build it i will report... :D

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hi nosepo,

Did you build the config lcd?

Kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Thanks Kayle, please check this. It have the ok??
Image
Image

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hi nosepo,

Use a tantal cap on vcc and gnd, not an elko. You must connect a 10k resistor on reset to vcc. To program the avr you must connect
miso, mosi, sck and reset.

If you have any questions ask, there is no problem.

Greetings kayle

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hi nosepo,

Use a tantal cap on vcc and gnd, not an elko. You must connect a 10k resistor on reset to vcc. To program the avr you must connect
miso, mosi, sck and reset.

If you have any questions ask, there is no problem.

Greetings kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

i Kayle.

I did what you said me, please check the new sch...

To adjust the contrast i guess i must put a 10k pot betwen contrast pin and gnd, is in it?, or direct to gnd it can see fine??
Image

I'm planning to program the avr outside the pcb before soldering, some mine friends have greats programmers.

Thank for all :mrgreen:

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey nosepo,

I connect the contrast to gnd. But it can be different with an other display. You must connect e, rw and rs

Greetings

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

where i connect e, rw and rs, to Gnd??

Is the rest ok??

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Please look at the code. You must connect only db4 to db7, rs and e. Connect rw to gnd. The rest seems to be ok.

Greetings kayle

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

I hope this must be the last one..... :roll:
Image

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey, thats seems ok. Try it and report.

Greetings

Nosepo
Posts: 24
Joined: Thu Jan 20, 2011 11:13 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Nosepo »

Until next week i cant test it......

Thanks Kayle.

kodox
Posts: 12
Joined: Thu Mar 10, 2011 8:07 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by kodox »

Hi kayle, nosepo
i want to thanks for sharing how to connect LCD using the cheapest way..

my question is, can i upload the code to Atmel8 using FTDI Basic Breakout From Sparkfun ? http://www.sparkfun.com/products/9716
link or tutorial ?
hope someone can help me. :oops:

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey kodox,

You need a programmer to upload the code to the atmel. Search for avr isp. You cannot use
the sparkfun usb to programm the mega8, because on a new chip, there is no bootloader.

Greetings kayle

killmouse
Posts: 2
Joined: Thu Apr 14, 2011 2:03 pm
Location: 60Rus

Re: LCD Config with Atmega8 & HD44780 lcd

Post by killmouse »

Thanks Kayle, your device works. I assembled it work immediately, and without problems.
Last edited by killmouse on Fri Apr 15, 2011 6:02 am, edited 1 time in total.

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey killmouse,

Thanks for feedback. Can you post a picture from working lcd? Its for my gallerie.

Greetings kayle

killmouse
Posts: 2
Joined: Thu Apr 14, 2011 2:03 pm
Location: 60Rus

Re: LCD Config with Atmega8 & HD44780 lcd

Post by killmouse »

Make on this scheme, photo until one test.
I will make casing will be more photos.
Scheme
One picture
Sorry for bad English, I from Russia badly know him.

AgiSer
Posts: 1
Joined: Fri Apr 15, 2011 10:01 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by AgiSer »

Hello Kayle, killmouse
Thanks for great effort.

Device is assembled and work perfect
Source code for LCD16x2 had been little bit changed for fit into atmega48
PCB and schematic by killmouse
Attachments
LCD16x2_mega48.JPG

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by Kayle »

Hey killmouse and agiser,

Thanks for the pictures.

Greetings kayle

User avatar
speto_sk
Posts: 29
Joined: Sat Mar 05, 2011 7:32 am
Location: Slovak republic, Kosice

Re: LCD Config with Atmega8 & HD44780 lcd

Post by speto_sk »

I'm prepare PCB for WiiLCD with Mega88.
Here is source and PCB: http://code.google.com/p/spetosk-projects/downloads/list

;)

User avatar
speto_sk
Posts: 29
Joined: Sat Mar 05, 2011 7:32 am
Location: Slovak republic, Kosice

Re: LCD Config with Atmega8 & HD44780 lcd

Post by speto_sk »

I'm prepare PCB for WiiLCD with Mega88.

Image

Here is source and PCB: http://code.google.com/p/spetosk-projects/downloads/list

;)

User avatar
speto_sk
Posts: 29
Joined: Sat Mar 05, 2011 7:32 am
Location: Slovak republic, Kosice

Re: LCD Config with Atmega8 & HD44780 lcd

Post by speto_sk »

Here is new PCB for WiiLCD for KAYLE code:

Image

Source: http://code.google.com/p/spetosk-projects/downloads/detail?name=WiiLCD%20with%20Mega88%20v.2.rar&can=2&q=#makechanges

Change:

- pin's for connection for LCD
- optimalization
- smallest

:D

kodox
Posts: 12
Joined: Thu Mar 10, 2011 8:07 am

Re: LCD Config with Atmega8 & HD44780 lcd

Post by kodox »

thanks speto, if have time i will go to buy part for lcd. :D

fibra
Posts: 1
Joined: Tue Jun 14, 2011 8:01 am
Location: Serbia

Re: LCD Config with Atmega8 & HD44780 lcd

Post by fibra »

It would be good if somebody publish compiled hex files for both displays.

williankubo
Posts: 1
Joined: Wed Sep 21, 2011 7:06 pm

Re: LCD Config with Atmega8 & HD44780 lcd

Post by williankubo »

fibra wrote:It would be good if somebody publish compiled hex files for both displays.


Here.
Attachments
LCD HD44780 16x2 and 20x2 with Atmega8 to MultWii.rar
(1.76 KiB) Downloaded 219 times

Post Reply