PDA

View Full Version : Programming error?



Charlie
- 21st June 2013, 15:23
I'm trying out my first PIC18F1330 and attempting to program a simple blink code with a PICKit 3.

I can't even get past first programming of the device - the PICKIT3 tells me that I'm getting the following error: Address 0x300006, read 0x81, expected 0x89
I tried another device - same thing. I've never had problems this early in the process before - anybody have any ideas?

Darrel Taylor
- 21st June 2013, 16:25
Are you sure you've compiled the program for the correct chip?

Address 300006h is the CONFIG4L register.
On the 18F1330, bit-3 that's it's complaining about, is "Unimplemented" and always reads "0".
It would not be able to program that register as 0x89.

Charlie
- 21st June 2013, 19:23
Double checked, and ran through everything again PBP 2.6 set to 18F1330.
The contents of the .inc file are:
;************************************************* ***************
;* 18F1330.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2008 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 09/15/08 *
;* Version : 2.60 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F1330, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F1330.INC" ; MPASM Header
__CONFIG _CONFIG1H, _OSC_INTIO2_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _BBSIZ_BB256_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 8

I'm using the PICKit 3 to program, using the application it came with - version 1.0.0.0 / JAM version 01.28.18-00 / RS:01.15.11 / AP:01.12.04-05
If I look at how it's interpreting 4L, it labels it "nostring" and is showing bit 3 as configurable, but always a 1. If I write it to 0, it comes back when I try to program.. A bug in the PICKit3 perhaps?

Darrel Taylor
- 21st June 2013, 20:22
Old software.

I don't have the latest version either, but it is more recent than yours and it maintains that bit as a 0.

Try downloading the latest software ...
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en538340&redirects=pickit3

Charlie
- 21st June 2013, 20:52
That resolved it - thanks Darrel!