• AVR Freaks

ADC special event trigger ¿Timer3 or timer 4/5?

Author
fffdddooo
New Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2009/08/21 01:23:21
  • Location: 0
  • Status: offline
2010/12/28 10:19:54 (permalink)
0

ADC special event trigger ¿Timer3 or timer 4/5?

 ADC special event trigger ¿Timer3 or timer 4/5?


Hi!

I'm going to use TMR to trigger ADC periodically.
In the TIMER documentation says  that special event trigger is  generated only by timer 4/5
but in the ADC documentation, AD1CON1 bits  SSRC2..0   says:    010   timer3 compare match ends sampling and start conversion

am I reading something wrong?

thanks in advance


[edited]

i've found that i'm using an outdated ADC PIC24F family reference manual (number 39705a, dated 2006). in wich we can find that:
SSRC2:SSRC0: Conversion Trigger Source Select bits
111 = Internal counter ends sampling and starts conversion (auto convert)
110 = Reserved
10x = Reserved
100 = Reserved
011 = Reserved
010 = Timer3 compare match ends sampling and starts conversion
001 = Active transition on INT0 pin ends sampling and starts conversion
000 = Clearing SAMP bit ends sampling and starts conversion


but the latest doc is 39705b dated 2009, in wich we can find that:
SSRC<2:0>: Conversion Trigger Source Select bits (event ends sampling and starts conversion)
111 = Internal counter (auto-convert)
110 = CTMU event (when not implemented as ‘100’)(1)
101 = Reserved
100 = CTMU event(1)
011 = Timer5 compare match(1,2)
010 = Timer3 compare match(2)
001 = Active transition on INT0 pin (basic sync convert)
000 = Clearing SAMP bit (full program control)


I'm still in doubt because in section 14 (timer), the latest document says that ADC event trigger is available only in timer 4/5,but this doc although is the latest is dated 2006, so I guess   it may have changed.
I will try and i will report here
#1

5 Replies Related Threads

    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re: ADC special event trigger ¿Timer3 or timer 4/5? 2010/12/28 11:57:23 (permalink)
    0
    see also
    http://www.microchip.com/...26&mpage=1#msgNum1

    which PIC, by the way?

    GENOVA :D :D ! GODO
    #2
    fffdddooo
    New Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2009/08/21 01:23:21
    • Location: 0
    • Status: offline
    Re: ADC special event trigger ¿Timer3 or timer 4/5? 2010/12/28 16:36:51 (permalink)
    0
    DarioG

    see also
    http://www.microchip.com/...26&mpage=1#msgNum1

    which PIC, by the way?


    yes I'm sorry, I posted It in the 16 bit-core by error, then I noticed I've made an error but I can't remove the thread so I edited it and said I moved it here

    The PIC is 24FJ128GA010
    I'm trying with timer 5 and the match of TMR5 with PR5 sets T5IF but doesn't trigger ADC conversion.

    #3
    HJonker
    Super Member
    • Total Posts : 489
    • Reward points : 0
    • Joined: 2006/04/19 02:17:59
    • Location: NL
    • Status: offline
    Re:ADC special event trigger ¿Timer3 or timer 4/5? 2010/12/28 23:58:26 (permalink)
    0
    fffdddooo

     ADC special event trigger ¿Timer3 or timer 4/5?


    Hi!

    I'm going to use TMR to trigger ADC periodically.
    In the TIMER documentation says  that special event trigger is  generated only by timer 4/5
    but in the ADC documentation, AD1CON1 bits  SSRC2..0   says:    010   timer3 compare match ends sampling and start conversion

    am I reading something wrong?

    thanks in advance


    [edited]

    i've found that i'm using an outdated ADC PIC24F family reference manual (number 39705a, dated 2006). in wich we can find that:
    SSRC2:SSRC0: Conversion Trigger Source Select bits
    111 = Internal counter ends sampling and starts conversion (auto convert)
    110 = Reserved
    10x = Reserved
    100 = Reserved
    011 = Reserved
    010 = Timer3 compare match ends sampling and starts conversion
    001 = Active transition on INT0 pin ends sampling and starts conversion
    000 = Clearing SAMP bit ends sampling and starts conversion


    but the latest doc is 39705b dated 2009, in wich we can find that:
    SSRC<2:0>: Conversion Trigger Source Select bits (event ends sampling and starts conversion)
    111 = Internal counter (auto-convert)
    110 = CTMU event (when not implemented as ‘100’)(1)
    101 = Reserved
    100 = CTMU event(1)
    011 = Timer5 compare match(1,2)
    010 = Timer3 compare match(2)
    001 = Active transition on INT0 pin (basic sync convert)
    000 = Clearing SAMP bit (full program control)


    I'm still in doubt because in section 14 (timer), the latest document says that ADC event trigger is available only in timer 4/5,but this doc although is the latest is dated 2006, so I guess   it may have changed.
    I will try and i will report here


    ADC1 : Timer 2/3
    ADC2 (When available): Timer 4/5



    Kind Regards,
    Hans Jonker
    (Amsterdam, Holland)
    #4
    fffdddooo
    New Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2009/08/21 01:23:21
    • Location: 0
    • Status: offline
    Re:ADC special event trigger ¿Timer3 or timer 4/5? 2010/12/29 04:58:35 (permalink)
    0
    fine, it works with tmr3, using ADCON1bits.SSRC=0b010;
    curiously, everywhere in microchip documentation (PIC24F Family reference manual for timers  an PIC24FJ128GA010 Family datasheet) says that special even trigger is only available for timer 4/5

    thank you very much

    #5
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:ADC special event trigger ¿Timer3 or timer 4/5? 2010/12/29 05:28:20 (permalink)
    0
    Thank you both for clarifying

    GENOVA :D :D ! GODO
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5