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

Alex Joni alex.joni at robcon.ro
Wed Aug 16 09:19:53 CEST 2006


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");

....
} 




More information about the En-Nut-Discussion mailing list