Skip to content

GrimbleGrien/Embedded-Lab

Repository files navigation

Embedded Systems Lab - Readme

Project Setup

  • Open uVision.
  • Navigate to Project -> New uVision Project.
  • Select the path and give a filename (e.g., exp0).
  • Choose the INTEL -> 80C51GB option. 8051
  • Copy startup: Yes.

Adding Files

  • Within the project, click on the RGY icon for the clock.
  • Add source files by navigating to Project Directory -> Source Group (double click) -> Add Files.
  • Select the appropriate .A51 files and click OK.

Create .HEX file

  • click wizard icon left to RGY icon
  • Output <- menubar check create hex

Win51E

  • download file
  • set origin
  • set PC
  • set disassembly

Hardware

  • plug in J3/J7 port of trainer kit
  • turn on power trainer-kit & bb

Assignment and Pointers

CPU Operations

  • Load memory address to pointer: MOV DPTR, #9000H.
  • Access pointer: MOVX A, @DPTR.
  • Access variable: MOVX @DPTR, B.

Control Flow

  • Control transfer through functions and loops.
  • No explicit return keyword; use the JMP family to skip.
  • Sequential flow of control using labels and conditional jumps.

Sample Control Structure

Loop_1:
...
Loop_2:
...
CJMP Loop_1
Loop_3:
...
CJNE Loop_2

Compilation

Generating HEX File

  • Rebuild all target files in Keil Vision to generate the .hex file.
  • Open 51e Trainer and download the .hex file from the explorer.

Execution

  • Disassemble and set the start address to 8100H.
  • Set the PC to 8100H and run stepwise.

Logic Flow

  • Use conditional jumps (JC) for comparisons.
  • Run to break and inspect the logic.
  • Search key in memory to display the corresponding index.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published