Programming a 16F68...
 
Notifications
Clear all

Programming a 16F688 PIC

18 Posts
11 Users
0 Reactions
13.8 K Views
Posts: 0
 kkmm
(@kkmm)
Joined: 1 second ago
[#412]

I've been doing quite a bit of searching around both on this site, the old site, and the internet in general for the answer to this question, with no luck, so hopefully someone here can tell me why I'm screwing this up. I've never done this before. 😳

My understanding of how to program the PIC chips are as follows:
1. Download the .asm file, and install MPLAB IDE, and whatever program you use to burn the .hex file to the chip (I use WINPIC800 with my JDM programmer)
2, Convert (compile) the .asm file to .hex with MPLABASM
3. Burn the .hex file to the PIC chip
4. Test

My problem comes in the compiling. I keep getting a "Error 111 Missing Symbol" error. I have tried creating a project file (And adding the P16F688.inc file in the appropriate place) in MPLAB . I also tried doing a Quickbuild. Both give me the same error. I clear memory between each attempt. I have made sure my selected device is the P16F688. Other than that, all the settings are pretty much default. Is there something I'm missing?

BTW, I get the error with both the renard-20070407c.asm and the renard-20070711.asm code.

I just downloaded and installed MPLAB IDE tonight. It's version 7.60.

I'm sure it's something I'm doing wrong, but I'm not seeing where the problem is. Any help is greatly appreciated.

EDIT: Looking at it some more, it looks as though the error is coming from the P16F688.INC file. Here is the error:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F688 "renard-20070711.asm" /l"renard-20070711.lst" /e"renard-20070711.err"
Error[111] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F688.INC 182 : Missing symbol
Halting build on first failure as requested.
BUILD FAILED: Mon Aug 13 01:52:01 2007

I also tried the sample code for the 16f688 from the Microchip website...same error
Does this help to diagnose the problem?


17 Replies
RJ
Posts: 673
 RJ
(@rj)
Prominent Member
Joined: 19 years ago

Error[111] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F688.INC 182 : Missing symbol

This line is telling you that on line 182 in the ASM file there is something not right. Take a look at the line. If you post the line in here we can look at the asm code and tell you whats not right. I believe there was a 16f688a chip also with some differences you might want to check with phil that you have the correct chip.


Reply
Posts: 0
 kkmm
(@kkmm)
Joined: 1 second ago

I don't think it's the .asm code from Phil. I keep getting the same error on the same line number no matter which .asm file I use, which leads me to think its the p16f688.inc file.

Here is the output from renard-pwm-20070216a_LO_576_EC.asm

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F688 "renard-pwm-20070216a_LO_576_EC.asm" /l"renard-pwm-20070216a_LO_576_EC.lst" /e"renard-pwm-20070216a_LO_576_EC.err"
Error[111] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F688.INC 182 : Missing symbol
Halting build on first failure as requested.
BUILD FAILED: Mon Aug 13 07:48:47 2007

Here is the output from renard-20070407c.asm

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F688 "renard-20070407c.asm" /l"renard-20070407c.lst" /e"renard-20070407c.err"
Error[111] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F688.INC 182 : Missing symbol
Halting build on first failure as requested.
BUILD FAILED: Mon Aug 13 07:51:16 2007

And this is line 182 from each:
renard-20070711.asm: addwf TMR0,f
renard-20070407c.asm: movwf PORTC
renard-pwm-20070216a_LO_576_EC.asm: movwf STATUS

and here's line 180-184 of P16F688.INC (the comment line is 182)
RX9D EQU H'0000'

;----- WDTCON Bits --------------------------------------------------------

WDTPS3 EQU H'0004'

I don't see anything wrong with any of these...but I continue to get the same error.


Reply
Posts: 0
 kkmm
(@kkmm)
Joined: 1 second ago

I modified the P16F688.inc file at line 182 by placing another ";" in front of the line. I then ran the compiler, AND IT WORKED!! I now have the .hex code for the PIC chip.

Here is the modified line:

RX9D EQU H'0000'

;;----- WDTCON Bits -------------------------------------------------------

WDTPS3 EQU H'0004'

Hope this helps someone else.


Reply
Macrosill
Posts: 9740
(@macrosill)
Member
Joined: 20 years ago

I got the same error with line 182 of the .inc file. When I looked at it there was a strange character before the ; looked like a square. I deleted that character and saved the file. Smooth sailing since then.


Reply
Posts: 31
(@azcap21)
Eminent Member
Joined: 19 years ago

Solution to resolve Mplab build error for line 182

Gents,

I experienced exact same problem with MPLAB ver. 7.60, line 182 extra character error

The problem appears to be linked to P16f688.inc file, line 182 which has an character Mplab compiler does not recognize. It's an easy fix by simply editing P16f688.inc file.

Procedure

#1. If using windows, path should be C:\Program Files\Microchip\MPASM
Suite.
#1a. Or perform file search on your hard drive for file name: P16F688.inc
#2. Open file using text editor
#3. Replace square character at the beginning of line 182 with a ;
(semicolon)
#4. resave file

I hope this helps.

😀


Reply
Posts: 6728
(@p-short)
Illustrious Member
Joined: 20 years ago

Which exact version of the firmware was that (so that I can search for and remove the character)? It doesn't seem to affect the version of MPLAB that I'm using, and it doesn't stand out with the editor that I'm using (emacs).

--

Phil


Reply
Wayne J
Posts: 7789
(@wayne-j)
Illustrious Member
Joined: 20 years ago

I do not get this error either. I'm using v7.5 of MPLabs. I think this is only associated with v7.6.


Reply
Posts: 6728
(@p-short)
Illustrious Member
Joined: 20 years ago

NM, I didn't read all of the messages above.

--

Phil


Reply
Posts: 31
(@azcap21)
Eminent Member
Joined: 19 years ago

I think the problem is only with version 7.6.


Reply
Page 1 / 2
Share: