Hi, Still looking for this kind of function, returning a simple code to reflect the reset condition of the PIC.
My main problem here is to know how to deal with the "u" (unchanged) bits In other words: if I evaluate the conditions in the order given in the table (reproduced earlier), and taking only the O and 1 into account (ignoring u and x), will it work ? Does anyone know of an applicaiton note (from microchip) on the subject ? Kind regards, David Le vendredi 9 juin 2023 à 19:31:10 UTC+2, Rob CJ a écrit : > Hi David, > > I was wondering what I should do this weekend 🙂. > > BTW. I am on Holiday - in The Netherlands - and I had a quick look at some > PICs and it looks as if it is different for various PICs also from the same > range (12F/16F/18F). Initially I thought you could make a library but it > seems that you then have to add a piece of code for each specific PIC and > that is a lot of work because of the number of PICs that should be > supported. > > Of course we could start small with some PICs and extend it when needed > but still it would be a library with high maintenance. Not sure if we > should go that way. > > But maybe someone else has a bright idea on this topic. > > Kind regards, > > Rob > > > > ------------------------------ > *Van:* [email protected] <[email protected]> namens > [email protected] <[email protected]> > *Verzonden:* vrijdag 9 juni 2023 15:44 > *Aan:* jallib <[email protected]> > *Onderwerp:* [jallib] [Request] "Reset_code" function > > Hi, > > A suggestion to keep Rob busy this week-end ;-) > > I often have to test the Reset condition at start-up of a program. > > Since I'm lazy (of course....), wouldn't it be useful to write a > "reset_code" function who returns a code depending on the condition that > issued a reset in the pic (POR, WDT, Reset instruction, Stack overflow....) > ? > > See an example from a DS for PIC16F1777 where the reset_code could be 0 > (for POR, which is a normal condition) to 11, one per line in the table > > The difficulty here is to take into account for the various possibilities > existing in different families of PICs..... which is why I post my > request here.... > > [image: Capture d’écran 2023-06-09 154308.jpg] > > Any help/suggestion/commitment welcome. > > Enjoy your day > > 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/7431f8b1-4c70-4bc3-a640-6c1a3cbef875n%40googlegroups.com > > <https://groups.google.com/d/msgid/jallib/7431f8b1-4c70-4bc3-a640-6c1a3cbef875n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/4f1245ea-2911-4800-a0ec-391f6ff683a6n%40googlegroups.com.
