On Wednesday, 28 November 2012 08:54:16 UTC, Kiste wrote: > > It works on a number of chips, but not on all. Just two quick examples: > PIC12F510 and PIC16F87 both do not have a "RESET" assembler instruction. > Chips who do not have it should be recognised and a warning or error > issued, or the reset could be "emulated" by setting some register values to > default and jumping to wherever the reset vector is. Another workaround > could be to activate the watchdog (if available) to a very short timeout > and enter an infinite loop. But this is highly device-dependent and would > probably better sit in the device files than in an extra library. It would > be a lot of work, probably. >
Yes, I'd come to the same conclusion. Jumping to 0x0000 seems to be a common method, but would be hardware dependent because of needing to reset registers by hand. I did consider using the watchdog too, but that looked too painful. My reason for needing it is so I can enter the USB boot loader on a PIC connected to a machine I can't easily get to (http://www.ty-penguin.org.uk/~auj/electricity/about/). I'd imagine most cases needing a reboot function will be similar, and will therefore be used on the higher end chips. So not supporting the lower ones doesn't seem like a major issue to me. Cheers, Alun. -- You received this message because you are subscribed to the Google Groups "jallib" group. To view this discussion on the web visit https://groups.google.com/d/msg/jallib/-/MlSR7TJxmXsJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
