piclist 2003\02\18\153602a >
Thread: Pin won't turn off properly
www.piclist.com/techref/ubicom/devices.htm?key=sx
picon face BY : 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.

Cheers,
Stephen






{Quote hidden}

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.
<F98qSYXdz0bOnM9em5y0002a19f@hotmail.com>

See also: www.piclist.com/techref/ubicom/devices.htm?key=sx
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Pin won't turn off properly

month overview.

new search...