I am just starting my first MPLAB/C18 project. I've done tons of PIC programming before, but never with MPLAB, never with C18, and never with an 18 series PIC.
I have a new project set up and I am trying to get the basics working before I get out the bread board and really get down to business. The code that I currently have working doesn't seem to transfer to the simulator properly. PORTA and OSCCON do not change to the variables I tell them to. I've attached a screen shot to describe what I mean a little more.
Thanks for the suggestion. I tried that adjustment, with the same results.
I was under the impression that you use the i when you are using the ICD2? I am probably wrong on that, I will try to see if I can find out the right answer.
In this scenario I am using the built in "MPLAB SIM" Debugger
I ran the simulation on MPLAB (I use a 18F1320 as I'm familiar with it) your simulation seems right. You may have to disable A/D, CMCON that sort of thing with your PIC first.
You are probably right, I need to look into the A/D, CMCON, etc. more.
I hooked up the real chip to the code, and programmed it. It isn't switching _any_ of the pins high. I assume this is because I haven't set the config or data fuses. To tell it that in in INTRC, etc.
Looking through the datasheet, it seems like I need to set "CONFIG1H". I set CONFIG1H to the proper values by: