Help with code


Closed Thread
Results 1 to 28 of 28

Thread: Help with code

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xobx View Post
    Thats what im doing..

    Casue this the source code, right?
    http://img529.imageshack.us/img529/6991/coderm3.jpg
    Yes, but what are you doing to that source code that should cause it to change between compilings?

  2. #2
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    What?

    I first made a easy program that only made RB1 "blink" and I compiled it and transfered it over..

    Then I made this code and when I compiled it the hex file still had the old easy program.

    Code:
    @   device  pic16F648A, hs_osc, wdt_on, mclr_on, lvp_off, protect_off
    DEFINE OSC 20
            
    loop:   
    
            high portb.0
            pause 250
            High portb.1
            pause 250
            high portb.2
            pause 250
            low portb.0
            pause 250
            low portb.1
            pause 250
            low portb.2
            pause 250
            goto loop
            
            
            
            end

    So the Problem is: if I change the source code and compile it doesnt update the hex file.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xobx View Post
    I first made a easy program that only made RB1 "blink" and I compiled it and transfered it over..
    Then I made the code I just posted and when I compiled it the hex file still has the old easy program.
    So the Problem is: if I change the source code and compile it doesnt update the hex file.
    So, the old hex file and the new hex file are exactly the same size and have exactly the same contents, just a different date/time stamp?
    What does the bottom of the screen say when it's done compiling...if anything?

  4. #4
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Yes, it exactly same as the old one..

    You can see how it changes:
    Compiling > Assembling > Success: 82 words used.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xobx View Post
    Yes, it exactly same as the old one..

    You can see how it changes:
    Compiling > Assembling > Success: 82 words used.
    Ok, so the one file with portb.0/portb.1/portb.2 has 82 words used.
    What happens to the same program if you comment out everything under 'loop:' and above 'goto loop', then recompile it?

  6. #6
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    I just found out that if I change something in this the hex file changes

    Code:
     @   device  pic16F648A, hs_osc, wdt_on, mclr_on, lvp_off, protect_off
    DEFINE OSC 20
    But if I change something in the rest off the code the hex file doesnt change..

    :/

  7. #7
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    I restarted my computer and now does it work :/

    Wierd!

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xobx View Post
    I restarted my computer and now does it work :/

    Wierd!
    Installed a program and didn't do a restart so Windows internal paths didn't get updated...
    Glad I could help...not...

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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