Additional serial ports on the 5234

Discussion to talk about hardware related topics only.
Post Reply
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Additional serial ports on the 5234

Post 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...
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Additional serial ports on the 5234

Post 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
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: Additional serial ports on the 5234

Post 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...
Post Reply