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

Harald Kipp harald.kipp at egnite.de
Mon Nov 30 14:16:59 CET 2009


Hi Paul,

Paul Govers wrote:
> but now i want to connect my Remeha Heating system to the ethernut with a serial cable, both devices has a comport. When i connect my laptop to the remeha heating system i get data from it(rs232|9600baud|no flowcontrol), i can see the data with a serial program called "Advanced Serial Port Terminal". But when i connect my remeha heating system to the ethernut i receive nothing :-(  i connected a scoop to pin 2 and pin 3 but still no data

Hardware handshake support for the Ethernut 3 CPLD had been added
recently to Nut/OS 4.9.

http://ethernut.svn.sourceforge.net/viewvc/ethernut/trunk/nut/arch/arm/dev/usartat91.c?r1=2602&r2=2670

It is not yet available in 4.8. The changes are somewhat extensive and I
didn't want to risk spoiling the stable version.

In your case, however, it looks to me that you won't need real
handshaking. Just enabling the handshake lines should do the job.

Have a look to

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

Setting RSRTS and RSDTR bits in register NPL_RSCR will activate the
handshake outputs. Simply add the following to your main():

#include <dev/npl.h>
...
sbi(NPL_RSCR, NPL_RSRTS_BIT);
sbi(NPL_RSCR, NPL_RSDTR_BIT);

As an alternative you can also use a different wiring of the RS-232
cable as explained in

http://www.ethernut.de/en/documents/rs232primer.html
(shortened handshake signals)

Please let me know if it helped.

Harald





More information about the En-Nut-Discussion mailing list