Datasheet
Page 5
Let’s make a simple “Hello world” example
for the selected microcontroller. First thing
embedded programmers usually write is a simple
LED blinking program. So, let’s do that in a few
simple lines of Pascal code.
LED blinking is just turning ON and OFF LEDs that
are connected to desired PORT pins. In order to see
the example in action, it is necessary to connect
the target microcontroller according to schematics
shown on Figure 2-1. In the project we are about
to write, we will use only PORT0, so you should
connect the LEDs to PORT0 only.
Priortocreatinganewproject,itisnecessarytodothefollowing:
Step 1: Install the compiler
Install the mikroPascal PRO for 8051 compiler from the Product
DVDordownloaditfromtheMikroElektronikawebsite:
http://www.mikroe.com/mikropascal/8051/
Step 2: Start up the compiler
Double click on the compiler icon in the Start menu, or on your desktop
to Start up the mikroPascal PRO for 8051 compiler. The mikroPascal
PROfor8051IDE(IntegratedDevelopmentEnvironment)willappear
on the screen. Now you are ready to start creating a new project.
2. Hardware Connection
VCC-MCU
P0.7
P0.6
P0.5
P0.4
P0.3
P0.2
P0.1
P0.0
C1 C2 C3
X1
R1
U1 U2
R2
P0.7
P0.6
P0.5
P0.4
P0.2
P0.1
P0.0
P0.3
R3
4K7
R7
4K7
R4
4K7
R8
4K7
R5
4K7
R9
4K7
R6
4K7
R10
4K7
LD0
LED
LD4
LED
LD1
LED
LD5
LED
LD2
LED
LD6
LED
LD3
LED
LD7
LED
Figure 2-1:
Hardware connection schematics