Jan-Erik, Please be patient with me. My Fibromyalgia is really acting up and=20 I am in a lot of pain. I am trying to push through this. I wasn't sure=20 about exactly how to use the NOP in C. By experimenting I was able to=20 see that the #asm directive wasn't necessary and that all you did was=20 use NOP();.I have dropped back to a basic set of statements where all I=20 am doing is turning PORTA and D on and off. I want to get that working=20 first. Thanks, rich! On 10/20/2015 10:00 AM, Jan-Erik S=F6derholm wrote: > Exactly *what* was unclear from page 349 in the XC8 manual !? > > Your question make be believe that you never bothered to > check page 349 (or anything else in the manual, I guess). > > Good luck. > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > Synopsis > #include > NOP(); > Description > Execute NOP instruction here. This is often useful to fine tune delays = or > create a handle for breakpoints. The NOP instruction is sometimes requi= red > during some sensitive sequences in hardware. > > Example > #include > void crude_delay(unsigned char x) { > while(x--){ > NOP(); /* Do nothing for 3 cycles */ > NOP(); > NOP(); > } > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > Jan-Erik. > =20 > > > -----Ursprungligt meddelande----- > Fr=E5n: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] F=F6r Ri= chard > R. Pope > Skickat: den 20 oktober 2015 16:49 > Till: Microcontroller discussion list - Public. > =C4mne: Re: SV: SV: SV: [PIC]: Trying to get a 16F877A to talk to an LCD! > > Jan-Erik, > If I understand this correctly I would use #asm NOP and then NOP; w= here > ever I want them?? > Thanks, > rich! > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .