[En-Nut-Discussion] Apparently trivial problem with LCD & ETH

Alex Joni alex.joni at robcon.ro
Wed Aug 16 11:44:50 CEST 2006


Update:

found the problem. I placed the LCD ontop of PE5 (INT 5) used by ETH.
I moved it to another port, and it works as expected.

Regards,
Alex

----- Original Message ----- 
From: "Alex Joni" <alex.joni at robcon.ro>
To: <en-nut-discussion at egnite.de>
Sent: Wednesday, August 16, 2006 10:19 AM
Subject: [En-Nut-Discussion] Apparently trivial problem with LCD & ETH


> Hello all,
>
> it's been a while since I worked with ethernut, but I came around a 
> project where I need it.
> My hardware design is very similar to the ethernut13-f.
> It works pretty ok so far, except when I try to register both the 
> LCD
> (hd44780 driver:
> data on PORTE[4-7]
> R/S on PORTB[3]
> no R/W  (pulled it low manually)
> Enable on PORTB[1] )
> and the ETH driver (rtl8019AS at 0x8300, IRQ 5).
> I also have 2 serials registered (check code snip below).
>
> The problem:
> When I register the LCD and the ETH, I can see that everyting 
> happens much slower from that point on. (ICMP replies take ~35 msec, 
> instead of normal <1msec), displaying data on the LCD happens slower 
> (you can see the letters appear one at a time), and there is no 
> serial activity (unless there is also data on the ETH port: I could 
> see letters appear on the USART0, during ICMP packets).
>
> Any idea what might be the problem? (if I comment out one of the two 
> devices : either LCD or ETH, then it works as expected).
>
> Many thanks,
> Alex
>
> Code:
> int main(void)
> {
>    NutRegisterDevice(&DEV_UART, 0, 0);
>    uart = fopen(DEV_UART_NAME, "r+");
>    _ioctl(_fileno(uart), UART_SETSPEED, &baud);
>
>    NutRegisterDevice(&DEV_UART1, 0, 0);
>    uart2 = fopen(DEV_UART1_NAME, "r+");
>    _ioctl(_fileno(uart2), UART_SETSPEED, &baud);
>
>    NutRegisterDevice(&DEV_ETHER, 0x8300, 5);
>    ip_addr = inet_addr("192.168.0.100");
>    ip_mask = inet_addr("255.255.255.0");
>    NutNetIfConfig("eth0", my_mac, ip_addr, ip_mask);
>
>    NutRegisterDevice(&devLcd, 0, 0);
>    lcd = fopen("lcd", "w");
>    fprintf(lcd,"LCD initialized..\n");
>
> ....
> }
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.10.10/419 - Release Date: 
> 15.8.2006
>
> 




More information about the En-Nut-Discussion mailing list