Morning camerart ...Can u post a picture of the PIC programmer socket setup or a sketch ? 470uF ? where ? what for ? running issues could be power associated, BOR , WDT power source ....
your link ...Thats a lot of posts to digest... you seem to have been going some time
What compiler where you using before that C30 or Hitech?..Ian... Eureka Sunday... For me too i hope , Suddenly all my code delays have halved since i switched to XC16. v 124 (MPLABX) can't see why yet....
So what is 470 uF doing ?????????????? is this just on the programmer socket ?
You and eric have been busy... the story so far ,,,, the 18F2431 program is burnt to a single PIC and is working , other PIC burns seem ok but fail in circuit , I have no Oshonsoft experience , but many Years programming PIC's ,
You need to monitor pcb voltage it only needs a spike / dip to set BOR , is this enabled ?
I repeat, are you initializing all of your memory in your program?
John
Sorry but #12 does not answer the question ... there is no way you need 470 uF ( is this correct value ) on the pic power pins and you say no external power , so PK2 is charging this large capacitor during programming ? at the end you could still have power on the PIC as you take it out , or even as you put another pic in ! ( better get pin 1 correct ! ) why is this cap there ? the watch dog timer references to other bits to enable SWDTEN , it will reset hw pic on rollover it has to be cleared by sw. what is state of SWDTEN.
I had a problem with erratic behavior -- some chips seemed to work while others didn't.
The biggest problem was in initialization of the hardware EUSART. I did something out of sequence. Sometimes it started fine; sometimes it didn't, and I got gibberish. The second problem was my RAM (both common and general purpose) that had various flag registers. They were not always cleared on programming, or at least they didn't appear to be. I added a routine to clear all ram during processor set-up and everything started working smoothly with all of the chips I had tried, even the ones that didn't seem to work before.
John
Hi camerart. OK . the zif is a good idea , as stray connections need to be considered if doing ICSP . however you still need power caps and a pull-up during programming , ( I don't see them on your pic) also I would use external power during programming , as not all USB power is the same as your .5v ac measurement shows. (Is this a laptop USB port ?). WDT may be a wild goose , but worth checking .
Judging from your other project posts you seem pretty capable , I would suggest a course of action... put the zif on a stripboard with all the connections as detailed . add an external 5V supply plus a switch and led indicator .
Think john's post was referring to a routine to clear or initialize registers / data memory at start up (most important ).
If ICSP is in circuit programming? I don't do that.
Is the switch for switching power on/off?
I'll leave WDT until all else has failed.
Yes, I'm pretty capable, apart from programming, 89.4% of the programming is courtesy of EricGibbs
Camerart.
Yes John!!
NB: reading the silicon errata is as compulsory as RTFM!
Anyway, one of the two best pieces of advice I got in the Microchip forum, many years ago, from one of their most knowledgeable members was to reset all SFR and "clean" (or initialize) the whole RAM.
What motivated my question there, IIRC, was a port that refused to have all bits in a certain setting on startup. BTW, the cleaning or initialization (with a specific value) of the whole RAM also proved to be useful in simulations allowing to see who has changed and when.
I do both routinely since then.
/EDIT
Hola camerart I di not forget you are the OP (or it is TS?) The reply is also intended for you.My routines do what we John and I say.
EDIT/
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?