EmbDev.net

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


von Martin G. (grabbo)


Rate this post
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.

von Daniel (Guest)


Rate this post
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

von Martin G. (grabbo)


Attached files:

Rate this post
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.

von Rik (Guest)


Attached files:

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

von Rik (Guest)


Rate this post
useful
not useful
And the pin connections:

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

von Martin G. (grabbo)


Rate this post
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..
1
int main()
2
{
3
lcd_init();
4
lcd_clear();
5
lcd_goto_xy(1,0);
6
lcd_write("hello");
7
8
return 0;
9
}

von Rik (Guest)


Rate this post
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.

von Martin G. (grabbo)


Attached files:

Rate this post
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..

von Rik (Guest)


Rate this post
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

von Rik (Guest)


Attached files:

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

von Martin G. (grabbo)


Rate this post
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..
1
void lcd_enab(void);
2
3
void lcd_enab(void) {
4
  PORTD |= 0x10;
5
  _delay_us(40);
6
  PORTD = 0x00;
7
}

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

von Rik (Guest)


Rate this post
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.

von Martin G. (grabbo)


Attached files:

Rate this post
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 :)

von Rik (Guest)


Rate this post
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" !!!

von Martin G. (grabbo)


Rate this post
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 :)

von Rik (Guest)


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

von Martin G. (grabbo)


Rate this post
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.

von abhinav (Guest)


Rate this post
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.

von Weiss glüht die S. (weissglut)


Rate this post
useful
not useful
Should be:

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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.