Thank you for taking the time to view my post.
I have recently started to use a PIC18LF26k22 as an upgrade from a PIC16F690. I am programming in assembly. I have checked all my initialization to make sure all is correct. I have read the datasheet and understand the mapping of the data memory, sfr, and the program allocation in the PIC18LF26k22. I also familiarized myself with the access bank and the use of the BSR. All of my data memory is held in bank zero so I am not using the BSR and just using access bank accordingly in my programming. I have done the "Hello World" to verify all is correct to that point. I then started to convert my program for the 16F690 over to the PIC18LF26k22 which is for control of an LCD which I know is proven for the PIC16F690. In single blocking through the code after the conversion the code runs fine, goes from before the call, runs the call for the correct time, and returns to a breakpoint set right after the call. The call is for a one second delay which is at 8mhz. As you can see in my code below, I have set a led to light at the point where I am having an issue, I use the led to signal to me that the code is correct at that point in code and not getting lost or reset. I started with the led before the call and tested it to check code, and it functioned fine, I then placed the led at the beginning in the subroutine and all was fine. I stepped the led through the code to where you see it in the code. At that point it does not light stating to me that the code is not functioning correctly here.
I would like some guidance on where I am wrong in my efforts to convert this program that functions fine w/ a PIC16F690. I have replaced the delay+1 with another named variable that was listed w/in my cblock to see if having not using the upper half of the delay variable made any difference, but found none in my testing. I am not sure what to do now and was hoping for assistance from some more qualifies eyes and minds.
Thankful for your help,
Peaches
I have recently started to use a PIC18LF26k22 as an upgrade from a PIC16F690. I am programming in assembly. I have checked all my initialization to make sure all is correct. I have read the datasheet and understand the mapping of the data memory, sfr, and the program allocation in the PIC18LF26k22. I also familiarized myself with the access bank and the use of the BSR. All of my data memory is held in bank zero so I am not using the BSR and just using access bank accordingly in my programming. I have done the "Hello World" to verify all is correct to that point. I then started to convert my program for the 16F690 over to the PIC18LF26k22 which is for control of an LCD which I know is proven for the PIC16F690. In single blocking through the code after the conversion the code runs fine, goes from before the call, runs the call for the correct time, and returns to a breakpoint set right after the call. The call is for a one second delay which is at 8mhz. As you can see in my code below, I have set a led to light at the point where I am having an issue, I use the led to signal to me that the code is correct at that point in code and not getting lost or reset. I started with the led before the call and tested it to check code, and it functioned fine, I then placed the led at the beginning in the subroutine and all was fine. I stepped the led through the code to where you see it in the code. At that point it does not light stating to me that the code is not functioning correctly here.
I would like some guidance on where I am wrong in my efforts to convert this program that functions fine w/ a PIC16F690. I have replaced the delay+1 with another named variable that was listed w/in my cblock to see if having not using the upper half of the delay variable made any difference, but found none in my testing. I am not sure what to do now and was hoping for assistance from some more qualifies eyes and minds.
Thankful for your help,
Peaches
Attachments
-
788 bytes Views: 8