Rangersfan
Newbie level 4
Hello Everyone,
I have been working on this code for a number of weeks and it is still not working. The area of concern is the PIC16877A interface to the RTC DS1307.
With the Pic Kit2 debugger hooked up in MPLAB the program gets stuck the second time it enters the WaitMSSP loop waiting for btfss PIR1,SSPIF.
When I press "F6" Processor Reset, the circuit works fine I can write and read all the data I want with the PIC Kit 2 debugger connected and it works repeatedly. When ever there is a new build or update to the chip programming the code gets stuck again at the btfss PIR1,SSPIF or if i try to see the information outside the MBLAB debug environment with the UART to my PC it does not work either, even if I cycle the circuit power.
I have tried to create a counter that will cause the program to jump to the reset vector (wishing) if this doesn't initiate properly but it just jumps to org 0000 which is unfortunately not creating the outcome I desire. I have tried to compare the file registers between the working and not working condition but so far it hasn't helped much.
i am continuously modifying the code, it is attached to this post..
Does anyone have any idea what could be going on here? I am running out of ideas and I would be appreciate any help you have to offer.
Thank you,
View attachment decisioncode with UART2.txt
I have been working on this code for a number of weeks and it is still not working. The area of concern is the PIC16877A interface to the RTC DS1307.
With the Pic Kit2 debugger hooked up in MPLAB the program gets stuck the second time it enters the WaitMSSP loop waiting for btfss PIR1,SSPIF.
When I press "F6" Processor Reset, the circuit works fine I can write and read all the data I want with the PIC Kit 2 debugger connected and it works repeatedly. When ever there is a new build or update to the chip programming the code gets stuck again at the btfss PIR1,SSPIF or if i try to see the information outside the MBLAB debug environment with the UART to my PC it does not work either, even if I cycle the circuit power.
I have tried to create a counter that will cause the program to jump to the reset vector (wishing) if this doesn't initiate properly but it just jumps to org 0000 which is unfortunately not creating the outcome I desire. I have tried to compare the file registers between the working and not working condition but so far it hasn't helped much.
i am continuously modifying the code, it is attached to this post..
Does anyone have any idea what could be going on here? I am running out of ideas and I would be appreciate any help you have to offer.
Thank you,
View attachment decisioncode with UART2.txt