Hello,

I know the snippet of code below in Tinyos 1.x /tos/platform/atm1281/HPLADCM.nc 
is marked for being registered as an interrupt.  I'm trying to understand how 
the software knows to run this piece of code when the ADC Conversion is 
complete.  The ADC part of SIG_ADC is listed in the Atmel 1281 datasheet (pg 
106) as the name of the interrupt vector that signals a conversion is complete, 
however, when I search source code info on the TWI interrupt vector, there is 
no SIG_TWI in the nesc code, but instead SIG_2WIRE_SERIAL, and nothing to map 
2WIRE_SERIAL to TWI.

So how does TOSH_SIGNAL(SIG_ADC) get associated with the ADC conversion 
complete interrupt vector?  Which file has this information?  I'm just teaching 
myself by walking through sample code.

  TOSH_SIGNAL(SIG_ADC) {
    uint16_t data = inw(ADCL);
    data &= 0x3ff;
    sbi(ADCSRA, ADIF);
    cbi(ADCSRA, ADEN);
    __nesc_enable_interrupt();
    signal ADC.dataReady(data);
  }

[cid:[email protected]]


James Millar
Design Engineer, Embedded Systems Group
CMC Microsystems / CMC Microsystèmes
Innovation Park at Queen's University
945 Princess Street, B50
Kingston, Ontario  Canada   K7L 3N6
Tel/Tél:  (613) 530-4673    Fax: (613) 548-8104
E-mail/Courriel: [email protected]
Web: http://www.cmc.ca/




<<inline: image001.gif>>

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to