cancel
Showing results for 
Search instead for 
Did you mean: 

Second Serial Port

steffen2
Associate II
Posted on December 13, 2005 at 23:40

Second Serial Port

9 REPLIES 9
steffen2
Associate II
Posted on July 30, 2003 at 10:18

We want to use port pin 3.0 and 3.1 for a second serial port, how can we configure that. it is clear that we have to change the value of the first three lines in the example for the first port.

First Port: P3.10 and 3.11

void start_serio(void)

{

P3 |= 0x0400; // set port 3.10 output latch (TXD)

DP3 |= 0x0400; // configure port 3.10 for output

// operation. ( TXD output)

DP3 &= 0xF7FF; // configure port 3.11 for input

// operation. ( RXD input)

S0TIC = 0x80; // set transmit interrupt flag

S0RIC = 0x00; // delete receive interrupt flag

S0BG = 0x0A; // set baudrate to 576000 baud

S0CON = 0x8011; // set serial mode

putchar(' '); // send dummy-Byte for compatibility

}

[ This message was edited by: steff76 on 30-07-2003 13:48 ]
charles239955_st
Associate II
Posted on July 30, 2003 at 10:55

Hello,

Which ST10 device are you using?

What do you want to connect on it? Is it a software emulated serial port that you want to do on P3.0 and P3.1?

Anyway you basically need to configure 1 pin in output and 1 pin in input (which is the default configuration).

If you want to configure P3.0 as output, you have to execute the following instructions:

P3 |= 0x0001;

DP3 |= 0x000; // Set P3.0 line as output with latch to value 1

steffen2
Associate II
Posted on July 30, 2003 at 11:27

We use the St10f269.

We like to connect on TX(P3.0) an RX(P3.1) a PC with a Terminal Program so we can use the second port for diagnostic messages.
charles239955_st
Associate II
Posted on August 04, 2003 at 06:51

Hello,

I think you are mistaking: there is no seconde serial line on P3.0 and P3.1 in the ST10F269. If you need a second one, you must either connect external hardware or do it by software.
steffen2
Associate II
Posted on August 11, 2003 at 05:43

Yes we want to do it by software!

How can we do that??

[ This message was edited by: steff76 on 20-08-2003 13:12 ]
ovelhanegra
Associate II
Posted on December 12, 2005 at 21:38

Can you help me too? I have the same problem. I´m a student and i'm making my final project with st10f269 and i need a second serial port. Please help mee!!!

ovelhanegra
Associate II
Posted on December 12, 2005 at 21:47

[ This message was edited by: Ovelha_Negra on 13-12-2005 03:19 ]

najoua
Associate II
Posted on December 13, 2005 at 05:09

Hello,

Please refer to the attached infineon application note. It could be used as a reference for the ST10F269 as the ST10 and C16x are nearly similar.

You can find drivers on infineon web site.

I hope this helps, let me know how it goes.

Best regards,

Najoua.

[ This message was edited by: Najoua on 13-12-2005 09:40 ]

________________

Attachments :

Ap1605010_Emulating_ASC_via_software.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0KJ&d=%2Fa%2F0X0000000bY8%2FxO4I4x4crSO1ZUHw.nRUcKscPcWQUPf79KdjzOz6ycg&asPdf=false
ovelhanegra
Associate II
Posted on December 13, 2005 at 23:40

Ok. Tanks for your help... ;)