Effect of DT_INT14 on Serin2 or DebugIn


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Effect of DT_INT14 on Serin2 or DebugIn

    Just resurrecting this. I'm using an 18F2620/80 chip.

    Let's assume I must use serin2 and serout2 for some serial stuff so can't use DT interrupts to create a timer.

    How can I implement a 100ms or 1S tick timer with the above restriction?

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Effect of DT_INT14 on Serin2 or DebugIn

    • ...so can't use DT interrupts to create a timer.


    I guess this is a good place to start. Why not? You can use DT_INTs with every single Interrupt your PIC is capable, and all at the same time. You can have a Timer Interrupt and also multiple UART Interrupt Handlers, all with DT_INTs.

    If you haven't already, read the book a few members assembled as a tutorial on DT_INTs:

    http://dt.picbasic.co.uk/Site/Introduction

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Effect of DT_INT14 on Serin2 or DebugIn

    My understanding is Interrupts interrupt software based serial routines like Serin2 and break them..
    Have I missed something? I can't use hardware serial in this application due to pinout constraints.

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


    Did you find this post helpful? Yes | No

    Default Re: Effect of DT_INT14 on Serin2 or DebugIn

    My understanding is Interrupts interrupt software based serial routines like Serin2 and break them..
    Have I missed something? I can't use hardware serial in this application due to pinout constraints
    no , thats pretty right any software timed function is compromised

    if you use an asm timer interrupt to set a flag to be processed in main code when needed and your serial baud rate is not too high
    you may get away with it. i would use define int rather than dt ints to minimise overheads

    another option is to disable the int when serial transactions are being carried out

    better still use a modern chip like k42 series with peripheral pin management , nearly any pin can be any function
    and they have 2 esuarts

    this ticker , what sort of range does it need , i tend to use a 4mS timer counting a 16 bit counter , allows me to measure
    65535x4mS periods a 4 minute-ish rollover
    Warning I'm not a teacher

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