When using MPLAB, I am finding it is important to make sure the PIC is held in reset and then erased before I can program it. If I get absent minded and hit erase while it is running, or if I forget to erase and just hit program, it gets all wonky and I'll spend 20 minutes trying to get it to program again, and still not be sure just what I did to make it work.
Is this normal? What is the proper way to get it working again if I screw it up? I take it programing does not overwrite what is currently on the chip?
How do you erase while it's running?In many times I won't erase a PIC.I just overite it.Until now no problem.
But a very new chip for the first time I'm erasing before programing.
I just configured mine as a programmer (it's normally debugger) and it works fine. I hit F10 and it builds, halts the program, erases and programs. Any combination of erase program etc works fine.
Some PICs will always be erased before reprogramming by MPLAB, this should pretty much automatically stop it running. MPLAB like certain setting when used with an ICD2, check the limitations screen.
Since you're all awake heres the new Inchworm+ , I've been asked to sell the bare PCB for $17.50 CDn. Seems good to me.**broken link removed**
How come you need 20 minutes to program a PIC?
Usually I don't erase, just load the new program and press program. It will overwrite automatically. And the programming time is not more than 15 seconds, even for long program.
I'll check the settings tonight when I get home from work. Matbe its just a question of me needing to learn to use MPLAB better.
bananasiong - I don't take me 20 minutes to program a PIC, it ends up taking 20 minutes to figure out how to get it working again if I screw it up. Programing takes only seconds.
Bill - awsome drawing. How long does somthing like that take you?
Sketchup for the drawings, as I've been using it for years the drawing don't take too long. The switches are for dropping VPP via a diode (zeners best, LED will work too) for the dsPICs seem to like 11V better. The other switch will disconnect the Inchworms power from the target, Q1 BS250 can do the same from MPLAB. Otherwise it's the same.
when will the new Inchworm be in production (assembled model)? Since the pics on the site have not changed, I am assuming that this model is not being sold yet?
I don't sell and assembled version, Creatron Inc (Toronto) sells one they build. Hey half the fun is the assembly. After all, microcontroller projects will require some soldering sooner or later.
Soldering was lots of fun on mine as well - no problems there at all. Circuit worked first time - I did however have problems with MPLAB but thats a different issue
CD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x185, Val Read = 0x1283)
ICD0275: Programming failed.
If I goto the debugger menu, and clear all memory, it will program without the error message, but dosn't seem to actually program, as it dosn't do anything when I release it from reset...... I'm confused........
It's not entering programming mode properly for some reason, the chip could be bad, the programming interface could be faulty, or you might have a bad clock rate for programming (try a slower programing rate). A programming session will always 'complete' but if the verify fails then that programming session wasn't actually successful. The lines used for in circuit programming have limitations on the types of external circuits or devices that can be plugged into them and still have the ISP feature function normally. For example if you're loading one of the ISP programming lines enough that it's internal comparator never triggers you'll never see a 1 on that line which would prevent programming, could come from too low of a resistance on the I/O line.
Programming mode vs. Debugging mode?
I found the config bits were wrong, not sure if the debugger menu, - clear all memory does this? But after that, its working again.
I feel like i'm walking on egg shells with this thing. It seems like I breath on it wrong or look at it funny, it does somthing weird.
All I am trying to do is make a button change somthing about the way my leds flash. I am trying to use Nigel's lesson, but I think I have tried 4 times now, and every time I get a a program wrote out to put in the PIC, it gets all crazy on me and stops working
Sceadwian - I think you might have solved my problem. What you said about having external things connected. I had a 10K pull up on my input pin and a button switch hooked up. I un hooked those and it programmed no problem, hooked them back up, and it didn't work.