PDA

View Full Version : Programming Problem PIC12F683



StoneColdFuzzy
- 1st June 2009, 18:57
Hello all,

I have PBP 2.45. I am unable to program the PIC12F683. I get the error:

"Device does not match selected device."

I'm using the old serial programmer.

The programmer programs other PICs ok.

The ZIF socket is plugged in correctly.

The PIC is in the socket correctly.

The power to the programmer is good.

The cable is plugged in.


I found the patch "Software patch for PICBASIC PRO™ version 2.45" which is supposed to fix errors when compiling for PIC12F683, 16F684, 16F688, 16F716, 16F737, 16F747, 16F767, 16F777, 16F87, 16F88 " but it will not install. I've never tried to patch anything before.

Any ideas?

~ Dave

tenaja
- 1st June 2009, 20:10
this is usually a problem with the programmer or your hardware (i.e. pic on the pcb and connection to programmer), and has nothing to do with your compiler. Make sure if you are using any of the programming pins as i/o that they do not put any load on the programmer.

Bruce
- 1st June 2009, 20:14
Which ZIF adapter are you using?

StoneColdFuzzy
- 1st June 2009, 20:22
Which ZIF adapter are you using?

Bruce,

I'm using the 8-40 ZIF adapter. On the under side of the adapter on the board it says 03221 JMS. The cable from the programmer is plugged into the 8-18 connector and pin number 1 on the IC is lined up with Pin 1: 8-18.

~ Dave

Bruce
- 1st June 2009, 21:35
Sounds like you have it connected right. If you have a 2nd 12F683 to test, and that one
won't program either, I would contact MeLabs support directly.

The only problems I'm aware of on the older 840Z 03221 ZIF adapter series were for 18F
parts which required a modification for AVdd connections to pin #7.

tenaja
- 1st June 2009, 22:02
One other thing to check... if you've already programmed the chip once. Make sure your programmer is set to high voltage programming.

StoneColdFuzzy
- 2nd June 2009, 13:43
Problem solved. I downloaded Beta Software for EPIC™ Programmer, including the update for the firmware and the programmer works great now. On the download page, there is the following statement "It does not support the advanced command-line switches of the paid upgrade." I don't know what that means for me.

~ Dave

StoneColdFuzzy
- 2nd June 2009, 21:05
I'm trying to understand how the below statement makes GP3 an input. I understand that a 1 will make it an input, but how does that 1 digit relate to GP3? Perhaps this is an error and it actually makes GP4 an input?

Copied from elsewhere on this forum:

TRISIO = %00010000 'GP3 as input

~ Dave

mister_e
- 2nd June 2009, 21:14
GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.

StoneColdFuzzy
- 2nd June 2009, 21:18
GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.

I understand that. What I don't understand is how the digits in the positions that they are in relate to their respective pins.

~ Dave

mister_e
- 2nd June 2009, 21:26
:o i'm not sure to follow you then... let's see if the following lines could give you some lights


'GPIO Bits 76543210
TRISIO = %00001010
' xx------- Not implemented, don't care
' --0------ GP5 = output
' ---0----- GP4 = Output
' ----1---- GP3 = Input, Read only bit, input only, regardless to what you write here
' -----0--- GP2 = Output
' ------1-- GP1 = input
' -------0- GP0 = Output

StoneColdFuzzy
- 2nd June 2009, 21:35
OK, now I get it; I have to look at the table in the data sheet. I had copied that code from the following string:

http://www.picbasic.co.uk/forum/showthread.php?t=6687&highlight=pic12f683

So, I was correct that TRISIO = %00010000 makes GP4 an input.

~ Dave

mister_e
- 2nd June 2009, 21:36
Yup GP4 AND GP3 ;)

StoneColdFuzzy
- 2nd June 2009, 21:39
Thank you very much!

~ Dave