which is better GPIO or RS232

danics
hi all,

i have a 20 meter cable for sending a 9 byte code,i want to know witch
solution have better performance for me? using 9 GPIO pins or using RS232
every 5 meters. thanks a lot;

John
For long distances RS485 is better or if you have more than 2 devices on
the bus then maybe 1-Wire.

danics
Mini2440 haven't RS485 so what s you mean of 1-Wire?

John
You only need a RS485 transceiver chip which will be connected to an UART
of mini2440.
1-Wire: http://en.wikipedia.org/wiki/1-Wire

Errol
If you keep the baud low, and maybe use low capacitance wire, then 20
meters shouldn't be a problem for RS232.

kurenai
(your code is 9bits or 9 bytes??? anyway is better a serial transmition,
not parallel GPIO as you will need some media converter:
GPIO 'logic 1' at mini is only 3.3v it's a bad idea to send it 20meters
without some kind of trasceiver or buffer... (even i2c is just for lower
than 1 meter, just to comunicate 'in-board' not for long distance...)

as Errol says, you can use RS232 at lower baudrate...(< 4800 maybe 1200bps)

if you need higher baudrate(velocity), consider using RS485. as our
mini2440 doesn't have a rs485, you will need a 'rs232 to rs485 converter'
(media converter) or consider using a TTL to 485/482 converter (something
like the MAX487 but for 3.3V (the MAX487 works for 5VTTL))

don't forget, also ethernet can reach up to 100 meters!! (anybody tested
that on an actual mini2440???? i don't have so much cable. but it should
work...)

danics
thanks kurenai, i mean 9 bits , and i m using ethernet for connecting to my
pc so i must use RS232 or GPIO , thanks again for your guide.

A.Delfino
Hi, I would like make a parallel communication with GPIOs. What the max
baudrate I will get ? Thanks.

davef
Just a cursory glance at the datasheet . . . PCLK can be run at the same
speed as FCLK but I see a max frequency rating of 67MHz.  So, if you use 8
ports to shift out one byte that suggests to me 67Mbytes per second.

There is some nominal relationship between baud and megabytes per second,
that escapes me, at the moment, but I am guessing that you "could" be
looking at about 67Mbaud.  There is possibly overhead just in writing to
the ports of x instruction cycles, which could reduce this by an order of
magnitude or ?  Still, I think you are looking at some pretty high data
rates.

If you want a better estimate I could talk to the ARM9 hardware guys at
work.  What devices do you want to drive in parallel mode? 

Possibly deserves a new thread, IE <parallel port> or <bit-banging parallel
port>

Mark
Check this RS232 / RS485 Wiki http://www.rs232-to-rs485.com, its much
easier to make a decision if you know the basics.