Only (1) DEBUG works


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84

    Default Only (1) DEBUG works

    Any ideas as to why only the latter debug is successfully received when (2) are sent as follows:

    start:
    Pause 100

    DEFINE DEBUG_REG PORTA
    DEFINE DEBUG_BIT 0
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUG_MODE 1
    Debug "A",#w2

    Pause 100

    DEFINE DEBUG_REG PORTB
    DEFINE DEBUG_BIT 7
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUG_MODE 1
    Debug "A",#w2
    GoTo start

    My In as follows:

    DEFINE DEBUGIN_REG PORTB
    DEFINE DEBUGIN_BIT 0
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUGIN_MODE 1
    DebugIn [wait ("A"),#w2]

    I added pauses to see if it helped, and changed the order of Port pins used but the last Debug (of any 2 used) is the only one that is viewable on a Serout LCD.
    James

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


    Did you find this post helpful? Yes | No

    Default

    it's only because you can't redefine the DEBUG settings. Use SEROUT, SEROUT2 instead
    Steve

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

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    droptail, the second instance is the only one that gets compiled as the first instance gets re-defined at compile time. The way PBP works is that you can only have 1 defined set of DEBUG parameters. That is why the second set of instructions works and not the first.

    Dave Purola,
    N8NTA

  4. #4
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    I see. I had worked on SERIN/OUT for a few days and couldn't get it to work. It is working now. Need I pause between these statements or just run them together. There seems to be a long time to go from master PIC to slave then to display on an LCD.

    master:
    SerOut2 PORTA.0,N2400,["A",w2]
    SerOut2 PORTB.6,N2400,["A",w2]
    SerOut2 PORTB.7,N2400,["A",w2]

    slave:
    SerIn2 PORTB.0,N2400,[wait ("A"),w2]
    Gosub LCD
    SerOut PORTA.3,N2400,[12,27,"F",65,#w3," ",#w2]

    One other thing, what is compile timeout (ver 2.40)?
    James

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    droptail, I am unfamiliar with the term "compiler timeout". What do you mean?
    If you are talking about the time that is required for the compile process it varies depending on the size of the program. The longer the program the longer the compile process.

    Dave Purola,
    N8NTA

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


    Did you find this post helpful? Yes | No

    Default

    i guess it's the SERIN timeout.

    Here's a quote of the PBP manual
    An optional Timeout and Label may be included to allow the program to continue if a character is not received within a certain amount of time. Timeout is specified in units of 1 millisecond.
    Steve

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

  7. #7
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Its a PBP window that pops up after programming 6 - 10 times, and won't compile, just says "compiler timeout..." as if its waiting for something, long after the normal few secs it takes to compile. I close the file or program and re-pull it up to continue working.
    James

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14: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