Hi everyone,

I'm trying to use Timer1 as a timer for my manchester encoder on my node which is based on the mica2. I am using HPLTimer1M.nc from the micaz and have modified it slightly for my application. Basically, the timer acts as a the clock for the SPI which outputs the manchester encoded bytes to the radio chip. I have found that it works fine at 9600bps, but when I try 19200bps it works for about 17 bytes and then the timer just cuts out. I am operating the timer in CTC (clear timer on compare) mode. I am using pin OC1C for output. The prescaler for the timer is set to /8, so the interval is set to 11 to get the correct output frequency.

I'm not sure where it's going wrong. My program is a very basic test program that basically starts the transceiver and then justs starts transmitting bytes which are manchester encoded before they are sent over the SPI. There is nowhere in my code that resets the clock, so perhaps the OS is doing something? I'm kind of stuck on what to check. I was thinking that maybe the manchester encoder cannot keep up, but I'm not sure how to check.

Does anyone have any ideas what might be causing the problem or anything I can check to work out where it's going wrong? I have a MIB510 and a JTAGICEII that I have been using with ice-gdb. Also, does anyone know how to check the registers of the MCU using ice-gdb?

Thanks,

Simon
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to