Page 1 of 1

Additional serial ports on the 5234

Posted: Tue Jan 05, 2010 11:27 pm
by v8dave
Hi All,

I am looking for a way to add an additional 2 serial ports to a 5234 module. I see that there is a reference to using the TPU to act as a serial port.

I was wondering if it can support more than 1 and if anyone has actually done this in hardware and if you where successful with it?

I only need RX and TX and max bit rate of 115200.

Dave...

Re: Additional serial ports on the 5234

Posted: Wed Jan 06, 2010 1:00 am
by Ridgeglider
yes, you can easily add 8 more ports withRx and Tx for each using the 16 eTPU lines. See: http://www.netburner.com/downloads/mod5 ... ppNote.zip
and liik for the eTPU Uart appnote and functions.

Basically:
int eTPUFDUartOpen(int RXchannel,
int TXchannel,
int baud_rate = 115200,
int bits_per_data_word = 8,
int parity = FS_ETPU_UART_NO_PARITY,
int priority = FS_ETPU_PRIORITY_MIDDLE);

Easy as:
#include <eTPUinit.h> //These includes should go after any standard includes
#include <eTPU.h>
eTPUInit(); //Call 1X with initialization functions, puts all channels in hiz state
int eTPUfd = eTPUFDUartOpen(1, 2 ); // make eTPU pin 1, J2[5]=Tx, eTPU pin 2, J2[8]=Tx
BYTE RxBuf[40];
writestring(eTPUfd, “eTPU Pin2, j2[5] is now a Tx line!”); // Write the string on Tx, eTPU2
read(eTPUfd, RxBuf, 20 ); // Read input from Rx, eTPU1

If you need an RS232 level shifter, I often use these boards and some jumper leads for proto level shifting:
http://www.acroname.com/robotics/parts/ ... -CONN.html

Re: Additional serial ports on the 5234

Posted: Wed Jan 06, 2010 1:32 am
by v8dave
Excellent, thank you! I had already downloaded the APP note but wanted to check it anyone had experience of using it.

I will have my dev kit later this month so I will be keen to try it out then.

I am also developing a custom board for the module anyway, so I will be adding suitable RS232 drivers as needed.

Cheers,
Dave...