A simple and basic question


Closed Thread
Results 1 to 36 of 36

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ted's View Post
    skimask, happy birthday.
    I created a new code:
    ..........
    There was no lst created but a mac, asm and hex.
    .....
    How do you filter out the information needed?
    There's a checkbox in MCS for telling MCS to kick out a .lst file during the compilation.
    Put easily recognizable labels before and after the code section that your after in your PBP source and when the .lst file gets created, do a search (Ctrl-F) for those labels and you should be able to see them right off.

  2. #2
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    This is what is written in between

    Code:
       48						LABEL?L	L00001	
         +					        LALL
         +	0019-				L00001
        49						CMPGE?WCL	_Zahl, 0EA60h, L00002
         +	0019- 0838			        movf    _Zahl, W
         +	001A- 00A0			        movwf   R0
         +	001B- 0839			        movf    (_Zahl) + 1, W
         +	001C- 00A1			        movwf   (R0) + 1
         +	001D- 30EA			        movlw   low ((0EA60h) >> 8)
         +	001E- 00A3			        movwf   R1 + 1
         +	001F- 3060			        movlw   low (low (0EA60h))
         +	0020- 2001			        call    CMPGE
         +	0021- 1D03			        btfss   STATUS, Z
         +	0022- 2827			        goto    L00002
        50						ADD?WCW	_Zahl, 001h, _Zahl
         +	0023- 0AB8			        incf    _Zahl, F
         +	0024- 1903			        btfsc   STATUS, Z
         +	0025- 0AB9			        incf    _Zahl + 1, F
        51						GOTO?L	L00001
         +	0026- 2819			        goto    L00001
        52						LABEL?L	L00002	
         +					        LALL
         +	0027-				L00002
        53
    What is more, there is no question about my configuration. It is a timing issue. The osc value determines the speed to let the program know how many cycles one millisecond will take f.i.. Knowing the speed there is enough information to reproduce the question and to give an answer. I am not here to relearn what would take others just a few seconds to reproduce - less than writing a "do it yourself" takes.

    I am going to use Jackson's 3us and this is the end of the story.

    Do not make things more complicated than they have to be.
    Last edited by Ted's; - 29th June 2008 at 10:49.

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


    Did you find this post helpful? Yes | No

    Unhappy

    Your result is :

    504.027000 ms ... @ 8.4 µs per loop !!!

    3 minutes to get it with MPSIM , as we had explained you ...

    Alain
    Last edited by Acetronics2; - 29th June 2008 at 11:15.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    You see, simple and easy for an experienced programmer.

    Why did you not just do that in the first place?

    So my code will be:

    Code:
    Zahl VAR WORD
    time_in_us VAR WORD
    DEFINE OSC 20
    WHILE Zahl < 60000
        Zahl = Zahl + 1
    WEND
    
    time_in_us = Zahl * (84/10)
    Last edited by Ted's; - 29th June 2008 at 11:28.

  5. #5
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    One thing to clarify: Is there a difference regarding the time being elapsed when using BYTE for Zahl instead of WORD?

    So

    Zahl VAR WORD

    is being replaced by

    Zahl VAR BYTE

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ted's View Post
    One thing to clarify: Is there a difference regarding the time being elapsed when using BYTE for Zahl instead of WORD?
    Yes, because comparing 2 words could take 2 comparisons....Check the high byte, if it's equal, then you have to go on and check the low byte.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by Ted's View Post
    You see, simple and easy for an experienced programmer.

    Why did you not just do that in the first place?
    1) Cause here, we teach people how to catch the fish ... it's not a PbP "Drive in" !!!

    as we had explained you ...
    2) Cause there was NO answer to what you had asked ... and no way to understand what you wanted to do ...

    3) Still no way to understand ... :

    Code:
    Zahl VAR WORD
    time_in_us VAR WORD
    DEFINE OSC 20
    WHILE Zahl < 60000
        Zahl = Zahl + 1
    WEND
    
    time_in_us = Zahl * (84/10)
    ... with this code, "Time_in_us" WON' T be 504 027 ... so, why re-calculate it ???

    ... I do not joke : with the calculation errors ( roundings ) , the showed result will be ... FALSE !!!


    Was I Spiritual enough ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Newb Question...
    By Perrin` in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd January 2009, 20:49
  2. IF question.
    By Steve Matson in forum General
    Replies: 5
    Last Post: - 23rd November 2007, 03:15
  3. Visual Basic 6 question
    By Christopher4187 in forum Off Topic
    Replies: 5
    Last Post: - 3rd July 2006, 13:06
  4. A simple startup question
    By teilhardo in forum General
    Replies: 6
    Last Post: - 7th January 2006, 20:33
  5. simple newb question
    By PICMAN in forum General
    Replies: 13
    Last Post: - 5th February 2005, 02:16

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