PDA

View Full Version : Help - programming problem!



George
- 24th August 2010, 06:29
Help urgently please!

I'm running behind on a project and am having some problems with programming.

I thought I'd try out the PIC16f722 as I need capacitive buttons , have never used the device before. However I cant get my programmer to detect it. I'm using PICKit 2 program with a programmer by ETT called ET-PGMPIC USB I assume it's just a copy of the microchip one - as it uses microchips software.

I've tried my old chips on it - ie 16F88 and it detects those fine, however it will not detect the PIC16F722 - it just comes up with "No Device Found" if I try and read it, it says "Unsupported Part (ID = 1880)"

initially I tied it in the ZIF socket but it didnt work, so then I tried it ICSP mode, still nothing. The Vdd goes to around 6V for 100ms when I check communication - so it's getting enough voltage.

Anyone programmed this series of chips? Is there anything Im missing? I updated the operating system on PICKit successfully thinking it may have been outdated but still no joy.

Any help as always would be greatly appreciated.

Thanks

malc-c
- 24th August 2010, 09:06
Unsupported Part (ID = 1880)


Maybe that's the clue... the software programmer does not or can not identify the part. Unless there is a more upto date version, you might be out of luck. Alternatively check Microchips website to see if there is a more uptodate firmware available...

George
- 24th August 2010, 10:01
Thanks Malcom,

It says that unsupported part error ID=1880 if there is no micro connected - so ya not sure really what it means. Downloading the latest update from Microchip was the first thing I did.

Am just wondering whats specific about these chips thats giving me a problem - is is just because they are new?

I see people on here have programmed them with no signs of issue - what are they doing that I'm not?

mackrackit
- 24th August 2010, 10:25
From the programmers web site

Supported Microcontrollers
• 8 Pin: PIC12FXXX Series including PIC12F509, PIC12F629, PIC12F675, PIC12F683
• 14 Pin: PIC16FXX Series including PIC16F630, PIC16F676, PIC16F684, PIC16F688
• 18 Pin: PIC16FXX Series including PIC16F54, PIC16F627A, PIC16F628, PIC16F648A, PIC16F716, PIC16F84A
• 20 Pin: PIC16FXX Series including PIC16F690
• 28 Pin: PIC16FXX Series including PIC16F72, PIC16F73, PIC16F737, PIC16F876A, PIC18F2550
• 40 Pin: PIC16FXX Series Series including PIC16F74, PIC16F877A, PIC16F871, PIC16F874, PIC18F458, PIC18F4550
Get a PicKit2 !!!

George
- 24th August 2010, 11:19
Can you please paste the link where you found this? Thanks

mackrackit
- 24th August 2010, 13:42
http://www.micropik.com/pag_varios_programadores.htm

http://www.micropik.com/USBPIC.htm

malc-c
- 24th August 2010, 15:19
Supported Microcontrollers
• 8 Pin: PIC12FXXX Series including PIC12F509, PIC12F629, PIC12F675, PIC12F683
• 14 Pin: PIC16FXX Series including PIC16F630, PIC16F676, PIC16F684, PIC16F688
• 18 Pin: PIC16FXX Series including PIC16F54, PIC16F627A, PIC16F628, PIC16F648A, PIC16F716, PIC16F84A
• 20 Pin: PIC16FXX Series including PIC16F690
• 28 Pin: PIC16FXX Series including PIC16F72, PIC16F73, PIC16F737, PIC16F876A, PIC18F2550
• 40 Pin: PIC16FXX Series Series including PIC16F74, PIC16F877A, PIC16F871, PIC16F874, PIC18F458, PIC18F4550



Get a PicKit2 !!!

Have to agree with Dave.... or one of the EasyPIC boards :)

George
- 2nd September 2010, 03:41
Ok, I splashed out and bought a PICKit 3, the latest upgrade to PBP, I'm now using MPASM as it recommends using it, I'm only an occasional user of PBP

However I get a tonne of errors Why doesnt' it just work? If I spend money I expect it to work without too much drama.

Errors are things such as: symbol not previously defined (ADRESH)
Illegal opcode

But there are tonnes...

Here's my code: - BTW - how do I put this in that neat little code window on here?


@ DEVICE PIC16F722, _DEBUG_OFF
@ DEVICE PIC16F722, _BOR_OFF
@ DEVICE PIC16F722, _MCLRE_OFF
@ DEVICE PIC16F722, _PWRT_EN
@ DEVICE PIC16F722, _WDT_ON
@ DEVICE PIC16F722, _XT_OSC


DEFINE OSC 4
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 1 ' Set clock source Fosc/8 "2uS"
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

ADCON0 = %110011
ADCON1 = %1000000

TRISA= %00000000 'Set 'em all to outputs
ANSELA= %00000000 'Set 'em all to digital
TRISB= %11111111 'all input
ANSELB= %00000111 'LAST THREE ANALOGUE
TRISC= %00000000 'Set portC all outputs

CPSCON0 = %00001101 'Cap sense off


'-----Allocate Variables
ButtonSense VAR byte

Start:

ADCIN 13,ButtonSense
PORTA = ButtonSense
goto start
end

mackrackit
- 2nd September 2010, 04:20
@ DEVICE PIC16F722, _DEBUG_OFF
@ DEVICE PIC16F722, _BOR_OFF
@ DEVICE PIC16F722, _MCLRE_OFF
@ DEVICE PIC16F722, _PWRT_EN
@ DEVICE PIC16F722, _WDT_ON
@ DEVICE PIC16F722, _XT_OSC
Those are for PM not MPASM.
I would try generating your HEX like you always have. Then load the HEX.

malc-c
- 2nd September 2010, 12:52
If you are using MPSAM then I beleive you need to edit the INC file in the PBP2.60 folder and comment out the config lines - this has been documented so a search of the forum should throw up plenty of examples.

As for placing code in a box, if you use " [ code ]" & "[/code]" (without the quotes ) it does the job


paste my code in here