|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.sim.mcu.ATMegaFamily avrora.sim.mcu.ATMega128L
The ATMega128L
class represents the Microcontroller
instance that has all the
hardware parameters of the ATMega128L microcontroller as produced by Atmel Corporatation.
Nested Class Summary | |
static interface |
ATMega128L.ADCInput
The ADCInput interface is used by inputs into the analog to digital converter. |
protected static interface |
ATMega128L.Clock
Interface for an alternate clock. |
class |
ATMega128L.SimImpl
|
static interface |
ATMega128L.SPIDevice
Interface for devices that can connect to the SPI. |
static interface |
ATMega128L.USARTDevice
The USARTDevice interface describes USARTs and other serial devices which can be connected
to the USART. |
Nested classes inherited from class avrora.sim.mcu.ATMegaFamily |
ATMegaFamily.FlagRegister, ATMegaFamily.MaskableInterrupt, ATMegaFamily.MaskRegister, ATMegaFamily.Pin |
Nested classes inherited from class avrora.sim.mcu.Microcontroller |
Microcontroller.Pin |
Field Summary | |
protected ATMega128L.SimImpl.ADC |
adc
|
static int |
ATMEGA128L_IOREG_SIZE
|
static int |
ATMEGA128L_IOREG_SIZE_103
|
static int |
ATMEGA128L_SRAM_SIZE
|
static int |
ATMEGA128L_SRAM_SIZE_103
|
protected static java.util.HashMap |
pinNumbers
|
protected ATMega128L.SimImpl.PowerManagement |
pm
|
protected Radio |
radio
The Radio connected to this microcontroller. |
protected ATMega128L.SimImpl.SPI |
spi
|
Fields inherited from class avrora.sim.mcu.ATMegaFamily |
clock, EEPROM_SIZE, FLASH_SIZE, HZ, interpreter, IOREG_SIZE, NUM_PINS, pinPrinter, pins, simulator, SRAM_SIZE |
Constructor Summary | |
|
ATMega128L(boolean compatibility)
The constructor for the default instance. |
protected |
ATMega128L(int id,
InterpreterFactory f,
Program p,
boolean compatibility)
|
Method Summary | |
void |
connectADCInput(ATMega128L.ADCInput d,
int bit)
Connect an instance of the ADCInput interface to the ADC of this microcontroller. |
void |
connectSPIDevice(ATMega128L.SPIDevice d)
Connect an instance of the SPIDevice interface to the SPI of this microcontroller. |
byte |
getMode()
get the current mode of the mcu |
java.lang.String |
getModeName()
get the name of the current mode |
Microcontroller.Pin |
getPin(java.lang.String name)
The getPin() method looks up the named pin and returns a reference to that pin. |
int |
getPinNumber(java.lang.String name)
The getPinNumber() method looks up the named pin and returns its number. |
Radio |
getRadio()
|
Simulator |
getSimulator()
The getSimulator() method gets a simulator instance that is capable of emulating this
hardware device. |
protected void |
installPins()
|
boolean |
isSupported(InstrPrototype i)
The isSupported() method allows a client to query whether a particular instruction is
implemented on this hardware device. |
Microcontroller |
newMicrocontroller(int id,
InterpreterFactory f,
Program p)
The newMicrocontroller() method is used to instantiate a microcontroller instance for the
particular program. |
void |
setRadio(Radio radio)
|
void |
sleep()
send to mcu to sleep |
int |
wakeup()
wake the mcu up |
Methods inherited from class avrora.sim.mcu.ATMegaFamily |
cyclesToMillis, getEEPromSize, getFlashSize, getHz, getIORegSize, getPin, getRamSize, millisToCycles |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface avrora.sim.mcu.Microcontroller |
getPin |
Methods inherited from interface avrora.sim.mcu.MicrocontrollerProperties |
cyclesToMillis, getEEPromSize, getFlashSize, getHz, getIORegSize, getRamSize, millisToCycles |
Field Detail |
public static final int ATMEGA128L_IOREG_SIZE
public static final int ATMEGA128L_IOREG_SIZE_103
public static final int ATMEGA128L_SRAM_SIZE
public static final int ATMEGA128L_SRAM_SIZE_103
protected static final java.util.HashMap pinNumbers
protected ATMega128L.SimImpl.SPI spi
protected ATMega128L.SimImpl.ADC adc
protected ATMega128L.SimImpl.PowerManagement pm
protected Radio radio
Constructor Detail |
public ATMega128L(boolean compatibility)
protected ATMega128L(int id, InterpreterFactory f, Program p, boolean compatibility)
Method Detail |
protected void installPins()
public boolean isSupported(InstrPrototype i)
isSupported()
method allows a client to query whether a particular instruction is
implemented on this hardware device. Older implementations of the AVR instruction set preceded the
introduction of certain instructions, and therefore did not support the new instructions.
isSupported
in interface MicrocontrollerProperties
i
- the instruction prototype of the instruction
public Simulator getSimulator()
getSimulator()
method gets a simulator instance that is capable of emulating this
hardware device.
getSimulator
in interface Microcontroller
Simulator
instance corresponding to this devicepublic int getPinNumber(java.lang.String name)
getPinNumber()
method looks up the named pin and returns its number. 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.
getPinNumber
in interface MicrocontrollerProperties
name
- the name of the pin; for example "PA0" or "OC1A"
public Microcontroller newMicrocontroller(int id, InterpreterFactory f, Program p)
newMicrocontroller()
method is used to instantiate a microcontroller instance for the
particular program. It will construct an instance of the Simulator
class that has all the
properties of this hardware device and has been initialized with the specified program.
newMicrocontroller
in interface MicrocontrollerFactory
p
- the program to load onto the microcontroller
Microcontroller
instance that represents the specific hardware device with the
program loaded onto itpublic Microcontroller.Pin getPin(java.lang.String name)
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.
getPin
in interface Microcontroller
name
- the name of the pin; for example "PA0" or "OC1A"
Pin
object corresponding to the named pin if it exists; null
otherwisepublic void connectSPIDevice(ATMega128L.SPIDevice d)
SPIDevice
interface to the SPI of this microcontroller.
public void connectADCInput(ATMega128L.ADCInput d, int bit)
ADCInput
interface to the ADC of this microcontroller. The ADC
unit on the ATMega128L can support up to 8 ADC inputs, on bits 0 - 7.
public void setRadio(Radio radio)
setRadio
in interface Microcontroller
public Radio getRadio()
getRadio
in interface Microcontroller
public void sleep()
sleep
in interface Microcontroller
Microcontroller.sleep()
public int wakeup()
wakeup
in interface Microcontroller
Microcontroller.wakeup()
public byte getMode()
getMode
in interface Microcontroller
Microcontroller.getMode()
public java.lang.String getModeName()
getModeName
in interface Microcontroller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |