I am using PIC18F458 and i have don a program in MPLAB in C, which runs well during simulation process. But when i programmed the pic and connected Vdd, Vss, Oscillator, and disabled the MCLR pin in the real ckt and try to run the program, it is not working.I had set the GIE to 0.
Is there some connection missing? or some interrupt to be disabled?
Hi!
I think that something related to hardware is missing. Check the fuse settings for the oscillator according to the crystal that u r using. The MCLR pin should be pulled up.
I will be in a better position to help if u can uload ur C file or can explain the purpose of ur code.
It could also be timeing and errors due phisical properties of external componnents connected to PIC.
IE,: you connect u buzzer to PORTD,1 and PORTD,2. In a routine subsequently you toggle those two bits to create AC on beeper. In SIM, I'ts OK, in reality It doesn't work becouse of the capacitance of the buzzer.
Now I checked the Ckt by programming the pic using picsimulator-ide with basic language.Then the program is running well with the same hardware..So I think it is some problem with configuring or programming in MPLAB.
I want to utilise the advantages in programming with C as compared to Basic. Is there something more to do in MPLAB to make the program working..