1 Dec 2008 14:28
Re: [PIC] Garbage out of UART after "reset" instruction -- weird fix
Vitaliy wrote:
> Olin's suggestion would be the proper way to handle the problem, but a
> quick-and-dirty way to conclusively prove the above theory, would be
> to insert a delay before the reset instruction (this would give the
> UART enough time to finish transmitting the echo).
The real thing is both simpler and more reliable than a delay, and would
better prove that's what the problem really is:
banksel txsta
wait_udone ;wait until UART done sending last char
btfss txsta, trmt ;UART idle yet ?
jump wait_udone ;no, go back and check again
reset
********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014. Gold 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
RSS Feed