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 ]
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
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.
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!!!