I'm trying to use Master clear(MCLR) on a pic18f4550 with Proteus, but whenever I press the button to do so, the red and blue dots that represent on and off in Proteus turn yellow and the LED doesn't turn off.
I'm trying to replicate a Proteus file that my professor used and it worked perfectly, but even though it seems my file is looking exactly the same as his, it doesn't work.
Here's my circuit:
,
M professor's circuit:
,
and here's what happens when I press the MCLR button:
.
Here's the code, but I'm pretty sure that's not the problem
#include <p18f4550.h>
#include <delays.h>
#pragma config FOSC = HS
#pragma config PWRT = ON
#pragma config PBADEN = OFF
#pragma config WDT = OFF
#pragma config LVP = OFF
#pragma config MCLRE = ON
void main()
{
TRISB=0x00;
PORTB=0b11111111;
while (1){
PORTBbits.RB1 = 0;
Delay1KTCYx(100);
PORTBbits.RB1 = 1;
Delay1KTCYx (100);
}
}
The only error message I get is from Proteus, that says:
[PIC18]PC=0x00BC $MCLR$ is low. Processor is in reset.