Microcontroller Simulator Task 1 - Electronics Tutorials

NOP, JMP, Labels and the Program Counter PC

Open a browser window or tab containing the microcontroller simulator.

Copy and paste this program into the code editing area. Press F8 to assemble the code.
The ASSEMBLER translates human readable code into binary needed by the microcontroller chip.

Step the program and watch the PC register carefully. Answer the reviseOmatic questions on this task.

  • NOP is a command that does nothing for one processor clock cycle. It is used to provide tiny time delays.
  • PC is the program counter.
  • PC is a POINTER to the address of the instruction that is about to be executed.
  • After each instruction, one is added to PC to make it point to the next instruction.
  • There are a couple of exceptions to this rule. JMP (jump) commands make the program counter point to a completely new address.
  • JMP START causes the program to jump to the Destination Address labeled by START:
        NOP 
        NOP 
        NOP 
        NOP 
START: 
        NOP 
        NOP 
        NOP 
        NOP 
        JMP     START 

TASK: Add a couple more labels and jumps. This is like the snakes and ladders game. You can jump forwards or backwards.

Topics:

01-nop-jmp   02-LEDs   03-Heater   03-Tlight   04-SevSeg   05-Delay   06-H-Bridge   07-Interrupts   08-Gray   09-Stepper   doc   hex-num   index  

Flash:

sim  

PDF:

Microcontroller Simulator  

DOC:

Microcontroller Simulator   Microcontroller Simulator.   Microcontroller with Harvard Architecture  

Images:

architecture   assem-H-Bridge   assem-Heater-FC   assem-Heater   assem-Stepper   assem-TLIGHT-grid   Gray   pinout   sim-leds   sim-sev-seg-design   sim-sev-seg   sim-traffic  

 

Privacy Policy, © Copyright, Contact Information and Disclaimers

Site highly rated by Schoolzone.co.uk

Valid XHTML 1.0 Transitional

Valid CSS!