|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.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 | |
protected class |
ATMega128L.Pin
The Pin class implements a model of a pin on the ATmega128L for
the general purpose IO ports. |
class |
ATMega128L.SimImpl
|
| Field Summary | |
static int |
EEPROM_SIZE
|
static int |
FLASH_SIZE
|
static int |
HZ
|
static int |
IOREG_SIZE
|
static int |
IOREG_SIZE_103
|
static int |
NUM_PINS
|
protected static java.util.HashMap |
pinNumbers
|
protected ATMega128L.Pin[] |
pins
|
protected Simulator |
simulator
|
static int |
SRAM_SIZE
|
| Constructor Summary | |
|
ATMega128L(boolean compatibility)
The constructor for the default instance. |
protected |
ATMega128L(Program p,
boolean compatibility)
|
| Method Summary | |
double |
cyclesToMillis(long cycles)
The cyclesToMillis() method converts the specified number
of cycles to a time quantity in milliseconds. |
int |
getEEPromSize()
The getEEPromSize() method returns the size in bytes of
the EEPROM on this hardware device. |
int |
getFlashSize()
The method returns the size in bytes of
the flash memory on this hardware device. |
int |
getHz()
The getHZ() method returns the number of cycles per second
at which this hardware device is designed to run. |
int |
getIORegSize()
The getIORegSize() method returns the number of IO registers
that are present on this hardware device. |
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. |
int |
getPinNumber(java.lang.String name)
The getPinNumber() method looks up the named pin and returns
its number. |
int |
getRamSize()
The getRamSize() method returns the number of bytes of
SRAM present on this hardware device. |
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. |
long |
millisToCycles(double ms)
The millisToCycles() method converts the specified number
of milliseconds to a cycle count. |
Microcontroller |
newMicrocontroller(Program p)
The newMicrocontroller() method is used to instantiate a
microcontroller instance for the particular program. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int HZ
public static final int SRAM_SIZE
public static final int IOREG_SIZE
public static final int IOREG_SIZE_103
public static final int FLASH_SIZE
public static final int EEPROM_SIZE
public static final int NUM_PINS
protected static final java.util.HashMap pinNumbers
protected final Simulator simulator
protected final ATMega128L.Pin[] pins
| Constructor Detail |
public ATMega128L(boolean compatibility)
protected ATMega128L(Program p,
boolean compatibility)
| Method Detail |
protected void installPins()
public int getRamSize()
getRamSize() method returns the number of bytes of
SRAM present on this hardware device. On the Atmega128L
this number is 4096 (4KB).
getRamSize in interface MicrocontrollerPropertiespublic int getIORegSize()
getIORegSize() method returns the number of IO registers
that are present on this hardware device. On the Atmega128L
this number is 224 (256 - 32).
getIORegSize in interface MicrocontrollerPropertiespublic int getFlashSize()
method returns the size in bytes of
the flash memory on this hardware device. The flash memory stores the
initialized data and the machine code instructions of the program. On
the Atmega128L, this number is 131,072 (128K).
- Specified by:
getFlashSize in interface MicrocontrollerProperties
- Returns:
- the size of the flash memory in bytes
public int getEEPromSize()
getEEPromSize() method returns the size in bytes of
the EEPROM on this hardware device. On the ATmega128L, this number is
4096.
getEEPromSize in interface MicrocontrollerPropertiespublic 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 MicrocontrollerPropertiesi - 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 MicrocontrollerSimulator instance corresponding to this
devicepublic int getHz()
getHZ() method returns the number of cycles per second
at which this hardware device is designed to run. The
Atmega128L runs at 7.3278MHz, so this method will return 7,327,800.
getHz in interface MicrocontrollerPropertiespublic long millisToCycles(double ms)
millisToCycles() method converts the specified number
of milliseconds to a cycle count. The conversion factor used is the
number of cycles per second of this device. This method serves as a
utility so that clients need not do repeated work in converting
milliseconds to cycles and back.
millisToCycles in interface MicrocontrollerPropertiesms - a time quantity in milliseconds as a double
public double cyclesToMillis(long cycles)
cyclesToMillis() method converts the specified number
of cycles to a time quantity in milliseconds. The conversion factor used
is the number of cycles per second of this device. This method serves
as a utility so that clients need not do repeated work in converting
milliseconds to cycles and back.
cyclesToMillis in interface MicrocontrollerPropertiescycles - the number of cycles
public 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 MicrocontrollerPropertiesname - the name of the pin; for example "PA0" or "OC1A"
public Microcontroller newMicrocontroller(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 MicrocontrollerFactoryp - the program to load onto the microcontroller
Microcontroller instance that represents the
specific hardware device with the program loaded onto itpublic Microcontroller.Pin getPin(int num)
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.
getPin in interface Microcontrollernum - the pin number to look up
Pin object corresponding to
the named pin if it exists; null otherwisepublic 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 Microcontrollername - the name of the pin; for example "PA0" or "OC1A"
Pin object corresponding to
the named pin if it exists; null otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||