Making a menu


Closed Thread
Results 1 to 37 of 37

Thread: Making a menu

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    well i went back to it, i stripped it right back to basics to ensure the buttons were working and tested it a command at a time and got it working!
    It dint like the way i had used the IF and ENDIF commands...
    start:

    IHOURS=0
    IMINUTES=3



    HOURSI:
    If Butup=0 then
    IHOURS=IHOURS+1
    endif
    IF BUTdwn=0 THEN
    IHOURS=IHOURS-1
    ENDIF
    IF BUTSTART=0 THEN
    GOTO MINSI
    ENDIF
    pause 50
    GOSUB TIMESETUP
    GOTO HOURSI

    MINSI:
    PAUSE 5000
    MINSI1:
    IF BUTUP=0 THEN
    IMINUTES=IMINUTES+1
    ENDIF
    IF BUTDWN=0 THEN
    IMINUTES=IMINUTES-1
    ENDIF
    IF BUTRESET=0 THEN
    GOTO HOURSI
    ENDIF
    IF BUTSTART=0 THEN
    GOTO CONTINUE
    ENDIF
    PAUSE 50
    GOSUB TIMESETUP
    GOTO MINSI1


    timesetup:
    pause 50
    LCDOUT $FE, 1, "GAME LENGTH"
    LCDOut $FE,$C0,DEC2 IHours,":",DEC2 IMinutes,":00.00"
    PAUSE 50
    REturn

    'butup and butdwn


    Continue:

    LCDOUT $FE, 1, "Settings Saved"
    LCDOut $FE,$C0,DEC2 IHours,":",DEC2 IMinutes,":00.00"
    pause 6000
    goto continue
    end
    So with that fully working i plonked it back into the other code im working on and now it freezes again doing what the original coding did and getting lost after adding the first hour....
    More time to play around tommorow night i guess.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Well, that's obviously not the full code so we can't help you figure out what's causing the lock-up...

  3. #3
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Exclamation New error code!

    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 project thats 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?

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by chrisshortys View Post
    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!
    Somebody should 'sticky' that statement and make it required reading for newbies...
    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 project thats 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?
    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.
    Otherwise, post the code

  5. #5
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Its the error code from the compillier from asm to hex in mplabs. This is the full error code

    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
    So from what you said its proberly just a coding error somwhere, I shall go and have a look in the coding again!
    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 post so had to chop the code but you get the idea!

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    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.)
    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!
    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.
    Last edited by skimask; - 20th October 2008 at 19:40.

  7. #7
    Join Date
    Oct 2008
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    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.

Similar Threads

  1. interactive menu with hyperterminal
    By jamied in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 5th January 2009, 12:13
  2. Sending menu to PC from PIC16F876A
    By joseph Degorio in forum Serial
    Replies: 2
    Last Post: - 12th November 2007, 08:03
  3. Interrupt/timer not really interrupting...
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd May 2005, 23:05
  4. Interrupt Menu System Example and Help Needed
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2005, 18:05
  5. Lcd Menu
    By eliecer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 20:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts