Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC12F675 Verify Failed

Status
Not open for further replies.

Suraj143

Active Member
I'm trying to program PIC12F675 with internal RC oscillator & MCLR OFF but it always giving an error in winpic800.Telling that you have a bandwidth error.

My programmer is modified JDM type VPP controllable one.

The default factory calliborated value was 3440 (retlw 40).

What do I have to do please help me.

Code:
	List		P=12F675
	#include	<P12F675.INC>
	errorlevel	-302
	__CONFIG   _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_OFF & _INTRC_OSC_NOCLKOUT


	call	0x3FF
	BSF 	STATUS, RP0
	movwf	OSCCAL
	clrf 	TRISIO					
	BCF 	STATUS, RP0
	goto	Start


	org	0x3FF
	movlw	20h

	end
 
Last edited:
Why, when you know that the factory calibration value is retlw 0x40, do you put movlw 0x20 in the calibration location. This will just cause your code to crash.

I don't know WinPic800.

Mike.
 
Hi Mike I tried 0x40 also but didn't help me.
Doing a long coding for 5 hours continuously this gives me a damn error.I'm really upset I went to sleep.But this morning also same problem.
 
Why are you writing your own calibration value? That value should be preprogrammed at the factory.

PS I misread your original post, yes it appears most JDM can control VPP. *they don't seem to control VDD.
 
I modified a JDM programmer by powering Vdd with a resistor & 5V zener connected to Vpp. This had the effect of switching Vpp before Vdd. Simple but effective. I think this only works on JDMs with a proper power supply.

This circuit does the same thing.
**broken link removed**

Mike.
 
blueroomelectronics said:
Why are you writing your own calibration value? That value should be preprogrammed at the factory.

PS I misread your original post, yes it appears most JDM can control VPP. *they don't seem to control VDD.

The 675 template shows that it needs to call OSCCAL value when using internal oscillator.The original value was deleted by me so I copied with another new 675 PIC & place in the 0x3FF location.

The value was 3440.
 
Code:
INIT				;
	BCF     STATUS,RP0	; select register bank 0
	CLRF	GPIO		; Init GPIO
	movlw	07h		; set GP<2:0> to
	movwf	CMCON		; digital IO
	BSF     STATUS,RP0	; BANK 1
	clrf	ANSEL		; Digital I/O
	MOVLW	B'00000010'	; Set GP<1> Input, 
	MOVWF	TRISIO		; Set GP<0> as Output
	clrf	WPU		; Clear Weak pullup
	bsf	IOCB,IOCB1	; Interrupt on change enable
[COLOR="Red"]        call    h'3FF'[/COLOR]          ; You have to manually enter this value in the calibration input
        [COLOR="Red"]movwf   OSCCAL[/COLOR]          ; h'3FF' is where the calibration value is stored. Usually 34xx

	BCF     STATUS,RP0	; BANK 0
	movlw	D'250'		; Time in machine cycles to delay
	movwf	Niks1		; before PIC goes to SLEEP

I use the PICALLW programmer, and it allows a field where the calibration code can be entered (usually 34xx). With the code as shown above, the calibration value is then entered during programming.
 
SPDCHK said:
I use the PICALLW programmer, and it allows a field where the calibration code can be entered (usually 34xx). With the code as shown above, the calibration value is then entered during programming.

Hi what software you using?
 
Sorry, what I meant was that I use the PICALLW software with a programmer hardware unit I ordered as a kit, (the PICALL programmer)

Here's the link
 
Hi by looking all these replies I got some ideas.

* First I will change that OSCCAL value with retlw 40h & I’ll call in the beginning.

* If the problem still there I’ll try to change the OSC to XT & make MCLR ON.

* If the problem still there the problem with the winpic800.

* Then I’ll try some other software which controls VPP which matches with my hardware. ex:WINPIC

Even one didn’t work I’ll try to program through ICPROG by manually entering the OSCCAL values.
 
blueroomelectronics said:
Does the WinPIC800 software know how to handle VPP before VDD? I've not seen a JDM with that option.

there is one at least to my knowledge.
it was implemented. It is by FENG, Japanese person. A free download is given at
https://www.hamradio.in/circuits/feng.php#mods

called "multi PIC prog. V5.2R8"

it works with icprog1.60A or winpic800v3.62 . He provided the feature of Vpp before Vdd

Yes , it is problematic with newer version PCs and with new Laptops that use 3.3v versions of COM port. i feel there is a fix for this also using either Opto isolators or Max232 or any level translator, and powering the programmer externally.
Finally it is perhaps better to go for USB support, I do agree. Still at cheaper and as entry level programmer, FENGs version appears OK
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top