macro cmpeq error mystery


Closed Thread
Results 1 to 8 of 8
  1. #1
    David Marks's Avatar
    David Marks Guest

    Unhappy macro cmpeq error mystery

    Following reasonably successful programming ativities using PBP within Microcode studio. I have suddenly encountered the following error:
    Error: macro cmpeq?www not found
    I can find no reference in any manuals / help files to this error and am now totally stuck with no idea what to do next. Any helpful suggestions would be greatly appreciated
    Thanks in anticipation

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Cool

    Hi, David

    Have a look to PBPic14 ( or 17 or 18 ...) .mac in your PBP files ... may be it is WWB ?

    Then load it back again from the original diskette ...

    Alain
    Last edited by Acetronics2; - 24th February 2005 at 12:45.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    David Marks's Avatar
    David Marks Guest


    Did you find this post helpful? Yes | No

    Default Question regarding macro cmpq error

    Thanks Alain and mister e
    Alain: Tried reinstalling from original pbp disc but it makes no difference.
    Mister e: Not sure what you mean but presume I have not given sufficient info. If so I apologise and hope the following is of help/interest (The Pic being used is a 16F628a whichI have been successfully programming with the same software on very similar programs.

    The ultimate objective of the program is to select one of a list of nominal values and then using a random number generator and a lookup table to produce a corresponding number which will produce an answer which is based on either a normal distribution or a skew distribution and display it on the same seven seg display that is used for selecting the nominal number.
    There are two lists of nominal value i.e from 2 to 12 in increments of 2 and from 10 to 35 in increments of 5. Code written so far is simply to select the nominal number from one of these two options by identifying the mode (modes 1- 3 use the 2 to 12 sequence and modes 4 & 5 will use the 10 to 35 sequence.
    I have removed a number of syntax errors (I am still a bit of a novice) but am left with this message:
    Error: macro cmpeq?www not found in macro file.


    b0 var word ‘
    w1 var word ‘
    A var word ‘
    mode var word ‘
    nomsel var word ‘ Define variables
    inc var word ‘
    maxno var word ‘
    MyRandomVar var word ‘

    trisb = %00000000 ‘ Set portB to outputs for 7 seg display trisa = %1111‘ ‘ Set Port A2 -7 to digital inputs to read
    cmcon = 7 ‘ switches and A0 –A1 to outputs to
    ‘ multiplex 7 seg display
    MyRandomVar = 0
    main:
    gosub Button_mode ‘ Find which mode to operate in
    if mode < 4 then
    nomsel = 2
    inc = 2
    maxno = 12
    else
    nomsel = 10
    inc = 5
    maxno = 35
    endif
    gosub Button_nomsel ' Select nominal value
    gosub Button_Go ' Go and find actual value
    w1 = nomsel
    gosub display
    goto main
    Display:
    b0 = W1/10 ' Find number of tens
    W1 = W1 // 10 ' Remove tens from W1
    gosub bin2seg ' Convert number to segments
    poke portb,b0 ' send segments to LED
    poke porta,%11111101 ' Turn on tens digit
    pause 1 ' Leave it on for 1 ms
    poke porta,%11111111 ' Turn off digit to prevent ghosting
    b0 = W1 ' Get number of units
    gosub bin2seg ' Convert number to segments
    poke portb,b0 ' Send segments to LED
    poke porta,%11111110 ' Turn on units digit
    pause 1 ' Leave it on for 1 ms
    poke porta,%11111111 ' Turn off digit to prevent ghosting
    return
    bin2seg:
    Lookup b0,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$18],b0
    Return
    Button_mode:
    if porta.4 = 0 then return
    Loop0: if porta.4 = 1 then loop0
    mode = mode + 1
    if mode = 6 then mode = 1
    return
    Button_nomsel:
    if porta.2 = 0 then return
    Loop1: if porta.2 = 1 then loop1
    nomsel = nomsel = inc
    if nomsel > maxno then nomsel = nomsel -inc * 5
    return
    Buttontest2:
    MyRandomVar = MyRandomVar +1
    if MyRandomVar = 46 then MyRandomVar = 0
    if porta.3 = 0 then return
    Loop2: if porta.3 = 1 then loop2
    nomsel = MyRandomVar
    return
    Button_Go:

  5. #5
    Join Date
    Feb 2005
    Location
    Saltburn by the Sea
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    You have confused the compiler with the line

    nomsel = nomsel = inc

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I also agree with the multiple equal stuff. I see some others too

    it's probably an copy/paste error but
    Code:
    trisb = %00000000 ‘ Set portB to outputs for 7 seg display trisa = %1111‘ ‘ Set Port A2 -7 to digital inputs to read 
    
    cmcon = 7 ‘ switches and A0 –A1 to outputs to 
    ‘ multiplex 7 seg display
    should be
    Code:
    TRISB=0 ' set PORTB as output
    TRISA=%11111100 ' Set Port A2 -7 to digital inputs to read 
                    ' switches and A0 –A1 to outputs to  multiplex 7 seg display
    CMCON=7 ' disable analog pins on PORTA
    this
    Code:
    poke porta,%11111101 ' Turn on tens digit
    pause 1 ' Leave it on for 1 ms
    poke porta,%11111111 ' Turn off digit to prevent ghosting
    can be replace to
    Code:
    PORTA.1=0 ' Turn on tens digit
    pause 1 ' Leave it on for 1 ms
    PORTA.1=1 ' Turn off digit to prevent ghosting
    And maybe.. maybe, some variable name u r using are already use in PBP assembler rouines... i'm not sure of inc,w1,b0,A

    about this one
    Code:
    if nomsel > maxno then nomsel = nomsel -inc * 5
    depending of you math priority.. safer if you use some ()
    Code:
    if nomsel > maxno then nomsel = nomsel - ( inc * 5 )
    about this one
    Code:
    Lookup b0,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$18],b0
    not sure if it's working to look into b0 and return into b0.. maybe yes, maybe no. try
    Code:
    Lookup b0,[$40,$79,$24,$30,$19,$12,$02,$78,$00,$18],b1
    b0=b1
    one last, your appostroph is not the good character must be ' instead of ‘
    that's a big big big difference or you can use ; instead
    Last edited by mister_e; - 24th February 2005 at 16:23.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    David Marks's Avatar
    David Marks Guest


    Did you find this post helpful? Yes | No

    Smile macro cmpeq error mystery

    Hi Folks,
    Brilliant, I must be going senile ! The double equal sign was the problem. I assumed (obviously incorrectly) that snce I wagetting no reports of syntax errors that there could not be a mistake of that kind. Consequently I dd not check as well as I (hopefully will in future) My only regret now is that I don't live near enough to either of you Guys to buy a round ! I am extremely grateful. many thanks

  8. #8
    enoearias's Avatar
    enoearias Guest


    Did you find this post helpful? Yes | No

    Thumbs up thank you very much

    Quote Originally Posted by David Barker View Post
    You have confused the compiler with the line

    nomsel = nomsel = inc


    i'm new at this forum, i signed in to learn from all the people with knoledge, tank you for this answer. i have the same problem and you solve it.


    sorry if i've mistakes. i'm from mexico.

Similar Threads

  1. USBDemo, something to learn USB a little bit
    By mister_e in forum Code Examples
    Replies: 278
    Last Post: - 1st May 2014, 00:38
  2. PBPro error "Macro USBINIT? not found in macro file"
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2011, 09:06
  3. Replies: 6
    Last Post: - 4th November 2009, 13:36
  4. ERROR: Macro MOD?TCB not found in macro file.
    By JohnP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th February 2009, 19:10
  5. Passing an array as a macro argument?
    By forgie in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th September 2005, 17:09

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