jmce - 1_02

jmce.atmel
Class AT24C16

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.sim.memory.AbstractMemory
              extended by jmce.sim.memory.PlainMemory
                  extended by jmce.sim.memory.PersistentMemory
                      extended by jmce.atmel.AT24C16
All Implemented Interfaces:
Hardware, I2cSlave, Memory, MemoryWriteListener, Peripheral, ResetListener, TimerListener

public class AT24C16
extends PersistentMemory
implements I2cSlave

Atmel AT24C16 2048 byte EEprom. I2c Memory at address A0-AF

Version:
1.00
Author:
Mario Viara
See Also:
I2cBus

Field Summary
 
Fields inherited from class jmce.sim.memory.PlainMemory
memory, tmpMemory
 
Fields inherited from class jmce.sim.memory.AbstractMemory
size, vms
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Constructor Summary
AT24C16()
           
 
Method Summary
 boolean i2cAddress(int address)
          Check if the address is managed by this peripheral
 int i2cRead(int count)
          Read one byte
 boolean i2cWrite(int count, int value)
          Write one byte.
 
Methods inherited from class jmce.sim.memory.PersistentMemory
filename, getFilename, init, load, registerCPU, reset, setFilename, timerExpired, writeMemory
 
Methods inherited from class jmce.sim.memory.PlainMemory
allocMemory, copyMemory, get, reset, set, setSize
 
Methods inherited from class jmce.sim.memory.AbstractMemory
addHardwareMemory, addMemory, addMemoryReadListener, addMemoryReadListener, addMemoryWriteListener, addMemoryWriteListener, clrBit, getMemory, getMemoryAt, getMemoryCount, getMemoryName, getMemoryReadListenerAt, getMemoryReadListenerAt, getMemoryReadListenerCount, getMemoryReadListenerCount, getMemoryWriteListenerAt, getMemoryWriteListenerAt, getMemoryWriteListenerCount, getMemoryWriteListenerCount, getReadOnly, getSize, isBit, mapAddress, mapMemory, removeMemoryReadListener, removeMemoryReadListener, removeMemoryWriteListener, removeMemoryWriteListener, setBit, setMemory, setMemoryName, setReadOnly, setReadOnly, setReadOnly, toString
 
Methods inherited from class jmce.sim.AbstractPeripheral
idle, setIdle, setLive
 
Methods inherited from class jmce.sim.AbstractHardware
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 
Methods inherited from interface jmce.sim.Peripheral
idle
 

Constructor Detail

AT24C16

public AT24C16()
Method Detail

i2cAddress

public boolean i2cAddress(int address)
Description copied from interface: I2cSlave
Check if the address is managed by this peripheral

Specified by:
i2cAddress in interface I2cSlave
Parameters:
address - - Address to check.
Returns:
true if the address is relative to this slave.

i2cWrite

public boolean i2cWrite(int count,
                        int value)
                 throws SIMException
Description copied from interface: I2cSlave
Write one byte.

Specified by:
i2cWrite in interface I2cSlave
Throws:
SIMException

i2cRead

public int i2cRead(int count)
            throws SIMException
Description copied from interface: I2cSlave
Read one byte

Specified by:
i2cRead in interface I2cSlave
Throws:
SIMException

jmce - 1_02