[En-Nut-Discussion] Ethernut 3.1 RS232 hardware handshake

Ole Reinhardt ole.reinhardt at embedded-it.de
Wed Dec 2 23:15:30 CET 2009


Hello Paul,

> My PC com settings are
> 9600 Baud/ 8 data bits/ Parity none//stop bits 1
> and with Ethernut 3 i mean the Ethernut 3 
> hardware(http://www.ethernut.de/en/hardware/enut3/index.html)

Ok, 8N1 is the normal setting.

> i run the rs232d ethernut example on my ethernut, so i can make a TCP 
> connection and a RS232 connection to the ethernut...
> when i connect my pc to the ethernut rs232 port, is see the rs232 data on 
> the TCP channel.
> when i connect my pc to the RS232 Remeha heating system, i get the data from 
> the heating system
> but when i connect the heating system to the ethernut hardware i get no 
> rs232 data on the TCP channel :-(
> all test with the pc involved i used the same comport settings...

Ok, if you could connect the PC to Ethernut3 and to your Heater you
should realy consider to use a cross cable between heater and Ethernut3.

http://www.lammertbies.nl/comm/info/RS-232_null_modem.html

> The ethernut has 0volt on pin 4 and pin 7 so DTR and RTS stays low on the 
> RS232 from the heating system, in the situation the heatingsystem does not 
> send his data on pin 3(also no data when measuring with a oscilloscoop)

Ok, so you need to use DTR to enable the RS232 of your heater?

Check out this code which disables usage of UART1 and sets RTS / DTR:

    outb(NPL_RSCR, (inb(NPL_RSCR) & ~NPL_RSUS1E) | NPL_RSUS0E);    
    outb(NPL_RSCR, inb(NPL_RSCR) | NPL_RSDTR);
    outb(NPL_RSCR, inb(NPL_RSCR) | NPL_RSRTS);

The registers are described here:

http://www.ethernut.de/en/hardware/enut3/cpld.html

Regards,

Ole Reinhardt

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list