Program done but pic does not execute it !!

Status
Not open for further replies.
how do i single step ?
 
I converted your program to HiTech C and it works on the ISIS..


I also attached the isis sim and the hex file. You may try my hex file and see if it works on your ISIS circuit.

Allen
Thanks for the program , but why it does not work with my original one , thats so bizzare .
 
Thanks for the program , but why it does not work with my original one , thats so bizzare .

Well, did you compare your original one with my converted C? And the changes I made on the ISIS circuit?

I inserted the "ADCON1 = 6" in my program which was missing in your program, without which my ISIS refuse to work. I also added resistors to MCLR and RA0 , as I have mentioned earlier, in order to make the simulator work. These addons are not optional.

You could also do single stepping as Ian has told you to and see if your program does work as you expected.

Allen
 
how do i single step ??
and what is the meaning of ADCON1=6 ?
 
Single stepping through the code in Isis lets you see the code line by line... On the bottom left there are the "Run", "Pause" and "stop" simulator controls....Once you "Pause" the simulation, you can open the code window and step through your code to see where mistakes are...
 
how do i single step ?

As Ian says, by simulating.

Since you never did it before, write a very simple program and learn how to simulate it, by single-stepping, that is, going step by step through it, to see how the registers change as per the actual code.

Once you understand what simulation is and what you are doing (that is, where to look after each step), do the same with the code that you expect to work.

Additional suggestion: whatever you do, always test one additional routine at a time.

The first time I heard the expression "divide and conquer" I believed that they were just words. Wrong I was! If something fails, it is, most probably, in the last section of code that you added. Easy to identify and correct. That suggestion should be carved in stone at the main square.
 
I will see that
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…