OWIN fails with PBP2.47 but OK with 2.43


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Posts
    4

    Unhappy OWIN fails with PBP2.47 but OK with 2.43

    With PBP 2.47 we found that the OWIN command resets the PIC during the OWIN command execution. This does not happen with our older revision 2.43.
    The PIC is a 16F876.

    In particular, while executing this command:

    owin onewireio,0,[str BUF\13]

    Where BUF VAR byte [8]

    The defines used are:

    DEFINE OSC 16 ' If 4MHz is used the the max baud rate is 2400.
    INCLUDE "modedefs.bas"
    DEFINE ONINT_USED 0 ' 1 for bootloader, 0 no
    DEFINE CHAR_PACING 100 ' delay between serial characters
    ADCON1 = 7 'Disable ADC . port A in normal mode
    RCSTA.7=1 'If HSEROUT is used
    DEFINE HSER_RCSTA 90h ' Set receive register to receiver enabled
    DEFINE HSER_TXSTA 20h ' Set transmit register to transmitter enabled
    DEFINE HSER_SPBRG 25 'Set SPBRG directly (normally set by HSER_BAUD)
    DEFINE HSER_BAUD 9600 ' Set baud rate
    DEFINE SHIFT_PAUSEUS 50 'delay for Shift in and out clock at high
    define HSER_CLROERR 1 ' to avoid hangs due to buffer overrun


    The bug is the same if the assembler compilation is done using MPLAP or the PBP included compiler.
    Some one has a clue or solution for this ?. It is not nice having to switch PBP compiler revisions depending on the PIC being used.

    Jose

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jmontse View Post

    owin onewireio,0,[str BUF\13]

    Where BUF VAR byte [8]
    It's receiving 13 bytes into an 8 byte array.
    That will overwrite other RAM locations, possibly causing unpredictable results.
    DT

  3. #3
    Join Date
    Aug 2007
    Posts
    4


    Did you find this post helpful? Yes | No

    Smile Solved:OWIN fails with PBP2.47 but OK with 2.43

    Oppsss.....
    You are right. I can't believe what I did.....
    I changed the array size to 14 and now it compiles OK with all the versions we have.

    Thanks a lot !

    Josep

Similar Threads

  1. can i slowdown owin and owout
    By Eugen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 29th January 2005, 23:17

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