I don't understand this code! - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 47 of 47
  1. #41
    Join Date
    May 2006
    Location
    Kedah, Malaysia
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Aarrrggghh, I hate hearing that, too!

    Mister-e’s suggestion on the other tread sounds plausible (“Where's the CMCON setting?”).

    The other idea is: you may not be really re-programming the PIC.
    Try changing the times to 100 times longer. Just to check.
    or
    Try erasing the PIC, reading it, look at the hex to make sure it is erased. Then, program it with the new code compiled from MCS and PBP. Then read the device again to see it has really been re-programmed.
    I seem to remember some forum postings about forgetting to re-compile before re-burning.
    So they just kept burning the original (Version 1 of their code) ASM into HEX, not the new PBP (Version 2 of their code).
    -Adam-
    I am proposoing to put NPN transistor to invert the waveform?

    If cannot then fine.

  2. #42
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Russ Kincaid View Post
    I hate to tell you this, Adam, but your program makes the outputs high for 4 ms and low for 12 ms, just like mine. And, I am refrencing the scope to VSS.
    I'm thinking the problem overall is the fact that you've got one resistor for current limiting for 2 LEDs. If you pull either pin low and you're measuring your signal on the LED side of the resistor, it won't matter which pin gets pulled low, they will probably both read low at back side of the LED (the connection nearest to the resistor).

    What do you get if you 'scope the actual pins themselves, right at the PIC with nothing else connected?

  3. #43
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Good suggestions, Adam. But, I have done all those things (except make the time longer). Look at post#15, why is that waveform the same as post#1?

  4. #44
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile My guess

    Hi Russ,
    Quote Originally Posted by Russ Kincaid View Post
    Look at post#15, why is that waveform the same as post#1?
    Because you are not really re-programming the PIC, with the PBP new program.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  5. #45
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hi Russ,Because you are not really re-programming the PIC, with the PBP new program.

    -Adam-
    Entirely possible! It's happened to me more than once!

  6. #46
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Thanks fellas, I started a new thread and got the answer: CMCON=7. I have not figured out why that works, maybe it is just one of those things I was not meant to know.

  7. #47
    Join Date
    Sep 2006
    Location
    Indiana, USA
    Posts
    72


    Did you find this post helpful? Yes | No

    Default .

    Hey Russ,

    You're doing a great job with N&V!
    Keep it up!

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 : 1

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