You are on page 1of 18

:

IC







Mini-Computer
ROMRAMProcessor

Pins




MicroController
controller

Micro

PIC


AVR PIC
MICROCHIP PIC



PIC

A4,A3,A2,A1,A0PORTA
B7B0PORTB
R
RA0A0


VDD
VDD

VSS

VDD,VSS



Led Microcontroller
PIC bit








PIC16f84a
B0 LED

7805

VDD +

VSS



7805


LED
LED

7805
VDD +
VSS

VDD

VSS

VSS




B0
MikroC
setup








1.04


B0

void main()

TRISB=0B00000000;
PORTB=0B00000001;
}

build project
Ctrl+F9

build project
hex MikroC

first_experiment.hex hex

hex




PICPgm Programmer




hex
JDM





hardware







JDM

OK


Browse
first_experiment.hex



Open


PIC16F84A


MikroC

void main()
{

..
..
}

void main()

void

void main()


TRIS
PORTA TRISBPORTB
TRISA
TRIS
OUTPUT 0
INPUT 1


B0 PORTB
B0 TRISB
B0
TRISBB0
BIT

TRISB

TRISB

B7

B6

B5

B4

B3

B2

B1

B0

B7 B0

TRISB=0B00000000;

TRISB=0B00000000
B7

B6

B5

B4

B3

B2

B1

B0

0B
B0
PORT PORT
LOW -0HI 1


PORTB HIB0
B0
TRISBPORTB
B7 B0

PORTB

B7

B6

B5

B4

B3

B2

B1

B0

PORTB

PORTB=0B00000001;

PORTB=0B00000001
B7

B6

B5

B4

B3

B2

B1

B0

PORTB=0B00000001

TRISPORTB=0B00000001; ;
{ } TRISB=0B00000000;
syntax PORT TRIS
hex

void main()

TRISB=0B00000000;
PORTB=0B00000001;
}

void main()
TRISB B7 B0

B0
PORT
TRISB PORTB ;
trisb portb

MikroC

You might also like