Trying to compile a simple program for a PIC12F683 using PBP 3 in MPLAB. I am getting the following error:
Error[118] C:\USERS\MIKE\DESKTOP\STUFF\PROJECTS\GOLDWING TRUNK OPENER\GOLDWING TRUNK OPENER.ASM 139 : Overwriting previous address contents (2007)
The offending line is the first, __config...
If I comment the line out, it compiles okay, but not wirh the config settings that I want.
How do I set the config items the way I want?
Code:'@ __config _HS_OSC & _WDT_OFF & _MCLRE_OFF DEFINE osc 8 ' setup the clock for 8 MHz resonator ' configure some defines for the A/D reads DEFINE ADC_BITS 10 DEFINE ADC_CLOCK 3 DEFINE ADC SAMPLES 20 ; variables pulse_width var word ' this determines the width of the output pulse, 1.2 ms - 1.8 ms ' initialize the program TRISIO = %00000000 ' set all GPIO pins to output ANSEL = %00000000 ' set all GPIO pins to digital CMCON0 = %00000111 ' Turn of the comparators ' Set TMR0 to interrupt every 20 milliseconds OPTION_REG = %00000111 ' Set TMR0 configuration 1:256 prescaler INTCON = %10100000 ' Enable TMR0 interrupts TMR0 = 101 ' set the timer0 offset for 50.0801 Hz GPIO = %00000000 ' set GPIO to all 0's pulse_width = 127 ' center value, 1.5 ms pulse On Interrupt Goto pulse_out ; this is where we go when the 20ms timer interrupts main_program: pulse_width = 255 ' move to end (unlock the trunk) pause 500 ' give it time to reach the end pulse_width = 0 ' Move to beginning pause 500 ' give it time to reach the beginning end disable pulse_out: TMR0 = 101 ' reset the offset INTCON.2 = 0 ' Reset timer interrupt flag pulsout GPIO.0, + 10 pulse_width ' normalize the setting for 1.2 ms to 1.8 ms pulses resume end




Bookmarks