I would parse it (:021FFE00E20FF0) thus: : start char 02 data length 1FFE location 00 record is EPROM data E2, 0F two bytes of data, (in lo byte hi byte order for PIC) F0 checksum. So your address is actually 0x1FFE, which makes sense as it is twice the value 0xFFF, so the PIC address is just the HEX file address divided by two. /\/\/\/*=Martin ----- Original Message ----- From: "Mark Skeels" To: Sent: Tuesday, December 11, 2001 1:00 PM Subject: Fw: Re: [PIC]:programming a 12c509A; configuration word > Here's the line in the HEX file: > > :021FFE00E20FF0 > > As you can see, the format is..... > > : start char > 02 data length > FFE0 location > E20F data word: 0FE2 > F0 check sum > > everything is contained in the one line. > > (light goes on!) Now I see it. The word goes at 0xFFF but the 8-bit format > dictates > that it must occupy two bytes. That's why 0xFFE. > > Thanks for the help. > > Mark > > ----- Original Message ----- > From: "Martin Peach" > To: > Sent: Tuesday, December 11, 2001 11:56 AM > Subject: Re: [PIC]:programming a 12c509A; configuration word > > > > Ooops, I misunderstood. But possibly the same reasoning applies. If the > > 12-bit configuration word were to be stored at 0xFFF in a hex file the > lower > > 8 bits would end up at 0x1000 or 0x000. I'm not sure about the mapping > from > > addresses in HEX files to addresses in the PIC, though. > > /\/\/\/*=Martin > > > > ----- Original Message ----- > > From: "Mark Skeels" > > To: > > Sent: Tuesday, December 11, 2001 12:31 PM > > Subject: Re: [PIC]:programming a 12c509A; configuration word > > > > > > > I think you must be referring to the OSCAL value. I understand this is > > moved > > > into the register within the firmware program. > > > > > > I am talking about the configuration word which configures the code > > protect, > > > oscillator mode, watchdog timer, etc. > > > > > > Mark > > > > > > > > > ----- Original Message ----- > > > From: "Martin Peach" > > > To: > > > Sent: Tuesday, December 11, 2001 11:21 AM > > > Subject: Re: [PIC]:programming a 12c509A; configuration word > > > > > > > > > > Probably because the calibration value is encoded as a MOVLW XX > > > instruction > > > > at the address 0x3FF (I have one here that has 0xC50 there, so my > > > > calibration value is 0x50 and the opcode for MOVLW is the 0xC in the 4 > > > high > > > > bits.) Since the instructions are all 12 bits wide and a HEX file > deals > > > with > > > > 8-bit values, the instruction is spread over two bytes in the HEX > file. > > > > > > > > /\/\/\/*=Martin > > > > > > > > ----- Original Message ----- > > > > From: "Mark Skeels" > > > > To: > > > > Sent: Tuesday, December 11, 2001 10:30 AM > > > > Subject: [PIC]:programming a 12c509A; configuration word > > > > > > > > > > > > > Hi, List. > > > > > > > > > > I am building a test fixture for a product we make using a 12C509A. > > One > > > of > > > > > it's functions is integral programming of the PIC using ISP. > > > > > > > > > > I have got to the point where I am parsing the HEX file generated by > > > MPASM > > > > > and was suprised to find that the configuration word information > > appears > > > > in > > > > > the second-to-last line in the HEX file, but at address 0xFFE, _not_ > > > 0xFFF > > > > > as I expected. > > > > > > > > > > What am I missing, or can someone explain this to me? The ISP app > note > > > for > > > > > the 12C5XX from MChip clearly states that the config word is stored > at > > > > > location 0xFFF. > > > > > > > > > > Mark Skeels > > > > > Engineer > > > > > Competition Electronics > > > > > meskeels@earthlink.net > > > > > > > > > > Soli Deo Gloria! > > > > > > > > > > -- > > > > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > > > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > > > > > > > > > > > > > -- > > > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > > > > > > > > > -- > > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > > > > > -- > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body