Re: [fpc-pascal] Re: (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-05 Thread Michael Schnell

On 07/04/2013 05:24 PM, Mark Morgan Lloyd wrote:



In any event, my experience is that USB-serial converters are very poor 


Same here !

Standard USB stuff is not really suitable for embedded use.

Due to electrical disturbances the data on the USB line can be corrupted 
and the link between host and device can be lost. In that case the 
_device_ needs to initialize a reconnection. The host can't do that 
because the protocol does not offer this option. But OTOH in many cases 
the device can't detect that the link is lost at the host. You can help 
this by doing your own software in the device and implement a life check 
protocol. But Standard devices don't feature this.


-Michael
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Mark Morgan Lloyd

Lukasz Sokol wrote:

On 04/07/2013 12:03, Michael Schnell wrote:

On 07/04/2013 12:52 PM, Lukasz Sokol wrote:

For RS485 adaptation, use a MAX232 like chip (to convert +-12 to
ttl) and then a RS485 transceiver chip;

If you want to create hardware anyway, better use a PIC24 (pr PIC32)
chip with USB plus a RS485 tranceiver chip. So you get rid of the 
ATEN usb-to-serial cable (UC-232A) and you have both sides of USB
under your control so that you can do the USB procedure you want.


+1 if OP wants to create his own hw and sw for that purpose


Another way is using a pre-programmed PIC chip available by Microchip
with USB to-Serial software plus a RS485 tranceiver chip.


+1 if OP wants to use standard hw...


Discussion elsewhere suggests that the RPi has an internal 16550 port, 
and controlling the 485 signals using e.g. CTS might be viable.


In any event, my experience is that USB-serial converters are very poor 
for anything that involves accurate timing, and I suspect that 
controlling a 485 transceiver in conjunction with one would be 
problematic. I think I asked FTDI about this a couple of years ago, and 
was told that their hardware had facilities that would help but 
exploiting them would take a non-standard driver.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Luca Olivetti
Al 04/07/13 17:24, En/na Mark Morgan Lloyd ha escrit:

 In any event, my experience is that USB-serial converters are very poor
 for anything that involves accurate timing, and I suspect that
 controlling a 485 transceiver in conjunction with one would be
 problematic.

Not if the converter manages the rx/tx switching all by itself

 I think I asked FTDI about this a couple of years ago, and
 was told that their hardware had facilities that would help but
 exploiting them would take a non-standard driver.

The ones I used worked with the standard driver: send something, it
automatically enables the transmitter, after the last bit has been
transmitted it goes in high impedance mode ready for listening/receiving.

Bye
-- 
Luca

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: (OT) Re: How to use UART of ARM platforms (e.g. Raspberry Pi ) through free Pascal?

2013-07-04 Thread Jonas Maebe
Hi,

Can this thread please be moved to the fpc-other list?

Thanks,


Jonas
FPC mailing lists admin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal