• AVR Freaks

Helpful ReplyHot!PIC16F628A Template Build Fail

Author
The Loner
Super Member
  • Total Posts : 594
  • Reward points : 0
  • Joined: 2016/12/18 10:59:17
  • Location: 0
  • Status: offline
2020/11/21 18:23:41 (permalink)
1 (1)

PIC16F628A Template Build Fail

 
Loaded Microchip template into MPLAB 8.92
 
Quickbuild failed.
 
Here is screenshot.
 
What is making it fail please?

Attached Image(s)


 
 
 
 
 
 
 

 
 
 
 
 
#1
dan1138
Super Member
  • Total Posts : 3995
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 18:49:52 (permalink)
+2 (2)
picmicrocontrolleruser
Loaded Microchip template into MPLAB 8.92
 
Quickbuild failed.
 
What is making it fail please?

The MPLAB v8.92 does not work well in a 64-bit version of the WindowsOS when installed in the default "C:\Program Files (x86)" folder.
 
The Microsoft's User-Access-Control(UAC) methods cause the "C:\Program Files (x86)" folder to behave in ways that MPLAB v8.92 does not play nice with.
 
You may need to copy the 16F628ATEMP.ASM and p16F628A.inc files to another folder outside of the "C:\Program Files (x86)" folder before it will build the way you expect.
#2
1and0
Access is Denied
  • Total Posts : 11505
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 18:59:05 (permalink)
+4 (4)
picmicrocontrolleruser
What is making it fail please?

The Error message is very self-explanatory. Symbols are defined in the include file, so look inside to see how it is spelled. ;)  With almost 600 posts, you're still having problems blinking an LED and debugging ancient PIC devices with ancient tools. :(
 
 
#3
upand_at_them
Super Member
  • Total Posts : 740
  • Reward points : 0
  • Joined: 2005/05/16 07:02:38
  • Location: Pennsylvania
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 20:04:07 (permalink)
+2 (2)
1and0
picmicrocontrolleruser
What is making it fail please?

The Error message is very self-explanatory. Symbols are defined in the include file, so look inside to see how it is spelled. ;)  With almost 600 posts, you're still having problems blinking an LED and debugging ancient PIC devices with ancient tools. :(

 
^This.  The include file is mentioned in the error and on line 33 of your program.  If you look in it you'll see the correct token to use.  You have a choice of two.
post edited by upand_at_them - 2020/11/21 20:05:18
#4
ric
Super Member
  • Total Posts : 28967
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 20:35:27 (permalink) ☄ Helpfulby PStechPaul 2020/11/21 22:56:28
+4 (4)
dan1138
...
The MPLAB v8.92 does not work well in a 64-bit version of the WindowsOS when installed in the default "C:\Program Files (x86)" folder.
 
The Microsoft's User-Access-Control(UAC) methods cause the "C:\Program Files (x86)" folder to behave in ways that MPLAB v8.92 does not play nice with.

Really?
I run MPLAB 8.92 on 64 bit Windows 7, and never had a problem like that.
 
It's an error in the template file.
If you look in C:\Program Files (x86)\Microchip\MPASM Suite\p16f628a.inc
you will see the correct definitions are:
_CPD_ON              EQU  H'3EFF'    ; Data memory code-protected
DATA_CP_ON           EQU  H'3EFF'    ; Data memory code-protected
_CPD_OFF             EQU  H'3FFF'    ; Data memory code protection off
DATA_CP_OFF          EQU  H'3FFF'    ; Data memory code protection off

i.e. no underscore on the start of the longer version.
post edited by ric - 2020/11/21 20:36:53

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#5
1and0
Access is Denied
  • Total Posts : 11505
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 21:42:27 (permalink)
+2 (2)
ric
I run MPLAB 8.92 on 64 bit Windows 7, and never had a problem like that.

Me no problem with 64-bit Windows 10.
 

It's an error in the template file.
If you look in C:\Program Files (x86)\Microchip\MPASM Suite\p16f628a.inc

I think it is an error with the device specific include file. ;)
 
#6
ric
Super Member
  • Total Posts : 28967
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 23:01:31 (permalink)
+2 (2)
They're both supplied by Microchip, so their mistake either way...
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#7
The Loner
Super Member
  • Total Posts : 594
  • Reward points : 0
  • Joined: 2016/12/18 10:59:17
  • Location: 0
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/21 23:59:45 (permalink)
0
 
Thanks all
 
Deleted underscore and it compiled successfully.
 
Thanks!
;**********************************************************************
; This file is a basic code template for assembly code generation *
; on the PIC16F628A. This file contains the basic code *
; building blocks to build upon. *
; *
; Refer to the MPASM User's Guide for additional information on *
; features of the assembler (Document DS33014). *
; *
; Refer to the respective PIC data sheet for additional *
; information on the instruction set. *
; *
;**********************************************************************
; *
; Filename: xxx.asm *
; Date: *
; File Version: *
; *
; Author: *
; Company: *
; *
; *
;**********************************************************************
; *
; Files Required: P16F628A.INC *
; *
;**********************************************************************
; *
; Notes: *
; *
;**********************************************************************

 list p=16f628A ; list directive to define processor
 #include <p16F628A.inc> ; processor specific variable definitions

 errorlevel -302 ; suppress message 302 from list file

 __CONFIG _CP_OFF & DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTOSC_OSC_NOCLKOUT


;***** VARIABLE DEFINITIONS
w_temp EQU 0x7E ; variable used for context saving
status_temp EQU 0x7F ; variable used for context saving





;**********************************************************************
 ORG 0x000 ; processor reset vector
 goto main ; go to beginning of program
 

 ORG 0x004 ; interrupt vector location
 movwf w_temp ; save off current W register contents
 movf STATUS,w ; move status register into W register
 movwf status_temp ; save off contents of STATUS register

; isr code can go here or be located as a call subroutine elsewhere


 movf status_temp,w ; retrieve copy of STATUS register
 movwf STATUS ; restore pre-isr STATUS register contents
 swapf w_temp,f
 swapf w_temp,w ; restore pre-isr W register contents
 retfie ; return from interrupt


main

; remaining code goes here

 goto main ;loop forever, remove this instruction, for test only


; initialize eeprom locations

 ORG 0x2100
 DE 0x00, 0x01, 0x02, 0x03


 END ; directive 'end of program'



 
 
 
 
 
 
 

 
 
 
 
 
#8
PStechPaul
Super Member
  • Total Posts : 2973
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/22 00:14:34 (permalink)
+2 (2)
You might learn from this, how to interpret the error messages. Look at the p16F628A.inc file and see how the CONFIG symbols are defined. You may need such debugging and investigative methods in the future.

 
#9
The Loner
Super Member
  • Total Posts : 594
  • Reward points : 0
  • Joined: 2016/12/18 10:59:17
  • Location: 0
  • Status: offline
Re: PIC16F628A Template Build Fail 2020/11/22 00:34:38 (permalink)
+1 (1)
 
Thanks!

 
 
 
 
 
 
 

 
 
 
 
 
#10
Jump to:
© 2020 APG vNext Commercial Version 4.5