Presentation is loading. Please wait.

Presentation is loading. Please wait.

8051 Development System Details

Similar presentations


Presentation on theme: "8051 Development System Details"— Presentation transcript:

1 8051 Development System Details
EE/CS-352: Embedded Microcontroller Systems

2 EE/CS-352: Embedded Microcontroller Systems
Program Download Program gets downloaded via a JTAG protocol to flash memory in the chip. EE/CS-352: Embedded Microcontroller Systems

3 Assembly / Compilation
Assemble/Compile – only assembles, used for initial debugging. Build/Make Project – assembles and links (builds) files - only builds files that have changed since last build. Rebuild Active Project – forces a build of all files and their dependencies EE/CS-352: Embedded Microcontroller Systems

4 More details on the files generated
blink.wsp - project file blink.asm  - source file                   blink.LST - list file blink.OBJ - relocatable object file                     blink.M51 - linker map file BLINK - absolute object file - program that gets downloaded Linker map file (.M51) and absolute object file, are generated on each build/make, but they may be named with the base name of the first program compiled in a new project. You can use the menu: Project – Target Build Configuration to set “absolute OMF file name” more appropriately. It is not necessary to do that, but it is good to know what is going on. EE/CS-352: Embedded Microcontroller Systems

5 EE/CS-352: Embedded Microcontroller Systems
Reset Three ways to reset the processor: When unconnected, press the reset button on the board. When connected, press the RESET button on the IDE. Watchdog timer overflow. On reset, program execution starts here. EE/CS-352: Embedded Microcontroller Systems

6 EE/CS-352: Embedded Microcontroller Systems
What Happens at Reset? CPU halts operation SFRs are initialized to default values External pins set to a known state Interrupts and Timers turned off System clock defaults to 2MHz internal clock PC reset Watchdog timer set with longest timeout period EE/CS-352: Embedded Microcontroller Systems

7 Ways of specifying HEX numbers in assembler code
0x prefix Example: 0xF4 h suffix Example: 33h EE/CS-352: Embedded Microcontroller Systems

8 EE/CS-352: Embedded Microcontroller Systems
Watchdog Timer 21-bit timer runs off system clock (intially 2MHz) Overflow of timer causes reset Software must either disable watchdog timer, or periodically reset the timer so that it does not overflow Timer can be “locked” to prevent disabling EE/CS-352: Embedded Microcontroller Systems

9 More details of the Assembly process
The following code is produced in code memory by the assembler: cseg at 0 mov a, #0 mov 0x30, a mov DPTR, #0x445a nop Pages give the number of bytes per 8051 instruction for the C8051F020. Address Program Code 0000 74 99 0002 F5 30 0004 A 0007 00 EE/CS-352: Embedded Microcontroller Systems


Download ppt "8051 Development System Details"

Similar presentations


Ads by Google