With the JW part - I've seen reports that not covering the window can cause problems. Also - is the clock working OK - if this is unreliable then it can cause problems. Brownout detector problem - DC voltage problem?, And I had a problem with a solder short on the reset line - most confusing - when the PIC perfomed its main action it suddenly reset itself! Richard P "Andrew E. Kalman" wrote: > Hi All. > > For some time now I've been unable to resolve a PIC18C452 problem, so > I thought I'd ask the list for help. > > I've created an application with MPLAB and MPLAB-C18 that basically > uses PORTB for some visuals and a single interrupt (TMR2). It works > great in the (albeit sloooooow) MPLAB-SIM simulator. All the timing > is fine, PORTB is changing as I expect, etc. > > HOWEVER, when I program a JW windowed part and put it on a PICDEM-2 > board, only part of the program works. The interrupt is happening at > the right rate (I have it toggle an LED on PORTB) down to the > millisecond, and a counter that is being incremented "in the main > loop" is reflected properly on some more LEDs hanging off PORTB, but > the rest of the program just ain't happening. > > My best guess is that there is some issue w/regard to memory access > that is not the same between the simulator and the actual chip, and > therefore the rest of the code is "silent." > > I've checked the errata, and there's nothing suspicious there. I've > disabled all the options (e.g. Watchdog timer) when programming the > part through a PICSTART Plus. I've even sucked the code back from the > chip into MPLAB and simulated it, and it works fine in the simulator. > > Any ideas on why it works in the simulator and not in the actual part? > > Thanks, > -- > > ______________________________________ > Andrew E. Kalman, Ph.D. aek@pumpkininc.com > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- * | __O Thomas C. Sefranek tcs@cmcorp.com |_-\<,_ Amateur Radio Operator: WA1RHP (*)/ (*) Bicycle mobile on 145.41, 448.625 MHz ARRL Instructor, Technical Specialist, VE Contact. http://hamradio.cmcorp.com/inventory/Inventory.html http://www.harvardrepeater.org -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.