Pin won't turn off properly
Stephen Holland email (remove spam text)
I ran Jinx's code on an oscilloscope, and I could only see correct results
when using code exactly as David has provided.
The read-modify-write issue is a common one, especially with the setb clrb
instructions. It makes perfect sense once you understand that bit-wise
instructoins such as setb and clrb are actually nothing more than the
sequence of read-or-write or read-and-write. If these instructions are not
followed by nops, then if you look at the pipeline to see when reads and
writes actually occur, you will see the problem clearly. Simply, the port
does not yet have what you expecting when the next instruction's read
occurs. Using back to back setb or clrb instructions on different port pins
is fine, but not on hte same port.
Protect your PC - get McAfee.com VirusScan Online
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
See also: www.piclist.com/techref/ubicom/devices.htm?key=sx
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the