Just got my new SMT programmer soldered today and it programs a 16F84A perfectly.
However, when I try to program a 12F675 with the crystal set to XT it asks me where to take the osc calib value?
In my code I disabled the section of code that makes the call and updates _osccal
Yet, I want to use the int osc just can not. For one, I use this code:
Code:
org 00h ; the reset vector is defined as address 00hex
call H'03FF' ; GET OSC CALLIBRATION
bsf _status,5 ;Bank 1
movwf _osccal ;Calibrate
bcf _status,5 ;Bank 0
goto setup ; and we tell it to go to 'setup'
The address 03FF is defined in the datasheet yet ICProg asks me if I want to use a value @ 33FF or 0000h ?!?
It's quite simple, you read the value and write it down, then restore it every time you write to the chip. If you've erased or written to the chip already, you've already destroyed the calibration value. WinPicProg automatically reads and restores the calibration byte, unless it's overwritten by a value in the HEX file - this is a requirement in the programming specification, but not all programming software follows it!.
Dear Nigel - I got a pack of 5 new 12F675s of which I got 2 more that are untouched. When I read them via ICProg where do I look for the info, under the main 'program' window? I can not see the special addresses listed in ICProg?
Also, I just checked my breadboard has 13uF track to track :shock:
Will move this to the other bread board (only 15pF!) and try again....
Dear Nigel - I got a pack of 5 new 12F675s of which I got 2 more that are untouched. When I read them via ICProg where do I look for the info, under the main 'program' window? I can not see the special addresses listed in ICProg?
have you already programmed your 12F675 with the internal oscillator turned on? if so, this causes problems with JDM since it applied power immediately to the pic it starts running it program (if intosc is selected), and from the moment it starts running it cannot be switched into programming mode...
16F84 has no problem with this cause it has no intosc.
org 00h ; the reset vector is defined as address 00hex
bsf _status,5 ;Bank 1
retlw 0x8C
movwf _osccal ;Calibrate
bcf _status,5 ;Bank 0
goto setup ; and we tell it to go to 'setup'
This how I do it?
So how do I program this properly? Even if I choose XT it doesn't work (and I remove the int osc code!)
the oscillator value should be stored on address 0x3FF as a retlw instruction, so you just call that address and the calibration value is returned in W (if you didn't erease it that is)
Code:
BSF STATUS, RP0 ;bank1
CALL 0x3FF ;get calibration value
MOVWF OSCCAL ;and store it
BCF STATUS, RP0 ;bank 0
normally, IC-prog reads the value at address 0x3FF and asks you to keep it or to delete it, just answer to keep it and the right value remains in the pic, however, if you got a pic's calibration vaue and you want to incorporate it in your code just do...
what do you use to measure it?
It could be that the device you use to measure the frequency puts to big a load on the osc output and stops it from running
Thanks to that link with the info for the mosfet jobby, I've updated and shrunk the programmer some more! I might use this one day, but for now it will probably remain a file on my hdd heh :lol: