I have to wonder... I don't have time to look it up in the data sheet as I have 300+ PICList messages to read, plus over 2,500 error messages to deal with thanks to our fine friends and supporters at MIT. BUT... I wonder if you could use the internel OSC and get OSC or OSC/4 out from one of the pins with the right configuration... then hang a freq. counter or scope on that pin, figure out how far off you are and try different OSCCAL values until you were dead on. Investigation and experimentation left up to the reader... Dale -- "Curiosity is the very basis of education and if you tell me that curiosity killed the cat, I say only the cat died nobly." - Arnold Edinborough On Wed, 16 Jan 2002, Rudy Rudy wrote: > Sean, > > They are not useless. But, it will be really painful to get the "correct" > OSCCAL value (the closest to 4MHz). I have played around with 12C509, and > the OSCAL value is around b'100000'. So, you can start your code like this: > > movlw b'100000' > movwf OSCCAL > > That should have the clock pretty close to 4MHz. And if you need it to be > as close as possible to 4MHz, write some procedures to change the OSCCAL > value when you change the input pin for example. I never use 12C671 before, > but I am sure they are similar. > > Hope that helps! > > ----------------------- > Rudy Rudy > rudy@rudyrudy.com > http://www.rudyrudy.com > ----------------------- > > > Hi all, > > > > When I first started mucking around with PICs, I bought 6 x PIC12C509A/JW > > and 6 x PIC12C671/JW - which are not cheap devices. I have since found out > > that erasing these with a UV Eraser actually erases the OSCCAL > > data for the > > internal clock. > > > > Apparently, I should have read this data when the chips were new, recorded > > the number for each chip, then re-written the calibration data each time I > > write to that particular chip. This I did not do. :-( > > > > Is there any method of retreiving this data or are the chips useless? I > > assume that I can still use them with an extenal clock, but then > > that leaves > > less I/O. > > > > Regards, > > > > Sean > > > > -- > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads