Hi Sofia!

On Thu, Jan 27, 2011 at 4:25 PM, sofia aparicio
<[email protected]> wrote:
> Hello,
>
>  > Seems ok, but not sure how you access those pins. How did you verified
>> that your code does not work? You cannot be sure that these pins are
>> available on the 51-pins.
>
> I am using a MDA100 sensor board connected to my IRIS mote. I can see the
> signals in OC3A, OC3B and OC3C using an oscilloscope. You can see the pines
> in the 51-pin connector of the IRIS mote.

Ok. You should try to enable the interrupts and toggle LEDs just to be
sure that the problem is not a 51-pin connector wirings. As far as I
know, OC3A = PE3 = PIN26, OC3B = PE4 = PIN6, OC3C = PE5 = PIN5.

>> > TCCR3A=0x57;
>>
>> COM3A = 1: toggle pin on compare match
>> COM3B = 1: toggle pin on compare match
>> COM3C = 2: clear pin on compare match
>> WGM3:10 = 1
>> > TCCR3B=0x19;
>>
>> ICNC3 = 0: input capture noise canceler disabled
>> ICES1 = 0: input capture falling edge
>> CS3 = 1: clock running with no prescaling
>> WGM3:32 = 3, therefore WGM3 = 0xD: reserved.
>
> This is not OK COM3C=1: toggle pin on compare match.
> WGM3=0x0F; Fast PWM mode with OC3A as TOP value.

Oh, you are right, I was tired apparently.

> I think that the configuration is OK. Can I use this Fast PWM and to use the
> tree output compares?
> Or do I need to use the CTC mode?

Ok, now since you are using Fast PWM (I thought that you used CTC),
then Table 17-4 of the datasheet says that COM3X = 1 means that OC1A
toggles the pin but OC1B and OC1C are disconnected! You might want to
use another mode of operation (WGM or COM).

>> By the way, the Atmega1281 has timer 4 and 5 as well! If possible, I
>> suggest you to use Timer/Counter 4 or 5, as no other code uses that
>> (Timer3 was used instead of Timer1 on the MicaZ and Mica2 motes ,so
>> there could be codes that uses that)
>
> I did not know, but the problem is that I do not have these pines available
> in the MDA sensor board (or in the IRIS connector).

Yup.

Best,
Miklis

>
> Thank you very much.
>
> Sofia
>
>

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

Reply via email to