EmbDev.net

Forum: µC & Digital Electronics EA DOG-M 162 + Atmega8


Author: Martin Grabbo (grabbo)
Posted on:

Rate this post
0 useful
not useful
Hope users, don't mind if i create own thread in english language.
I've been trying to init display for 2 days but without any success..I 
assembled another display with driver hd44780 and worked like charm..
I searched and read almost all threads dedicated to EA Dogs here.All i 
got some errors or compiled programs with no effect to display..
The problem is i didn't handle the display too well,there's a little 
scratch and i do really know if it's in working condition..
It's connected to atmega8 ( 4bit interface , 3,3V ) -> DB4-DB7 is 
connected to PD0-PD3 and PD4 ->RS, PD5->E , PD6->R/W.
I prefer C-language.

All i need to know if display still works,if so, i'll spend some time to 
customize the library for my needs.

Author: Daniel (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

we have had the same problem a couple of weeks ago. I think you forgot 
to connect pin PSB (I think it's pin 23) to VDD. This is absolutely 
necessary for a communication in parallel mode. Otherwise, the display 
expects data in serial mode.

And be carefull! I cracked two of this delicate parts during my attempt 
to cut off the pin from a ground pad on the pcd...

If it still doesn't work: I can pick out a working code for you.

Regards,
Daniel

Author: Martin Grabbo (grabbo)
Posted on:
Attached files:
  • preview image for 1.png
    1.png
    5.94 KB, 3194 downloads

Rate this post
0 useful
not useful
Thank you for quick reply.. PSB is connected to 3.3V.I checked the 
scheme with datasheet..It should be good..
Pls post some working code..It makes me really mad these days..

By the way between pads CAP1N - CAP1P and Vout-Vin should be 
electrolytic capacitors?

Here's my ea dog scheme to get a picture if something is not wronG..I 
included atmega8 pins.

Author: Rik (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Hello Martin,
I've attached my c-module for an DOG-M 163, 4bit interface, 3.3V for 
ATmega32L.

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
And the pin connections:

RS -> PC6
E  -> PC4
RW -> PC5
D6 -> PC2
D7 -> PC3
D4 -> PC0
D5 -> PC1

Author: Martin Grabbo (grabbo)
Posted on:

Rate this post
0 useful
not useful
I replaced all PORTC with PORTD.. RS,R/W,E are connected as you 
connected them..the only change i'm using portD.
Could you give me a hint what i should place in the main() to see 
"hello" on the display?

I'm playing with the code..
int main()
{
lcd_init();
lcd_clear();
lcd_goto_xy(1,0);
lcd_write("hello");

return 0;
}

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
Your main function is ok and should work. The parameters for 
lcd_goto_xy() mean: x (0 to 15) is the column, y (0 or 1 on your 
display) is the row. After calling lcd_init() the cursor is set to 
coordinates (x,y)=(0,0). The display is also cleared during lcd_init(). 
So for just writing "hello" to the device it is enough to do the 
following:

int main(void) {
  lcd_init();
  lcd_write("hello");
}

After this the cursor will be set to the coordinates (x,y)=(5,0), and 
e.g. 6 calls to lcd_write("hello") will result in ..

hellohellohelloh
ellohellohello


Btw: I'm using different capacitors than you: VIN,VOUT: 2.2µF, CAP1N, 
CAP1P: 1µF.

Author: Martin Grabbo (grabbo)
Posted on:
Attached files:

Rate this post
0 useful
not useful
I'm desparate as i can declare..
Rik: Do you still got one of this displaY?I want to confirm mine is 
dead.

I attached the code .Without any error but the display is still blank..

RS -> PD6
E  -> PD4
RW -> PD5
D7 -> PD3
D6 -> PD2
D5 -> PD1
D4 -> PD0


Pls tell me somebody the display is dead because i'm losing my patient 
:) I can't take it out from breadboard.If i do so,the display break into 
thousand peaces..

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi Martin,
I reviewed my code (3-line display) and made the necessary changes to 
adopt it to your 2-line device. The changes are documented in the source 
code. I also included the datasheet for the st7035 display controller. 
Unfortunately I'm unable to test it, because I have no such 2-line 
device.
Best regards
Rik

Author: Rik (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Forgot to attach the file. Here it is

Author: Martin Grabbo (grabbo)
Posted on:

Rate this post
0 useful
not useful
THank you..I checked with datasheet.It's clearly now..The INIT must be 
good to interface in 4bit mode with 2 lines.
Im thinking that we do not coordinate with the signals RS,E,R/W. They 
have to be set to work with display..
void lcd_enab(void);

void lcd_enab(void) {
  PORTD |= 0x10;
  _delay_us(40);
  PORTD = 0x00;
}

There's 2x lcd_enab which should be there..I wonder why compiler doesn't 
signal there's duplicate.
What does this command do? PORTD |= 0x10; Its Bitewise OR... Portd = 
Portd | 0x10.. It's something with E (because its connected to PD5)

Rik thank you for your advices !You've helped a lot..Now it's time to 
get display working which i havent managed yet :D

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
"void lcd_enab(void);" is the forward declaration, void lcd_enab(void) 
{..} the function definition. The declarations for the other function 
are stated in the header-file. The enable-function is not contained in 
the header-file, because lcd_enable() shall not be part of the C-module 
interface (only part of the implementation). According to the selected 
compiler options you will get a warning about missing forward 
declarations. For more info consult the ISO-C-standard and the gcc 
manual.

> What does this command do? .."PORTD |= 0x10;"

Pull enable pin (E) high (1), without altering the other pins on the 
port. This is the signal for the lcd-controller, that it can read the 
data from the parallel port.

Author: Martin Grabbo (grabbo)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Understood..I made some changes in code.Added few features.
Now it should work.

Pls somebody must be out there with EA DOG 16x2 :)

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
Just tested your program on dogm163 (using my lcd_init, of course and 
changed port d to c). Well.. it doesn't work :-/ Btw I found some 
errors:
line 31: I guess this must be DDRD=0xFF or at least 0x7F.
line 121: "DDRD" !!!

Author: Martin Grabbo (grabbo)
Posted on:

Rate this post
0 useful
not useful
Did your program work which you provided at first?Have you tried it?I'm 
totally disappointed with this LCD ..Nobody makes the displays with the 
st7036 controller but EA DOG :)

Yeah , those 2 errors were there :)

Author: Rik (Guest)
Posted on:

Rate this post
0 useful
not useful
Yes, my program works.

Author: Martin Grabbo (grabbo)
Posted on:

Rate this post
0 useful
not useful
damn,Ea dog is going to the trash !!I destroyed it :)
I just connected display (the Hd44780) and it works with a code for ea 
dog :) Unbelievable.

Author: abhinav (Guest)
Posted on:

Rate this post
0 useful
not useful
can anyone give me the pin details for the display for SPI PROTOCOL.i 
want MISO MOSI NSS SCK details.the data sheet is not clear.

Author: Weiss glüht die Sonne (weissglut)
Posted on:

Rate this post
0 useful
not useful
Should be:

MISO -> RS
MOSI -> SI
SS -> CSB
SCK -> CLK

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.