avrora.sim.mcu
Interface Microcontroller

All Superinterfaces:
MicrocontrollerProperties
All Known Implementing Classes:
ATMega128L

public interface Microcontroller
extends MicrocontrollerProperties

The Microcontroller interface corresponds to a hardware device that implements the AVR instruction set. This interface contains methods that get commonly needed information about the particular hardware device and and can load programs onto this virtual device.


Nested Class Summary
static interface Microcontroller.Pin
          The Pin interface encapsulates the notion of a physical pin on the microcontroller chip.
 
Method Summary
 Microcontroller.Pin getPin(int num)
          The getPin() method looks up the specified pin by its number and returns a reference to that pin.
 Microcontroller.Pin getPin(java.lang.String name)
          The getPin() method looks up the named pin and returns a reference to that pin.
 Radio getRadio()
           
 Simulator getSimulator()
          The getSimulator() method gets a simulator instance that is capable of emulating this hardware device.
 void setRadio(Radio r)
           
 
Methods inherited from interface avrora.sim.mcu.MicrocontrollerProperties
cyclesToMillis, getEEPromSize, getFlashSize, getHz, getIORegSize, getPinNumber, getRamSize, isSupported, millisToCycles
 

Method Detail

getSimulator

public Simulator getSimulator()
The getSimulator() method gets a simulator instance that is capable of emulating this hardware device.

Returns:
a Simulator instance corresponding to this device

getPin

public Microcontroller.Pin getPin(java.lang.String name)
The getPin() method looks up the named pin and returns a reference to that pin. Names of pins should be UPPERCASE. The intended users of this method are external device implementors which connect their devices to the microcontroller through the pins.

Parameters:
name - the name of the pin; for example "PA0" or "OC1A"
Returns:
a reference to the Pin object corresponding to the named pin if it exists; null otherwise

getPin

public Microcontroller.Pin getPin(int num)
The getPin() method looks up the specified pin by its number and returns a reference to that pin. The intended users of this method are external device implementors which connect their devices to the microcontroller through the pins.

Parameters:
num - the pin number to look up
Returns:
a reference to the Pin object corresponding to the named pin if it exists; null otherwise

setRadio

public void setRadio(Radio r)

getRadio

public Radio getRadio()