Embedded System Lab # 1 Introduction to Software Tools

fiercebunElectronics - Devices

Nov 2, 2013 (3 years and 7 months ago)

47 views

Embedded System Lab

1

Embedded System Lab # 1

Introduction to Software Tools

MicroBasic Pro Compiler , PROTEUS, Education Kit

Eng. Wazen M. Shbair



Objectives

1.

To be familiar with some software tools like MicroBasic Pro , PROTEUS, and
experiments kit.

2.

To know how to make a pro
ject using MicroBasic and then get the hex file of
the software program of the project.

3.

How to simulate the hex file using PROTEUS.


Tools

PIC18F4550 Microcontroller,
microBasic
software, Proteus VSM simulation program.


Introduction

These programs are th
e backbone of the microprocessor and microcontroller based

systems; since using
MicroBasic
we can build the software of the project using

Basic
,
and then we can simulate the project virtually using PROTEUS, finally we can

download the program on the microc
ontroller and see the
results practically using
programmer
.

So this experiment includes all the knowledge the student will need to
get started to the

programs.


1. microBasic Program

mikroBasic is a Windows
-
based Integrated Development Environment, and
is much

more than just Basic compiler for PIC MCUs. With mikroBasic, you can:

1. Create Basic source code using the built
-
in Code Editor

2. Compile and link your source code

3. Inspect program flow and debug executable logic with Debugger

4. Monitor variab
les in Watch Window

5. Get error reports

6. Get detailed statistics (how compiled code utilizes PIC MCU memory, hex

map, charts and more...)


2. PROTEUS Program

Proteus contains everything you need to develop; test and virtually prototype your
embedded

sys
tem designs based around the Microchip Technologies™ PIC18 series of

microcontrollers. The unique nature of schematic based microcontroller simulation
with

Proteus facilitates rapid, flexible and parallel development of both the system
hardware and

the sys
tem firmware. This design synergy allows engineers to evolve
their projects more

quickly, empowering them with the flexibility to make hardware or
firmware changes at will

and reducing the time to market.

Proteus VSM models will
fundamentally work with the

exact same HEX file as you would

program the physical
device with, binary files (i.e. Intel or Motorola Hex files) produced b
ir
any assembler
or compiler.

Embedded System Lab

2

Part1 : Create
Program for Mic
rocontroller


Creating First Project in microBasic for P
IC


In this sec
tion , we will create a new project , write some code and compile it in
microbasic for PIC and test the result. Out project will make LED diodes blink, so it
can easily tested on PIC microcontrollers.


The following diagram show the connection scheme you’
ll need to test the code for the
microcontroller , we have used common chop in our experiments. LED diodes are
connected to PORTB, but you can use any other available port.







Embedded System Lab

3




Embedded System Lab

4



Embedded System Lab

5

Part 2 : Simulation in PROTEUS Program


A. Run the
PROTEUS Program



From start menu chose the PROTEUS, and then chose ISIS (blue).



To get a part click on Devices (P).



Write the name of the
PIC18
F
45
2
.



To get LED write led then choose yellow led.



To get a resistor write 1k and choose the first part.

B. Conne
ct the circuit shown in the Figure1 below on Proteus ISIS program.

C. Load the (.hex) file to PIC18
F
45
2

microcontroller.

D. Configure PIC18
F
45
2

parameters needed for the simulation by putting Processor


clock frequency 8MHz.

E.
Simulate the circuit using Proteus ISIS program.




Figures 1





Embedded System Lab

6

PIN Diagram