Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.sim.mcu
Class USART

    java.lang.Object
      avrora.sim.mcu.AtmelInternalDevice
          avrora.sim.mcu.USART

public class USART
extends AtmelInternalDevice

The USART class implements a Universal Synchronous Asynchronous Receiver/Transmitter, which is a serial device on the Atmel microcontrollers. The ATMega128, for example, has two USARTs, USART0 and USART1. This implementation of the USART does not yet support "Synchronous Mode" or "Multi-processor Communication Mode". Also, this implementation does not search for parity errors or framing errors. Presumably, these errors will not occur.

Nested Class Summary
`protected class` | `USART.ControlRegisterA` UCSRnA (`ControlRegisterA`) is one of three control/status registers for the USART.
`protected class` | `USART.ControlRegisterB` UCSRnB (`ControlRegisterB`) is one of three control/status registers for the USART.
`protected class` | `USART.ControlRegisterC` UCSRnC (`ControlRegisterC`) is one of three control/status registers for the USART.
`protected class` | `USART.DataRegister` The `DataRegister` class represents a Transmit Data Buffer Register for a USART.
`static class` | `USART.Frame` A `USARTFrame` is a representation of the serial frames being passed between the USART and a connected device.
`protected class` | `USART.Receiver`
`protected class` | `USART.SerialPrinter` A simple implementation of the USARTDevice interface that connects to a USART on the processor.
`protected class` | `USART.Transmitter`
`protected class` | `USART.UBRRnHReg` The high byte of the Baud Rate register.
`protected class` | `USART.UBRRnLReg` The low byte of the Baud Rate register.
`static interface` | `USART.USARTDevice` The `USARTDevice` interface describes USARTs and other serial devices which can be connected to the USART.

Field Summary
`USART.USARTDevice` | `connectedDevice`

Fields inherited from class avrora.sim.mcu.AtmelInternalDevice
`devicePrinter, interpreter, mainClock, microcontroller, name, simulator`

Constructor Summary
`USART(java.lang.String subID, AtmelMicrocontroller m)`

Method Summary
`void` | `connect(USART.USARTDevice d)`
`void` | `receiveFrame(USART.Frame frame)`
`void` | `startReceive()` Initiate a receive between the UART and the connected device.
`USART.Frame` | `transmitFrame()`

Methods inherited from class avrora.sim.mcu.AtmelInternalDevice
`getClock, getIORegs, installIOReg, read16, write16`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### connectedDevice

    public USART.USARTDevice connectedDevice

Constructor Detail

### USART

    public USART(java.lang.String subID,
                 AtmelMicrocontroller m)

Method Detail

### transmitFrame

    public USART.Frame transmitFrame()

### receiveFrame

    public void receiveFrame(USART.Frame frame)

### connect

    public void connect(USART.USARTDevice d)

### startReceive

    public void startReceive()

  Initiate a receive between the UART and the connected device.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD