Serin timeout not working properly!


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by Bruce View Post
    The timeout period gets continuously reset if there's noise on the serial input pin. If you're trying to use this option with a noisy RF receiver, the timeout/label approach isn't going to work.
    Are there any other options?
    I tried removing timeout period and use DT Interrupts, but it gave list of following errors.
    Code:
    Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z   -p12F635 "TxRx.bas"
    PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc.
    All Rights Reserved. 
    
    ERROR: Variable wsave3 position request 416 beyond RAM_END 127.
    ERROR: Variable wsave2 position request 288 beyond RAM_END 127.
    ERROR: Variable wsave1 position request 160 beyond RAM_END 127.
    ERROR: Unable to fit variable wsave
    ERROR: Unable to fit variable RS1_Save
    ERROR: Unable to fit variable RS2_SaveHalting build on first failure as requested.
    BUILD FAILED: Thu Dec 31 14:13:38 2009

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


    Did you find this post helpful? Yes | No

    Default

    Open DT_INTS-14.bas and read the first few lines about the wsave errors.
    Regards,

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

  3. #3
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Thanks for showing the starting point. I have fired a bullet in the dark as I do not know much about ASM, banks and stuff. BUT it has reduced the errors.

    I still have few errors left.
    My DT_IN... .bas looks like this now:

    Code:
    ;wsave       var byte    $20     SYSTEM      ' location for W if in bank0
    wsave       var byte    $70     SYSTEM     ' alternate save location for W 
                                                ' if using $70, comment out wsave1-3
    '
    ' --- IF any of these three lines cause an error ?? ---------------------------- 
    '       Comment them out to fix the problem ----
    ' -- It depends on which Chip you are using, as to which variables are needed --
    ;wsave1      var byte    $A0     SYSTEM      ' location for W if in bank1
    ;wsave2      var byte    $120    SYSTEM      ' location for W if in bank2
    ;wsave3      var byte    $1A0    SYSTEM      ' location for W if in bank3
    And the errors are following:
    Code:
    Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z   -p12F635 "TxRx.bas"
    PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc.
    All Rights Reserved. 
    
    ERROR: Unable to fit variable RR2_Save
    ERROR: Unable to fit variable RS1_Save
    ERROR: Unable to fit variable RS2_SaveHalting build on first failure as requested.
    BUILD FAILED: Thu Dec 31 16:29:42 2009
    Thanks

  4. #4
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    OK, did some lookaround for the problem.
    I have also commented in ReEnterPBP.bas the following
    Code:
     '   T3_Save     VAR WORD
     '   T4_Save     VAR WORD
    Now it seems that I am quiet near but one warning message is there still :
    Code:
    Executing: ........"TxRx.bas"
    PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc.
    All Rights Reserved. 
    Warning[206] D:\BACKUP.........TXRX.ASM 752 : Found call to macro in column 1. (INT_CREATE)
    Loaded D:\Backup..................TxRx.COD.
    BUILD SUCCEEDED: Thu Dec 31 16:39:22 2009
    Any advise if I should be bothered about the warning message?

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


    Did you find this post helpful? Yes | No

    Default

    The 12F635 only has 64 bytes SRAM so if you're using DT ints with a PBP int handler you may need to free up some SRAM, and keep your int handler as simple as possible.

    Hard to say without seeing what you're doing.
    Regards,

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

  6. #6
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Hi Bruce, it seems we jumped across each others post at the same time. I have succeeded in building the project but a warning is there.
    Code:
    Warning[206] D:\BACKUP.........TXRX.ASM 752 : Found call to macro in column 1. (INT_CREATE)
    Should I worry about it? Thanks for all the help.


    P.S. Is there any online calculator around which can easily advise me when to expect the interrupt with TMR1 with 1:8 prescaler (4MHz) and also if DT Interrupts work with TMR0 in 12F635?
    Last edited by Megahertz; - 31st December 2009 at 15:54.

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


    Did you find this post helpful? Yes | No

    Default

    Have you tried moving INT_CREATE out of column 1?

    Edit: Look for a copy of Mister Es' calculator. Should be a link in a thread around here somewhere.

    I don't think the calculator is going to help with what works & doesn't with DT ints, but Darrel already
    answered part of your question back in this thread: http://www.picbasic.co.uk/forum/showthread.php?t=12354
    Last edited by Bruce; - 31st December 2009 at 16:05. Reason: Slow down...;o}
    Regards,

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

  8. #8
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by Bruce View Post
    Have you tried moving INT_CREATE out of column 1?
    Column 1 ? What does it mean? Is it putting the ASM code somewhere in the middle of the code? Sorry for my ignorance on this topic.

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


    Did you find this post helpful? Yes | No

    Default

    INT_CREATE in Column 1
    Code:
    ASM
    INT_LIST  macro ; IntSource,     Label,    Type, ResetFlag?
        INT_Handler    RX_INT,  _DoIntStuff,   PBP,  yes
        endm
    INT_CREATE               ; Creates the interrupt processor
    
        INT_ENABLE   RX_INT     ; enable external UART RX interrupts  
    ENDASM
    INT_CREATE not in Column 1
    Code:
    ASM
    INT_LIST  macro ; IntSource,     Label,    Type, ResetFlag?
        INT_Handler    RX_INT,  _DoIntStuff,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    
        INT_ENABLE   RX_INT     ; enable external UART RX interrupts  
    ENDASM
    Regards,

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

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Megahertz View Post
    Column 1 ? What does it mean? Is it putting the ASM code somewhere in the middle of the code? Sorry for my ignorance on this topic.
    Column 1: leftmost column of each line. Asm is picky about where you put things, just start the line with several spaces.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. SERIN timeout
    By Del Tapparo in forum Serial
    Replies: 3
    Last Post: - 20th November 2007, 04:34
  2. SERIN Timeout
    By George in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 23rd March 2007, 15:06
  3. 16F628A Serin timeout and Timer1
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th March 2006, 23:20
  4. SERIN SERIN2 Timeout
    By markedwards in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd June 2005, 18:59
  5. SERIN & Timeout
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th October 2004, 07:33

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