DT Ints on 18F (First time user problem)


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    I count two whiles but one wend

    Code:
    WHILE 1
    A:		' CHECK IF MODEM IS WORKING OK AND SET ECHO OFF
    			HSEROUT2 ["SENDING AT",13,10]
    			HSEROUT ["AT",13,10]
    			GoSub GetResponse			
    
    			HSEROUT ["ATE0",13,10]
    			GoSub GetResponse	
    			HSEROUT2 ["ATE0 RESULT=OK",STR MESS\500,13,10]
    
    WHILE 1
    			HSEROUT2 ["SEND COMMAND",13,10]
    			HSERIN2 [STR MESS\500\13]
    			HSEROUT2 ["SENDING-",STR MESS,13,10]
    			HSEROUT [STR MESS,13,10]
    			GoSub GetResponse
    WEND

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    ;WHILE 1
    A: ' CHECK IF MODEM IS WORKING OK AND SET ECHO OFF
    HSEROUT2 ["SENDING AT",13,10]
    HSEROUT ["AT",13,10]
    GoSub GetResponse

    HSEROUT ["ATE0",13,10]
    GoSub GetResponse
    HSEROUT2 ["ATE0 RESULT=OK",STR MESS\500,13,10]

    WHILE 1
    HSEROUT2 ["SEND COMMAND",13,10]
    HSERIN2 [STR MESS\500\13]
    HSEROUT2 ["SENDING-",STR MESS,13,10]
    HSEROUT [STR MESS,13,10]
    GoSub GetResponse
    WEND
    Ignore the first While1 please.
    ___________________
    WHY things get boring when they work just fine?

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    As I said, commenting out any of the WHILE 1 statements makes it compile just fine for the 18LF45K22 at my end - with or without the ReEnterPBP-18LP.bas file included.
    What version of MPASM are you using? (I'm using 5.45)

    /Henrik.

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    not sure its a good practice to use hersin and hserout in an isr either
    b_c var word ; buffer count
    PIE3.5 I ASSUME IS RXINT ENABLE OR use
    @ INT_ENABLE RX1_INT


    GetData:

    mess[B_C]=RCREG
    if ( b_c > 499) OR ( MESS[B_C]=10) then
    bity=1
    PIE3.5=0 ; BUFFER FULL TAKE NO MORE or @ INT_DISABLE RX1_INT

    ENDIF
    B_C=B_C+1


    @ INT_RETURN


    PIE3.5=0 might be wrong the example I was drawing from uses two euarts
    Last edited by richard; - 24th March 2015 at 11:34. Reason: typo

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    I am using PBP3 with MPLAB v8.90.

    @Richard - Tried taking everything out of the ISR except Bity=1. Problem stays the same.
    ___________________
    WHY things get boring when they work just fine?

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    I concur with henrik it compiles for me with the bogus while removed

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    Would it be possible if one of you guys can upload your copy of DT INT and REEnter. I will try compiling with them. It compiles fine if I remove the Interrupts!
    ___________________
    WHY things get boring when they work just fine?

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    Yup, you want to keep the isr as short as possible; set only the flag.

    Then, back in main, check the flag, do the hser, then reset flag.

    Also, try adding a label to the main loop and a goto at the bottom.

    Robert

  9. #9


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    Thanks Demon, this is just a trial program and I wanted to set the PIC up properly before arranging the code nicely with labels etc.
    ___________________
    WHY things get boring when they work just fine?

  10. #10
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    I can't guarantee I have not fiddled with these but here they are
    Attached Files Attached Files
    Last edited by richard; - 24th March 2015 at 12:00. Reason: still can't tuype

  11. #11


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    Nops the same error still exists.
    BTW if its not too much to ask, can you also upload the compiled HEX file so I can get some results in the mean time someone helps to resolve the problem.
    ___________________
    WHY things get boring when they work just fine?

  12. #12
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: DT Ints on 18F (First time user problem)

    rename it back to . hex
    Attached Files Attached Files

Similar Threads

  1. User Position, Velocity & Time II (D1h)
    By dj.lambert in forum GPS
    Replies: 2
    Last Post: - 31st July 2009, 09:21
  2. Problem with Dt Ints Interrupts
    By Quin in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th July 2008, 19:21
  3. Some initial help for a first time PBP user
    By jtburnham in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th April 2006, 07:32
  4. First time with 18F pic...
    By gabrielg74 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th December 2005, 07:04
  5. need help first time user of picmicro
    By tekdavid in forum mel PIC BASIC
    Replies: 2
    Last Post: - 29th March 2005, 04:39

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