Page 1 of 1

LCD Config with Atmega8 & HD44780 lcd

Posted: Tue Mar 15, 2011 1:26 am
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Tue Mar 15, 2011 8:10 am
by iontours
Hi Kayle,
Your project is very interesting. Is there any chance of releasing the mega8 source code here? :roll: :roll:


Regards
Spiros

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Tue Mar 15, 2011 12:26 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Tue Mar 15, 2011 10:28 pm
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.

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Wed Mar 16, 2011 1:39 pm
by Nosepo
Thank you Kayle, great project....

Do you have the schematics???

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Wed Mar 16, 2011 3:29 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Mar 17, 2011 11:19 am
by Nosepo
Thanks Kayle.

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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Mar 17, 2011 1:14 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Mar 17, 2011 5:08 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Mar 17, 2011 5:45 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sat Mar 19, 2011 9:09 pm
by Nosepo
Thanks kayle.
I have bought all parts, after i build it i will report... :D

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Mar 27, 2011 6:00 pm
by Kayle
Hi nosepo,

Did you build the config lcd?

Kayle

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sat Apr 02, 2011 12:43 pm
by Nosepo
Thanks Kayle, please check this. It have the ok??
Image
Image

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sat Apr 02, 2011 8:39 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sat Apr 02, 2011 8:39 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 7:15 pm
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:

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 7:48 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 7:53 pm
by Nosepo
where i connect e, rw and rs, to Gnd??

Is the rest ok??

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 8:07 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 8:30 pm
by Nosepo
I hope this must be the last one..... :roll:
Image

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sun Apr 03, 2011 8:52 pm
by Kayle
Hey, thats seems ok. Try it and report.

Greetings

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Mon Apr 04, 2011 10:37 am
by Nosepo
Until next week i cant test it......

Thanks Kayle.

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Apr 07, 2011 5:29 am
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:

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Apr 07, 2011 12:27 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Apr 14, 2011 2:33 pm
by killmouse
Thanks Kayle, your device works. I assembled it work immediately, and without problems.

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu Apr 14, 2011 6:55 pm
by Kayle
Hey killmouse,

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

Greetings kayle

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Fri Apr 15, 2011 6:05 am
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.

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Fri Apr 15, 2011 10:23 am
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Sat Apr 16, 2011 1:56 pm
by Kayle
Hey killmouse and agiser,

Thanks for the pictures.

Greetings kayle

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu May 05, 2011 10:44 am
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

;)

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu May 05, 2011 10:48 am
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

;)

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Thu May 12, 2011 12:41 pm
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

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Fri May 13, 2011 11:54 am
by kodox
thanks speto, if have time i will go to buy part for lcd. :D

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Wed Jun 15, 2011 10:18 am
by fibra
It would be good if somebody publish compiled hex files for both displays.

Re: LCD Config with Atmega8 & HD44780 lcd

Posted: Wed Sep 21, 2011 7:26 pm
by williankubo
fibra wrote:It would be good if somebody publish compiled hex files for both displays.


Here.