macro cmpeq error mystery


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    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.

  2. #2
    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

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