|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpicmicrocontroller.PIC
public class PIC
This class represents a PIC 16F877.
Field Summary | |
---|---|
static int |
_PORTA
|
static int |
_PORTB
|
static int |
_PORTC
|
static int |
_PORTD
|
static int |
_PORTE
|
static int |
_TRISA
|
static int |
_TRISB
|
static int |
_TRISC
|
static int |
_TRISD
|
static int |
_TRISE
|
static int |
_W
|
static int |
ADCON0
|
static int |
ADCON1
|
protected ADConverter |
adConverter
|
static int |
ADRESH
|
static int |
ADRESL
|
double[] |
analog
analog data analog[0-3] PORTA.0-3 analog[4] PORTA.5 analog [5-7] PORTE.0-2 |
static int |
BANK0
|
static int |
BANK1
|
static int |
BANK2
|
static int |
BANK3
|
protected DataMemory |
dataMemory
|
java.lang.String |
fileName
|
FlashProgramMemory |
flashProgramMemory
|
static int |
FSR
|
static int |
INDIRECT
|
static int |
INTCON
|
static int |
OPTION_REG
|
static int |
PCL
|
static int |
PCLATH
|
static int |
PR2
|
protected ProgramCounter |
programCounter
|
protected java.util.Stack |
ProgramCounterStack
|
SimulatorFrame |
simulatorFrame
|
static int |
STATUS
|
SimThread |
task1
|
java.util.concurrent.ExecutorService |
threadExecutor
|
boolean |
threadFromPause
|
boolean |
threadPaused
|
static int |
TMR0
|
static int |
TXSTA
|
protected Register |
WDT
|
protected Register |
wreg
|
Constructor Summary | |
---|---|
PIC(SimulatorFrame frame,
java.lang.String name)
Main constructor of the PIC class. |
Method Summary | |
---|---|
Instruction |
decodeInstr(int iCode)
This method decodes an instruction code and returns an Instruction object which may be used for simulation. |
void |
finishSimulation()
This method closes the simulator thread. |
ADConverter |
getADConverter()
|
DataMemory |
getDataMemory()
|
FlashProgramMemory |
getFlashProgramMemory()
|
ProgramCounter |
getProgramCounter()
|
SimulatorFrame |
getSimulatorFrame()
|
static void |
main(java.lang.String[] args)
Main procedure for testing. |
void |
readHEX(java.lang.String inFileName)
This method gets a HEX file and uploads it to the flash program memory |
void |
setDataMemory(DataMemory dataMemory)
|
void |
setFlashProgramMemory(FlashProgramMemory flashProgramMemory)
|
void |
setProgramCounter(ProgramCounter programCounter)
|
void |
simulatePIC()
This method loads the hex file specified by the filename and creates a thread to simulate PIC cycles. |
void |
sleep()
This method is used to pause the simulation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int BANK0
public static int BANK1
public static int BANK2
public static int BANK3
public static int _W
public static final int INDIRECT
public static final int TMR0
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 ADRESH
public static final int ADRESL
public static final int ADCON0
public static final int ADCON1
public static final int OPTION_REG
public static final int PR2
public static final int TXSTA
public static int _PORTA
public static int _PORTB
public static int _PORTC
public static int _PORTD
public static int _PORTE
public static int _TRISA
public static int _TRISB
public static int _TRISC
public static int _TRISD
public static int _TRISE
protected DataMemory dataMemory
public FlashProgramMemory flashProgramMemory
protected Register wreg
protected ProgramCounter programCounter
protected java.util.Stack ProgramCounterStack
protected Register WDT
protected ADConverter adConverter
public double[] analog
public SimulatorFrame simulatorFrame
public java.util.concurrent.ExecutorService threadExecutor
public SimThread task1
public boolean threadPaused
public boolean threadFromPause
public java.lang.String fileName
Constructor Detail |
---|
public PIC(SimulatorFrame frame, java.lang.String name)
Method Detail |
---|
public void readHEX(java.lang.String inFileName) throws java.io.IOException
inFileName
-
java.io.IOException
public Instruction decodeInstr(int iCode)
iCode
- instruction code
public static void main(java.lang.String[] args) throws java.io.IOException
args
-
java.io.IOException
public void simulatePIC() throws java.io.IOException
java.io.IOException
public void finishSimulation()
public DataMemory getDataMemory()
public void setDataMemory(DataMemory dataMemory)
dataMemory
- the dataMemory to setpublic FlashProgramMemory getFlashProgramMemory()
public void setFlashProgramMemory(FlashProgramMemory flashProgramMemory)
flashProgramMemory
- the flashProgramMemory to setpublic SimulatorFrame getSimulatorFrame()
public ProgramCounter getProgramCounter()
public void setProgramCounter(ProgramCounter programCounter)
programCounter
- the programCounter to setpublic ADConverter getADConverter()
public void sleep()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |