But the problem isn't that I'm busy with anything. I didn't have time to make the sample program, will do so on Monday. The problem can be reproduced, however, by finish reading from the serial interface, then later one doing an exit(0). After doing that a few times all serial comms in the future are messed up. Sometimes they'll send the first few bytes double, sometimes the whole buffer will be double, sometimes it will write and then restart the write halfway through, sometimes it will just ignore data, and so on. And this will continue until you do a "cold boot". Quintin Beukes On Sat, Sep 26, 2009 at 5:12 AM, Tamas Rudnai wrot= e: > On Fri, Sep 25, 2009 at 6:41 PM, Quintin Beukes wro= te: > >> Like I mentioned this is not used in production. We use it only during >> development to reboot the PIC. And Microchip told us to use exit(0) to >> reboot the PIC through software. >> > > I understand, that you are making experience etc, that's ok. But exit(0) = as > a reboot on PIC is like getting out of your car in the real life. Try to = do > that while you are making 70 miles an hour! (DON'T) That's exactly what > happens on your PIC when you just do an exit(0) without properly stopping > what you are doing -- for example with the UART... > > Tamas > > > >> >> I'm only asking about this because I'm curious why it happens, since >> every time it happens we have to physically power cycle the PIC. And >> this is undesirable because some of the other components take long to >> boot. >> >> Quintin Beukes >> >> On Fri, Sep 25, 2009 at 2:14 PM, Olin Lathrop >> wrote: >> > Quintin Beukes wrote: >> >> I have noticed that when I execute exit(0) too many times, >> > >> > What exactly do you think EXIT is going to do for you in a dedicated >> > embedded system like a PIC? =A0*Think* about it. >> > >> > >> > ******************************************************************** >> > Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products >> > (978) 742-9014. =A0Gold level PIC consultants since 2000. >> > -- >> > http://www.piclist.com PIC/SX FAQ & list archive >> > View/change your membership options at >> > http://mailman.mit.edu/mailman/listinfo/piclist >> > >> >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> > > > > -- > http://www.mcuhobby.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist