Started what I thought would be a quick turnaround to build a board to capture pulses from a rain gage and send to a master board. PicProto8 board and a 12F683 should do nicely. Why do things always have to get complicated? I want to use DT's to catch the pulses so I am assembling with MPASM.
PROBLEM wiith compiler error _CONFIG. Nothing I have done will clear the error. Things are compileng fine on other devices.
Error[122]c:\phpprog\wkfolder\12F683-1.asm 97:illegal opcode (_HS_OSC)
Error[122]c:\phpprog\wkfolder\12F683-1.asm 97:illegal opcode (_CPD_OFF)
DT's are commented out until first compile of simple code.
Items check of for this type of problem.
1. Does drop down minue display correct PIC? check!
2. Does Assembler point to C:\Program Files\Microchip\MPASM Suite? check!
3. Are config setting the same as in the MPASM INC file? check!
I also tried commiting out PBP\12F683.INC config line as was Darrels advise on a simular issue years ago, no help.
What have I missed?
Wayne
Code:asm _CONFIG _HS_OSC & _MCLRE_OFF & _WDT_OFF & _PWRTE_OFF _CONFIG _CPD_OFF & _BOD_ON & _IESO_OFF & _FCMEN_OFF endasm ;================= ;include "DT_INTS-14" ;include "ReEnterPBP" ;Include "MODEDEFS.BAS" ; Include for Shiftin/out modes ;================= ; wsave Var byte $20 SYSTEM ; wsave1 var byte $A0 SYSTEM define OSC 20 OPTION_REG = %01000000 ;Option register p.14DS bit6-rising edge OSCCON =%00000000 ;External Res p.22DS ANSEL = 0 ;All pins set to digital I/O p.35datasheet CMCON0 = 7 ;comparators off VRCON = 0 ADCON0 = 0 GPIO= %00000000 TRISIO= %00001100 ;sets GPIO.2 AND GPIO.3 as input others outputs IOC= %00001100 ;interrupt on change on GPIO2 and GPIO3 WDTCON= %01001 ;WDT control INTCON= %10001000 ;Interrupt control - GPIO Change Interrupt Enable p.15DS ;================= ;Variables Avar VAR BYTE ;general variable Bvar VAR BYTE ;general variable Cvar var byte ;general variable ;GPIO actioins LED var GPIO.0 ;general I/O - output TX var GPIO.1 ;Send all data to master unit - Output Raincount var GPIO.2 ;counts rain in 1/10 inch per pulse -input Sendnow var GPIO.3 ;input post to send data out after - input ; Gpio4&5 on resonator ;================= ;ASM ;INT_LIST macro ; IntSource, Label, Type, ResetFlag? ; INT_Handler INT_INT, _MyISR, PBP, yes ; endm ; INT_CREATE ; Creates the interrupt processor ;ENDASM ;@ INT_ENABLE INT_INT ;================= Start: HIGH LED pause 100 low LED pause 100 goto start end
Bookmarks