On Thu, 21 Nov 2002, Olin Lathrop wrote: *>> *>(obviously, this doesn't work as well if you start needing interrupt *>vectors *>> *>and so on, but hopefully by the time your program gets that complex *>you've *>> *>got more experience and more flash alternatives. It's the really *>"trivial" *>> *>first time attempts and such that I want to address.) *>> *>> There are NO interrupt vectors to care for. There is OSCCAL so the first *>> instruction is MOVLW OSCCAL but the rest is as you described. *> *>There is one gotcha. These chips can only call subroutines in the low 256 *>bytes of each 512 byte page if I remember right. That is correct. Same thing for 16C54. This poses no serious problems as the return address works as it should and one places a stub in the low page to jump into the subroutine body which is placed wherever you wish. The stub contains just a GOTO and costs 2 clock cycles. Not too bad. *>This is all rather silly though. Switch to the 12F628, or if it's a high *>volume product a few JW parts will be cheap and certainly better than *>wasting time farting around reusing OTP parts. I usually get 8 JW parts *>when developing with non-flash PICs (not doing that much anymore). That *>allows me to keep the eraser busy and ensure there is always a blank one *>when I'm ready to try new firmware. I actually blew my last 12C509JW's MCLR pin using static (we have very low humidity here at times). I use 16F84 for prototyping (GPIO=PORTB with a little 18 pin to 4 pin socket adapter - I use a 4MHz crustal and caps on the 18pin) then I burn into 12C508A and use the methods shown in this thread to perfect the program. It is not too hard. The budget of some of my projects probably won't buy you lunch ;-). Peter -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body