picbasic +12c508a+soft_stack error


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It might work on one series, but I wouldn't count on it as being reliable across the board.
    I have seen various PICs come up with totally random values in port latches at POR, so
    you really do need to clear portb latches first if it's to be reliable.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    i'm thinking of something using interrupt.. not sure if it could reduce things to 8-10 words... mmm..
    Steve

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

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I had considered that approach too, but more than half of your code space (or more) would
    be eaten up with interrupt configuration setup.

    Making it "reliable" with less than 13 words is going to be a real task.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    yup, but where is it stated that it has to be reliable, where it is stated that we need to use the same PIC and hardware ?

    i still believe it's doable... but with some hair lost
    Steve

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

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    yup, but where is it stated that it has to be reliable?
    I think that's a given. It has to work when you turn on the power.
    As for the rest of the rules, well, I'm assuming No EEPROM is the only one. Edit: with a 16F628A
    i still believe it's doable... but with some hair lost
    I'm starting to believe NO.
    But I haven't given up yet.

    I've got 3 completely different versions at 13 words now.
    1 using external circuitry to TMR0
    1 using external circuitry to a comparator
    and another that simply shaves a word off my 14 word program. (wish I'd done that to begin with)

    It seems that no matter what you do to save a word, you end up having to add something to make it work.

    I'm sure getting some "Quality Time" in with the datasheets though. All kinds of stuff I didn't know before.
    <br>
    Last edited by Darrel Taylor; - 21st December 2007 at 02:24. Reason: 628a
    DT

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


    Did you find this post helpful? Yes | No

    Default

    yup all good points.. the only thing i've never dare to mess with is the stack overflow behaviour and ORG... 8 bit stack seems nice... but not sure how bad/good it behave...mmm

    interesting how a led chaser can be a food for thought
    Last edited by mister_e; - 21st December 2007 at 02:21.
    Steve

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

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    yup all good points.. the only thing i've never dare to mess with is the stack overflow behaviour and ORG... 8 bit stack seems nice... but not sure how bad/good it behave...mmm
    interesting how a led chaser can be a food for thought
    Something tells me that somebody is about to break the law...
    The law of diminishing returns!

    Does this 'thing' have to have 8 LEDs? Or can it have 16 LEDs?
    I'm thinking something along the lines of 2 LEDs per pin, back-to-back, with the common for all running to another pin...don't know what I'm thinking yet...

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    It might work on one series, but I wouldn't count on it as being reliable across the board.
    I have seen various PICs come up with totally random values in port latches at POR, so
    you really do need to clear portb latches first if it's to be reliable.
    I don't doubt that at all...
    I just checked the CARRY bit, datasheet says unknown on POR, mine come's up cleared every time (at least every time I've check anyways). That shoots that idea down...

Similar Threads

  1. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  2. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 05:58
  3. pbp245 compliation error
    By Woodzy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th July 2006, 06:59
  4. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 01:22
  5. Compiler/Assembler Error
    By LT_Pic in forum General
    Replies: 7
    Last Post: - 21st July 2005, 10:47

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