Searching \ for ' SV: Re: [PIC]: Problems using a 1x8' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Problems using a 1x8'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] SV: Re: [PIC]: Problems using a 1x8'
2001\01\10@134958 by Andreas Eriksson

flavicon
face
>
>Dosen't this require NOPs between the instructions, to get around the
>read-modify-write "feature"?
>

read-modify-write feature?

Arent you supposed to just set RS=0(instruction, not data) RW=0(write) E=1>0(pulse)?

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\01\10@140443 by David VanHorn

flavicon
face
At 07:48 PM 1/10/01 +0100, Andreas Eriksson wrote:
> >
> >Dosen't this require NOPs between the instructions, to get around the
> >read-modify-write "feature"?
> >
>
>read-modify-write feature?


A peculiarity of Pics, where subsequent BCF/BSF operations in any order,
may cause undesired results, due to the way that the pic outputs data to
the port.

Ex:

Start with two bits at zero
bsf     PORTB,0
bsf     PORTB,1

You would expect PORTB to now be XXXXXX11, but it may be XXXXXX10
What happens is that the BSF instruction reads port B into a temp register,
sets the bit, then writes it back out to the port.
If bit 0 on the processor pin hasn't had time to come high, then the next
BSF (Or BCF) will read it as a zero, and write it back out as a zero.
The key point is that there's only 1/4 clock between the time that the
first output happens, and the second instruction is reading.

It's in the pic manuals.


>Arent you supposed to just set RS=0(instruction, not data) RW=0(write)
>E=1>0(pulse)?


From my AND data book, the sequence is

/RS,/RW,/E <delay 140ns>
/RS,/RW,E <delay 450ns>
/RS,/RW,/E <delay 10ns>
At this point, RS, RW, and data are free to change.
The delays are only an issue with very fast pics (or slow AVRs)


--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...