im trying to figure out the relationship between
platform/atmega8/hardware.h
platform/avrmote/avrhardware.h
platform/mica/hardware.h
platform/mica2/hardware.h
platform/mica2dot/hardware.h
does anyone know exactly hwo these files work??
which pins are we referring to in these files??
for eg. in the atmega8's hardware.h, we have:
TOSH_ASSIGN_PIN(INT0, D, 2);i have no idea what these refer to.
TOSH_ASSIGN_PIN(INT1, D, 3);
is this referring to some interrupt on the atmega chip,
or to TP19 and TP20 on the mica2dot (from page 19 of the MPRMIB User Guide).
on the mica2dot's hardware.h we have:
// interrupt assignments
TOSH_ASSIGN_PIN(INT0, D, 0);
TOSH_ASSIGN_PIN(INT1, D, 1);
TOSH_ASSIGN_PIN(INT2, D, 2);
TOSH_ASSIGN_PIN(INT3, D, 3);
I am vaguely aware that mica2 inherits some functionality from mica and avrmote platforms. but i don't know how it does that.
is this defined in the .platform file in "@commonplatforms"??
what i want to do is generate an interrupt on the mica2dot in the following way:
1. assign one bit of INT0 as output. (TP19)
2. assign one bit of INT1 as input. (TP20)
3. connect the two pins with a wire + resistor.
4. send a 1 to INT0.
5. the interrupt handler which is waiting on the particular bit of INT1, gets raised on a high input value.
how do i do this?
i think i can use sbi to set the bit in step 4.
in step 5, my interrupt handler can look like this:
TOSH_INTERRUPT(INT1)how will my program know that the bit on INT1 has become high?
{
cli(); // global interrupt disable
call Leds.redToggle();
sei(); // global interrupt enable
}
and where do i make the pin assignments for input and output
with something like this:
TOSH_MAKE_INT0_OUTPUT;???
TOSH_MAKE_INT1_INPUT;
is there a hpl genius out there??
plz help me out.
thanks in advance,
karan
_______________________________________________ Tinyos-users mailing list [EMAIL PROTECTED] http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
