8051 microcontroller

A

Thread Starter

aditya

I want to write a program in java that can work as an 8051 micro controller. can any body help?
 
P

Peter Butler

You could pay me to do it for you. But you should have the fun. For free I offer . . .

1) Start with your program memory.
a) load a hex file into program memory

2) Next make your 0x100 bytes of RAM

3) Next make your registers map to RAM

4) Instructions . . .
a) always have 3 instruction bytes handy short ins? slide the pre-fetched instructions add new instruction byte(s) as needed

b) start building a 256 entry switch/case

c) print operands & results unconditionally (add print control later)

5) Bit locations: table map location = f(bit_number>>3)

6) Good idea to count clocks for some specific 8051 implementation. They are NOT all the same.

7) Add timers GPIO and serial ports to taste.

Your hex file should only use instructions that you have implemented. Add to your hex file as you add to your case statements.
 
Top