Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

pic16f877a in Proteus 8

Status
Not open for further replies.

Mohamed_Othman

New Member
Dear Friend
kindly i hope you inform me about what mean that error in picture attached , i am beginner in Proteus 8 ,

how to connect pic16f877a in Proteus 8 , what is wrong ?
after i am build program and save it as hex file , and upload file to micro controller , when run simulations not work

Untitled1.png


error-Untitled.png


file in attachment you see copy of picture and file of circuit from proteus 8

regards
 

Attachments

  • 1st paractical connetion of circuit of pic 16f877 with programing led sync .rar
    308.7 KB · Views: 526
Last edited by a moderator:
void main() {
trisb= 0b000000000; //portb is output , program port b is output
portb=0 ; // all leds is off
for ( ;; ) {
portb= 0b00101011 ;
delay_ms (10000) ;
portb = 0b11010100 ;
delay_ms(10000) ;
}
}
 
There is nothing wrong with that code...
The error window in Labcenter Proteus shows you have a pic location violation!!! MikroC is compiling the hex file wrong.

In MikroC make sure all the libraries in Library manager are unchecked... Also make sure the project is set for a pic16f877..
 
There is nothing wrong with that code...
The error window in Labcenter Proteus shows you have a pic location violation!!! MikroC is compiling the hex file wrong.

In MikroC make sure all the libraries in Library manager are unchecked... Also make sure the project is set for a pic16f877..
can you explain to me by screen shoot , hoe can i fix hex file from Micro C ?
 
whats wrong in this script

void main() {
char x;
trisb=0 ;
portb= 0;
for ( ; ; ) {
portb=0b0 ;
delay_ms(1000) ;
for (x=0 ; x<<8 ;x++ ) {
portb=portb<<1 ;
delay_ms(1000) ;
}
}
}
 
What is PIC168771 as you appear to be trying to compile for it. See line 9 of above image.

Mike.
 
What is PIC168771 as you appear to be trying to compile for it. See line 9 of above image.

Mike.
It's a Proteus thing... The correct part is modelled... That is the library part

I have now a copy of microC and compiled your code and run in Proteus... No problem at all
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top