DT Instant Interrupt and Bootloader


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: DT Instant Interrupt and Bootloader

    You must disable int before entering bootloader. And to exit from bootloader just execute @ RESET, and you are back on ORG 0, and your main program will setup interrupts again, same way as it setup when device is power on.
    Just keep in mind that you have some data in RAM from bootloader, so putting CLEAR in your main program is good idea.

  2. #2
    Join Date
    Aug 2006
    Location
    Italy
    Posts
    72


    Did you find this post helpful? Yes | No

    Default Re: DT Instant Interrupt and Bootloader

    Hi pedja089,
    I did the whole process EXACTLY as you described.
    The things I've missed was to disable the interrupt before go to the bootloader.
    Probably, the reason why I did not disabled it, is because I thought that since the "@ goto xxxx" happen BEFORE any "@ INT_ENABLE TMR1_INT", this was enough to avoid the interrupt handler.
    Seems that is needed to call "@ INT_DISABLE TMR1_INT" even if is not specifically enabled before. Doing that... IT WORKS!
    Thank you.

    So, here is the trick:
    Code:
         READ 836,x
         if x = 1 then      'There is a firmware update available
            SEROUT2 PORTD.4,6,[13,10,"Update process start...",13,10]
    @ INT_DISABLE TMR1_INT
    @ INT_DISABLE RX_INT
            INTCON.7 = 0    'Disable Global Interrupt
            INTCON.6 = 0
            PIE1.5 = 0      'Disable USART RX Interrupt
            T1CON.0 = 0     'Disable Timer1
    @ goto 0x17680          'This is where my bootloader start
         endif
    Thank you again for the suggestions.

  3. #3
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: DT Instant Interrupt and Bootloader

    I'm glad that I could help.
    Also keep in mind that when you enter bootloader your registers are not in reset state. So I always disable interrupt and timers in bootloader.

Similar Threads

  1. Instant Interrupt and USART
    By sirvo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd July 2008, 03:08
  2. DT Instant Interrupt counting
    By jderson in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th March 2008, 22:47
  3. Usart with Darrel Instant Interrupt
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th February 2008, 00:09
  4. Bootloader and Instant Interrupts Atn:_DT_
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th May 2007, 01:59
  5. Instant Interrupt Error
    By cool_justin in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th June 2006, 23:40

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts