Barry, On the 18F GOTO and CALL and LFSR are all two word instructions. The second word of all these instructions is alawys in the form 0xF??? If the processor encouters this second word where it is expecting the start of an instruction, it will treat it as a no-op. This is useful when you want to do something like: BTFSS someerg,somebit GOTO someplace Note that if the skip happens, it will be right into the middle of the GOTO instruction. However, that will be OK because the second half of the GOTO starts with 0xF, so it will be treated as a no-op. Bob Ammerman RAm Systems ----- Original Message ----- From: "Barry Gershenfeld" To: Sent: Thursday, April 25, 2002 9:54 PM Subject: [PIC]: ICD-2 and 18xxx > I've got a new 18F252, a 16-bit C compiler, version 5.61 of MPLAB, > and the new ICD-2 to run it all with. But I've got problems. And > too many questions to fit in that little text box on the mChip > web board. > > The most egregious problem is that I can't get it to recognize the > debug code. After a programming run, it will verify the program, > verify the config bits, and fail trying to verify the ICD debug code. > > The second thing is that I can't (usually) turn off the debug > code, program it, disconnect and run it. This works maybe 2% > of the time. It's as if the chip doesn't run. So I'm wondering > if the ICD program and verify can work without the chip running, > while the ICD debug needs a running chip. > > I've checked, and I've got power, ground, a good reset from > a reset controller, and a clock oscillator that drives OSC1 > and I can see it coming back out on OSC2. I assume that > with external drive I can use any setting (I'm using HS, > and it's 7 MHz). > > For my last question, I'm not used to looking at the code > for this 16-bit stuff. I'm looking for that NOOP that's > supposed to be in the first location. The "ROM" window > shows me this: > > 0000 EF1A GOTO > 0002 F000 (nop) Main > > Looks like almost-maybe-but-not-quite a noop there. Now, I > just set up an assembler project to try to get control of > this sort of thing, and I find I get the identical thing > with the assembly program... Hmm, goto F000 ? there's > something going on here. Time to do some more reading. > > Barry > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body