Hi Mr Taylor:
Please, don't think I'm trying to put my problems on your program, be sure I'm not looking for a guilty, I'm just trying to find a workaround to my problem. Your software is great, and that's what I'm using it, but I have an issue I need to fix. Maybe I need to change the post subject, because I'm not sure where the problem is.
If you are asking me for the I2C slave, is an specific purpose pic, reading analog inputs and sending it digitalized by I2C protocol, every 20ms.
Talking about my previous post, I know that VarsSaved_H is set every time you start the handle of an PBP High Priority interrupt. But I can see in your code that you only save the variables "if VarsSaved_H = 0 then" so if VarsSaved_H=1 when you enter the "SavePBP_H" routine you don't save then and VarsSaved_H keeps its value to 1. At the interrupt handling exiting the program again look for VarsSaved_H state to know if it needs to restore variables, as the system see VarsSaved_H=1 it restores some value that nobody has set.
As long as I can see VarsSaved_H is not initialized anywhere before entering "SavePBP_H" for the first time, so we can't know what value it has. If it is 1 then the problem appears. Are you agree?
I don't have any doubt that maybe my program has another problems, or maybe the I2C slave is generating me other issues, but I think that VarsSaved_H initialization should be done for a right execution.
To end, please accept my apologies if my English isn't good enough and you misunderstood my intentions. I'm just trying to find a solution to my problems, and making it public to maybe help other people
Greetings,
dcorraliza





Bookmarks