|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.models.pic.PicRegBank
PicRegBank - 512 8-bit-registers, organized in 4 banks including all special registers. The PIC16C84 only implements some of these registers, see documentation. The complexity of this class is high due to the memory-mapped architecture of the PIC-family. Remember this when you try to understand the code...
Field Summary | |
static int |
BANK0
|
static int |
BANK1
|
static int |
BANK2
|
static int |
BANK3
|
static int |
BANKCOUNT
|
static int |
BANKSIZE
|
PicByteReg |
eeadr
|
static int |
EEADR
|
PicEecon1Reg |
eecon1
|
static int |
EECON1
|
PicNoReg |
eecon2
|
static int |
EECON2
|
PicByteReg |
eedata
|
static int |
EEDATA
|
PicBitReg |
eepromInt
|
PicBitReg |
extInt
|
PicByteReg |
fsr
|
static int |
FSR
|
PicIndfReg |
indf
|
static int |
INDF
|
PicIntConReg |
intcon
|
static int |
INTCON
|
PicNoReg |
notImplemented
|
PicByteReg |
option
|
static int |
OPTION
|
PicPcReg |
pcl
|
static int |
PCL
|
PicWordReg |
pclath
|
static int |
PCLATH
|
PicPortReg |
porta
|
static int |
PORTA
|
PicPortReg |
portb
|
static int |
PORTB
|
PicBitReg |
rbInt
|
PicReg[] |
reg
|
PicByteReg |
status
|
static int |
STATUS
|
PicTimerReg |
tmr0
|
static int |
TMR0
|
PicBitReg |
tmr0Int
Interrupts |
PicWordReg |
trisa
|
static int |
TRISA
|
PicWordReg |
trisb
|
static int |
TRISB
|
Constructor Summary | |
PicRegBank(PicBreakPoint bp,
PicEpromBreakPoints epromBreakPoints)
Constructor, connect all addresses with different kinds of registers |
Method Summary | |
void |
buildGeneralPurposeRegisters(PicBreakPoint bp)
create and initialize the 36 GP registers of the PIC16C84 |
boolean |
getBit(int register,
int bit)
test a specified bit in a register with 7-bit-address |
int |
getFlatAddress(int register)
Get the absolute address including the bank-switching bits in the status register. |
int |
getMemorySize()
Capacity of the memory in words |
int |
getWordWidth()
Witdh of one word in bits |
void |
por()
Power-on-reset |
int |
read(int register)
read the value of a register with 7-bit-address |
int |
readMemory(int address)
Read a word from the memory |
void |
reset()
Reset, just call the registers reset method and fill some special registers |
void |
setBit(int register,
int bit,
boolean newValue)
set a specified bit in a register with 7-bit-address |
void |
write(int register,
int newValue)
write a new value into a register with 7-bit-address |
void |
writeMemory(int address,
int word)
Write a word into the memory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public PicReg[] reg
public PicNoReg notImplemented
public PicIndfReg indf
public PicTimerReg tmr0
public PicByteReg option
public PicPcReg pcl
public PicByteReg status
public PicByteReg fsr
public PicPortReg porta
public PicWordReg trisa
public PicPortReg portb
public PicWordReg trisb
public PicByteReg eedata
public PicByteReg eeadr
public PicEecon1Reg eecon1
public PicNoReg eecon2
public PicWordReg pclath
public PicIntConReg intcon
public static final int BANKSIZE
public static final int BANKCOUNT
public static final int BANK0
public static final int BANK1
public static final int BANK2
public static final int BANK3
public static final int INDF
public static final int PCL
public static final int STATUS
public static final int FSR
public static final int PCLATH
public static final int INTCON
public static final int PORTA
public static final int PORTB
public static final int TRISA
public static final int TRISB
public static final int TMR0
public static final int OPTION
public static final int EEDATA
public static final int EEADR
public static final int EECON1
public static final int EECON2
public PicBitReg tmr0Int
public PicBitReg extInt
public PicBitReg rbInt
public PicBitReg eepromInt
Constructor Detail |
public PicRegBank(PicBreakPoint bp, PicEpromBreakPoints epromBreakPoints)
Method Detail |
public void buildGeneralPurposeRegisters(PicBreakPoint bp)
public void por()
public void reset()
public int getWordWidth()
PicMemory
getWordWidth
in interface PicMemory
public int getMemorySize()
PicMemory
getMemorySize
in interface PicMemory
public int getFlatAddress(int register)
public int readMemory(int address)
PicMemory
readMemory
in interface PicMemory
public void writeMemory(int address, int word)
PicMemory
writeMemory
in interface PicMemory
public int read(int register)
public void write(int register, int newValue)
public void setBit(int register, int bit, boolean newValue)
public boolean getBit(int register, int bit)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |