johnie,

please read my response again. if you have an anex board, you should be able to use the interruptable SER0_CTS pin for what you're trying to do.

finding an example (there are many) in tinyos source code of how to set up a pin, then to wire and use an interrupt handler on it is an exercise for the reader (that's you).

good luck,

steve

On 05/22/2012 02:07 PM, Johnie Z wrote:
Hi Steve,
    Yeah, you are right, we don't use ADC now.
    We try that also without any result, the thing I'm thinking about is
that maybe we are lack of some TOSH function definations, I try to find
TOSH_SEL_PROG_IN_IOFUNC() in:
http://code.google.com/p/tinyos-main/source/checkout
    We found it, but we can not find TOSH_MAKE_PROG_IN_INPUT() in the
same file or anywhere, so I'm confusing about that, where this TOSH
setting should be in the code tree, but the compiler did not give any
error about our invoking on that..Do you have any idea about that?

Best Regards,
Johnie

2012/5/22 steve ayer <[email protected] <mailto:[email protected]>>

    hi johnie,

    [copying the list]

    so, you don't want to measure the signal, you just want to know when
    it happens.  i see.  right, you don't want to do analog-digital
    conversion.

    the analog expansion (AnEx) board i suggested is the "external" one.
    you can use ser0_cts, clearly marked "CTS" on the anex.

    -steve


    On 05/22/2012 01:04 PM, Johnie Z wrote:

        Hi Steve,

            Thank you for your reply, these days, we found maybe using GPIO
        interrupt is a better way for our demand, the signal changing we
        want to
        capture is just a low-to-high or high-to-low edge, we also found
        it's
        quite similar to the situation in one mail also answered by you:
        
http://www.mail-archive.com/[email protected].__edu/msg00309.html
        
<http://www.mail-archive.com/[email protected]/msg00309.html>
            But we are using the external expansion board offered by the
        shimmer
        company not the internal one:
        
http://www.shimmer-research.__com/p/products/sensor-units-__and-modules/expansion-board
        
<http://www.shimmer-research.com/p/products/sensor-units-and-modules/expansion-board>

            We try to use GPIO10 on MSP430 but it's used by the button,
        we also
        tried exactly the same way recommended by you mentioned in the mail,
        it's that we could use BSL_RX, but it's not useful, according to the
        manual, we think maybe the BSL_RX could be used as GPIO only on
        internal
        expansion board maybe. We also try to find the SER0_RTS on the
        board,
        but not find it.
            Do we have any other choice on using GPIO interrupt by using the
        external expansion board?

        Best regards,
        Johnie

        2012/5/18 steve ayer <[email protected]
        <mailto:[email protected]> <mailto:[email protected]
        <mailto:[email protected]>>>


            hi johnie,

            you should take a look at the msp430 user manual, chapter 17, to
            read about configuring sampling; i'm not sure if the default
        mode
            will work for your app.  doc is ti name slau049f.pdf, iirc.

            you should also examine
            tos/platforms/shimmer/____shimmerAnalogSetupP.nc and its
        component

            wiring file to understand where and how to make mods that may
            accommodate your requirements.

            i can't tell you the best way to go about this, but i'll make a
            couple of suggestions:  use the fastclock module (just wire
        it to
            softwareinit) in your app to give you a much faster, cleaner
        smclk,
            which the adc module uses for a sample clock; you'll need a
        scope to
            validate whatever result you're seeing; and, you should use the
            analog expansion board to make it easy to look at the signal
        that
            you're sampling.

            finally, to answer your question, the adc module interrupts
        when a
            conversion is complete.  the default configuration in
            shimmeranalogsetup uses the dma module to gobble this
        interrupt, as
            it's typically running a sequence of conversions and so the
        app just
            gets one interrupt when all is complete and in local memory.

            i hope that this helps,

            steve


            On 05/18/2012 07:11 AM, Johnie Z wrote:

                Hi all,
                    I'm trying to read some signal using ADC, but the signal
                will last
                for very short term, 0.0002sec. How can I read it, is
        there any
                interrupt in TinyOS we can use to get this work?

                Regards,
                Johnie


                ___________________________________________________
                Shimmer-users mailing list
        [email protected]
        <mailto:[email protected]>
        <mailto:Shimmer-users@eecs.__harvard.edu
        <mailto:[email protected]>>
        https://lists.eecs.harvard.____edu/mailman/listinfo/shimmer-____users
        <https://lists.eecs.harvard.__edu/mailman/listinfo/shimmer-__users
        <https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users>>



_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to