:?
Hi i´m new here, I´m from Bogotá, Colombia and I have a question.
i don´t know wether the issue i´m having programming a PIC 16f877 is very simple or not, however I do know it´s driving me crazy.
Well, I have programmed this PIC (just assembly) to interface with an LCD and also some pushbuttons. Right now everything works, however when i try to add even a little instruction, the microcontroller goes crazy.
I used the degug option in MPLAB and effectively there is problem, when the microcontroller goes into a certain Call subroutine it suddenly jumps to another call routine that is right before that one. I have checked all my labels and no problem there, But it is when I add even the slighttest code in some other area that this problem occurs. I have also checked the pages numbers for both program and data memory. For program memory I´m below the 2000 words so I should be on page 0.
Also the pages for the data memory should be okay since the code works fine, up until i try to add any instruction.
I have also checked with the debugger the stack making sure that I don´t call more than 8 subroutines at the same time (I believe the stack is eight levels deep from the data sheet).
I would greatly appreciate if someone could help me out here. I have to say that this is the first time I´m programming with a PIC and I don´t know many things. On the other hand if the information provided here is not enough I would send code or explain more the problem.
Again thanks, if someone has a suggestion as to why this might be happening.
Ivan
Hi i´m new here, I´m from Bogotá, Colombia and I have a question.
i don´t know wether the issue i´m having programming a PIC 16f877 is very simple or not, however I do know it´s driving me crazy.
Well, I have programmed this PIC (just assembly) to interface with an LCD and also some pushbuttons. Right now everything works, however when i try to add even a little instruction, the microcontroller goes crazy.
I used the degug option in MPLAB and effectively there is problem, when the microcontroller goes into a certain Call subroutine it suddenly jumps to another call routine that is right before that one. I have checked all my labels and no problem there, But it is when I add even the slighttest code in some other area that this problem occurs. I have also checked the pages numbers for both program and data memory. For program memory I´m below the 2000 words so I should be on page 0.
Also the pages for the data memory should be okay since the code works fine, up until i try to add any instruction.
I have also checked with the debugger the stack making sure that I don´t call more than 8 subroutines at the same time (I believe the stack is eight levels deep from the data sheet).
I would greatly appreciate if someone could help me out here. I have to say that this is the first time I´m programming with a PIC and I don´t know many things. On the other hand if the information provided here is not enough I would send code or explain more the problem.
Again thanks, if someone has a suggestion as to why this might be happening.
Ivan