Well, that's obviously not the full code so we can't help you figure out what's causing the lock-up...
Well, that's obviously not the full code so we can't help you figure out what's causing the lock-up...
Well i didn't post it for a reason you see. I wanted to try and solve the problem myself. It's all well and good me using the forums for help but if i dont try and dont some on my own im never going to progress!
This was one thing i was majorly criticised over by a previous line manager, not knowing when to ask for help and trying to do it all myself so now im trying to find a happy medium.
Anyway now back to the project!
I got the code working by going through line by line and rebuilding it in the main projectthats all good but.... i now have a new error off MPLAB when i try and compile the coding:
"Operand contains unresolvable labels or is too complex"
Any idea on what this means guys?
Somebody should 'sticky' that statement and make it required reading for newbies...
Is that the FULL error or are there extra numbers that go with it? If there are numbers, they may point to either a line in the original source code, or, if using MPASM, the assembly listing as to where the error has occured. I think in this case, it might be simply a misplaced space or extra ' or " somewhere in there, a punctuation thing.This was one thing i was majorly criticised over by a previous line manager, not knowing when to ask for help and trying to do it all myself so now im trying to find a happy medium.
Anyway now back to the project!
I got the code working by going through line by line and rebuilding it in the main projectthats all good but.... i now have a new error off MPLAB when i try and compile the coding:
"Operand contains unresolvable labels or is too complex"
Any idea on what this means guys?
Otherwise, post the code![]()
Its the error code from the compillier from asm to hex in mplabs. This is the full error code
So from what you said its proberly just a coding error somwhere, I shall go and have a look in the coding again!Code:Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F688 "OLYMPICS.ASM" /l"OLYMPICS.lst" /e"OLYMPICS.err" /o"OLYMPICS.o" Warning[215] C:\PBP\16F876A.INC 20 : Processor superseded by command line. Verify processor symbol. Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F876A.INC 36 : MESSAGE: (Processor-header file mismatch. Verify selected processor.) Error[151] C:\PBP\PBPPIC14.LIB 7421 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 571 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 587 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 604 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 607 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 613 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 571 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 587 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 604 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 607 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 613 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 637 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 643 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 659 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 676 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 679 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 685 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 571 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 587 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 604 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 607 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 613 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 637 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 643 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 659 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 676 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 679 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 685 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 517 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 522 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 529 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 571 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 587 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 604 : Operand contains unresolvable labels or is too complex Error[151] C:\PBP\OLYMPICS.ASM 607 : Operand contains unresolvable labels or is too complex BUILD FAILED: Mon Oct 20 18:03:13 2008
Was just making sure that the error didn't mean i had used up all of the memory on the chip, its getting a bit long now at 468 lines! Ive never had such a large projet so i dont know what happens when you fill the chip up to the brim!
Breaking the forum too now! got The text that you have entered is too long (174172 characters). Please shorten it to 10000 characters long.
come up when i tried to postso had to chop the code but you get the idea!
Looks to me like you've got one PIC selected for compiling/assembling, but have the code written for another PIC.
Code:Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F688 "OLYMPICS.ASM" /l"OLYMPICS.lst" /e"OLYMPICS.err" /o"OLYMPICS.o" Warning[215] C:\PBP\16F876A.INC 20 : Processor superseded by command line. Verify processor symbol. Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F876A.INC 36 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)My latest project is up to 5,600 lines now. I'd guess another 4,000 or so to go. MCS and/or PBP and/or MPLAB will let you know when it gets too long.Was just making sure that the error didn't mean i had used up all of the memory on the chip, its getting a bit long now at 468 lines! Ive never had such a large projet so i dont know what happens when you fill the chip up to the brim!
Last edited by skimask; - 20th October 2008 at 19:40.
ok now thats just weird!
I hadnt changed anything for that to happen......
I just went through the programe and commented out all the code i added and removed the comments one by one and it compilied fine........
I must be being haunted or somthing :s
But thanks alot for your time!
It's good to know im not runnign out of space just yet! I had a look at those youtube vids of your latest project the other day and they realy are scary the amount of work and knowledge in them!
Last edited by chrisshortys; - 20th October 2008 at 19:45.
Well i ran out of memory at around 700 lines
Now the code i have at the moment isn't that far but im getting close!
so i'm after any advice on the code i have on ways of doing the same thing without using as much memory!
Would using tables on menus help reduce space as i still have ALOT of coding to do!
I know the code is quite fragmented and not well ordered but I had planned to rewrite it its just me making a beta of it at the moment!
cheers!
Code:' ' Olympic Timer ' ============= ' Melanie Newman ' 05/Aug/2004 ' Modified by Chris Hammersley ' For Spec-ops.nl ' Oct 2008 ' Topical Program demonstrates use of Interrupt ' Driven Background TIMER, to time events down to ' one one-hundredth of a Second (1/100 Sec). ' ' Bonus CALIBRATION Feature allows simple adjustments ' in 360mS steps per hour. This calibration adjustment ' range is limited to +/- 36 seconds per Hour. ' ' This program is for 4MHz clock (1uS Timer Ticks). 'Original programe includes a calibratable stop clock counting upwards. 'MODIFICATIONS '------------- 'V1.1 23rd october 2008 'Working menu selecting game length with 2 presets and a customisable 'Count down clock. 'Programe knows when time is up and goto new instructions. ' PIC Defines ' ' 'V1.2 Ongoing 'GAME TYPES MENU INCLUDED 'INCLUDED THE CODING FOR BOTH COUNT-DOWN AND COUNT-UP CLOCKS ' 'V1.3 FUTURE 'INCLUDE RF OPERATIONS ' ' =========== ' ' Change these defines to suit your chosen PIC ' '@ DEVICE pic16F876a, WDT_ON ' Watchdog Timer '@ DEVICE pic16F876a, PWRT_ON ' Power-On Timer '@ DEVICE pic16F876a, BOD_ON ' Brown-Out Detect '@ DEVICE pic16F876a, LVP_OFF ' Low-Voltage Programming '@ DEVICE pic16F876a, CPD_OFF ' Data Memory Code Protect '@ DEVICE pic16F876a, PROTECT_OFF ' Program Code Protection '@ DEVICE pic16F876a, WRT_OFF ' Flash Memory Word Enable ' ' Hardware Defines ' ================ CMCON=%00000111 CVRCON=%00000000 ' ' LCD Display ' ----------- ' Adjust these to suit your chosen LCD pinout ' DEFINE LCD_DREG PORTB 'Define PIC port used for LCD Data lines DEFINE LCD_DBIT 4 'Define first pin of portb connected to LCD DB4 DEFINE LCD_RSREG PORTB 'Define PIC port used for RS line of LCD DEFINE LCD_RSBIT 3 'Define Portb pin used for RS connection DEFINE LCD_EREG PORTB 'Define PIC prot used for E line of LCD DEFINE LCD_EBIT 0 'Define PortB pin used for E connection DEFINE LCD_BITS 4 'Define the 4 bit communication mode to LCD DEFINE LCD_LINES 2 'Define using a 2 line LCD DEFINE LCD_COMMANDUS 2000 'Define delay between sending LCD commands DEFINE LCD_DATAUS 50 'Define delay time between data sent. ' Control Buttons/Lines ' --------------------- ButStart var Portc.0 ' Take this pin low momentarily to START timing ButStop var Portc.1 ' Take this pin low momentarily to STOP timing ButReset var Portc.2 ' Take this pin low momentarily to RESET clock Butup var portc.3 ' Take this pin low momentarily to increase clock time Butdwn var portc.4 ' Take this pin low momentarily to decrease clock time ' ' Hold the RESET Button pressed for at least FIVE seconds ' to jump into CALIBRATION Mode ' ' Software Defines ' ---------------- BannerOffset var BYTE ' Variable holding start address of Banner Display CounterA var BYTE ' Just a Counter CounterB var BYTE ' Just a Counter CounterC var BYTE DataA var BYTE Hours var BYTE Hundredths var BYTE Minutes var BYTE OverflowError var BIT RunningFlag var BIT Seconds var BYTE SetupTimeOut var WORD ' Timeout counter for Calibration/Set-Up Mode TMR1Cal var BYTE ' Calibration Value IHOURS VAR BYTE IMINUTES VAR BYTE TIMER VAR BYTE TMR1CalAR var Byte ' Calibration 0=ADVANCE, 1=RETARD TMR1RunOn var WORD ' variable holding TMR1 Run-On value ' ' EEPROM Presets ' -------------- Data @0,0 ' Advance/Retard Indicator Data 0 ' Calibration Value Data "Spec-ops.nl Tactical Game Aid - Enter Game Length" ' ' Software Constants ' ------------------ TMR1CalMax con 100 ' Maximum adjustment (+/-100uS per 10mS interrupt) TMR1Preset con $D910 ' 10mS Timer Reload value, offset by 20uS ' to allow for TMR1 Setting Calculations ' ' Start Program ' ============= ' ' Initialise Processor ' -------------------- TRISA=%00000000 TRISB=%00000000 TRISC=%00011111 ADCON0=%11000000 ADCON1=%00000111 OPTION_REG.7=0 ' Enable Pull-Up's RunningFlag=0 ' Disable actual Interrupt Time-Keeping Pause 1000 ' Pause for LCD to initialise ' ' Silly Intro Banner just for Fun ' ------------------------------- LCDOut $FE,1 ' Clear LCD BannerOffset=2:Gosub DisplayBanner Pause 2000 For CounterA=0 to 33 BannerOffset=2+CounterA Gosub DisplayBanner Pause 350 'pause between change of characters Next CounterA Pause 4000 '---------------- 'Menu and Presets '---------------- ' 'MAIN MENU '--------- MAINMENU: PAUSE 1000 MAINMENUA: LCDOUT $FE, 1, " SELECT MENU" LCDOut $FE,$C0,"COUNTDOWN" PAUSE 100 IF BUTSTART=0 THEN GOTO MENUA ENDIF IF BUTUP=0 THEN GOTO MAINMENUB ENDIF GOTO MAINMENUA MAINMENUB: LCDOUT $FE, 1, " SELECT MENU:" LCDOut $FE,$C0," COUNT UP" PAUSE 100 IF BUTDWN=0 THEN GOTO MAINMENU ENDIF IF BUTSTART=0 THEN TIMER=1 PAUSE 20 IF BUTSTART=0 THEN GOTO BEGINNING ENDIF ENDIF PAUSE 50 GOTO MAINMENUB
Bookmarks