Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
software:deep:ide:eclipse_serialout [2013-07-25 15:38] – zueger1 | software:deep:ide:eclipse_serialout [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Using serial out (System.out) ====== | ||
- | The mpc555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. The SCI1 is connected through the BDI-Interfaceprint ([[embedded_systems: | ||
- | The SCI2 can be connected with a standard serial cable (DB9 connector). | ||
- | |||
- | - In your application on the target you have to initialize the serial communication interface with the desired settings and assign the standard pipes (in, out, error) to this port. | ||
- | <code java> | ||
- | import java.io.PrintStream; | ||
- | import ch.ntb.inf.deep.runtime.mpc555.driver.SCI1; | ||
- | public class HelloWorld { | ||
- | static { | ||
- | // 1) Initialize SCI1 (9600 8N1) | ||
- | SCI1.start(9600, | ||
- | |||
- | // 2) Use SCI1 for stdout | ||
- | System.out = new PrintStream(SCI1.out); | ||
- | |||
- | // 3) Say hello to the world | ||
- | System.out.println(" | ||
- | } | ||
- | } | ||
- | </ | ||
- | - On the host you have to determine which port number your operating system has assigned to the port | ||
- | - Open any terminal program, such as //putty//, // | ||
- | - Alternatively, | ||
- | In the category // | ||
- | Under // | ||
- | - In order to use the terminal in eclipse you have to install the appropriate plugin, see [[software: |