Hi guys, I ran into a problem with a program using the MAX7219_1 library. It appeared that I made some calls to communicate with the MAX as well in my main program and in interrupt routines. Problem was that when interrupts occured during the write to the MAX, and then the interrupt routine tries also to start a communication with the MAX, the result was unexpected.
The solution is, of course, to disable the INTCON_GIE in my main program before accessing the MAX and reactivate it afterwards, which I have done, and it works pretty well I was wondering if this couldn't be achieved in the MAX7219 library itself in the same way that it is done to prevent de data_hef_write to crash: - Save the present state of INTCON_GIE - Put INTCON_GIE to False - Execute the communication to the MAX - Set INTCON_GIE with the saved state. Note that my problem occured as well when using SPI_hardware (my prefered choice since I am using a PIC16F1705) as with the SPI_software What do you think of this idea ? This could also be extended to other libraries where such communication with external devices occurs (SPI, I2C, ....) Enjoy your evening, David -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/6b7e3091-0689-4179-9cd2-d7983ccdb88en%40googlegroups.com.
