To be clear. MPSIM is how I solved the problem. My card not working is how I found there was a problem.
OK, I think I get it now. PBP expects BSR to be cleared. So anything that happens in BANK 0 doesn't need to have bank 0 selected. That makes perfect sense. It also clears up why cnt doesn't inc even though the program just loops through the int over and over when it hangs. Cuz its in BANK 0!!
So the only thing I don't get now is why it works for you in Protus. Hmmm, I have been thinking about getting this next year (they say support for 16F1xxx's should happen then), but things like this just scare me.
Thanks for pointing out BSR=0 should be the first thing, I guess every so often I am not adding 1 to count right now. And THANK YOU so much for finally clearing this up for me. It has been a struggle for a couple weeks now.
For the record, I have not been chasing a problem in MPSIM, the problem is in real life on a real life card. When the LED quit flashing, I knew there was a problem. It was real simple to keep reming the line, programming the actual chip, watch it fail. un-rem the line, program the actual chip, watch it run. After doing this over and over, I decided there was a problem I didn't understand and posted.
Bookmarks