[SOLVED] pic18 not simulating in proteus

Status
Not open for further replies.

h.sharma

Junior Member level 3
Joined
Jun 16, 2012
Messages
30
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,455
hello everyone when I am simulating for pic18 mc in proteus it is not simulating expected, bt it is working perfect 4 pic16

my hex file is running perfect in pic simulator and also in debugging in mplab

i am attaching my ckt simulating in proteus

there is no prob with proteus for pic16

plz tell me whats wrong with this ckt and how to simulate for pic18 in proteus

my code is
Code:
#include<p18f4550.h>
#include<delays.h>
int i,d;
#define us(d) for(i=0;i<d;i++){Delay1TCY();}
#define ms(d) for(i=0;i<d;i++){Delay1KTCY();}

void main(void){
TRISB=0x00;
TRISD=0X00;
while(1){
PORTB=0XFF;
PORTD=0XFF;
}
}
 

Attachments

  • 2.png
    24.1 KB · Views: 68
Last edited:

One issue is that the PORT pins RB0:RB4 are configured as ADC inputs, NOT digital I/O on device reset.


Reference: PIC18F2455/2550/4455/4550 Datasheet, Section: 10.2 PORTB, TRISB and LATB Registers, Page 116



Try the following port initialization:

Code:
LATB = 0x00;
ADCON1 = 0x0E;
TRISB = 0x00;


BigDog
 

thanx bigdogguru it worked after pulling up mclr

very very thanx
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…