On Sun, Aug 28, 2005 at 12:13:27AM +0800, Chen Xiao Fan wrote: > Okay it is 12:05am Sunday here in Singapore and I need to go to > bed. Luckily my wife is still watching TV by Jet Li. :) Well then have at it in the morning. > Anyway, Wouter answered the question: debugger!!! > > BAJ: I am not so sure whether you have used any higher > end MCU (than 12F/16F) like dsPIC or 18F USB. I am very > new to them as well and I think a debugger will be quite > useful. I have these parts sitting on my shelf waiting for me to get to them. I want to rebuild my infrastructure before getting back to project work. So tools such as a solid transportable bootloader, stabilizing NPCI stable and regression tested, and finishing work on my 555 based serial code dumper are higher priority items on my PICList. > I confess I am a lousy programmer so I need hardware > debugging provided by ICD2. I was using an ICE2000 for > my previous PICC projects on 16C72A/16F872 back in the > year of 2000 to 2002. The real-time debugging helps a > lot even the code is less than 2k words. People can use > printf to serail port or other methods to help the debugging > but sometimes the resource inside the MCU may not allow this. So it's a style issue. See to me there is minimal interface difference between a simulator and ICD. Primarily the fact that it takes more work to get real input into the simulator. I do gross debugging using gpsim. It sorts out the vast majority of logic/thought errors will before I ever get around to putting code into an actual chip. As for printf being resource intensive, a bit banged routine takes about 30 words to implement. That's cost effective for even the smallest chips. You can see a sample of this in my sunrise/sunset light controller here: http://www.finitesite.com/d3jsys/clock.asm The serial interface, hex conversion, and string printing comes in under 75 instructions total. The actually strings cost one word per character. Couple this with gpsims USART module and you can develop a cheap debugging interface that can be completly simulated without building a lick of hardware. BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist