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

2013-07-04 Thread Lukasz Sokol
On 04/07/2013 11:08, Dennis Poon wrote:
 thanks. I am not using the fpc email as it seems off topic.
 
 May I know the exact brand and model number of the adapter you used? 
 I have an ATEN usb-to-serial cable (UC-232A) but I am not sure how to
 connect its serial pins to rs-485 's DIFFERENTIAL LINES and how to
 set that adapter into half-duplex translation mode.
 
 Dennis
 
[...]


(apparently it went into FPC list anyway)

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

A MAX232 has 4 [IIRC] level changers, 2 in each direction; so you can
use one pair to convert tx/rx, and one of the remaining ones in 232-ttl 
direction,
to convert one RS232 signal to switch the RS485 trx into 'sending' mode;

Of course you need an additional +5V supply to the above too.

HTH,
-L.

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


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

2013-07-04 Thread Michael Schnell

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.


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


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