Any controller pin can be used as an input or output. Some also have other functions, like ADCs. To use a pin as a digital output, here's my message from some ages ago:
> ... in T1 TOSH_SET_##pin##_PIN > is a macro generated macro so you will never find it in the > source. I unearthed the location of the meta-macro once and > have even posted messages about it in the past so you may > be able to search it on the list. The basic paradigm is to: > > TOSH_ASSIGN some port,pin to an arbitrary name: > TOSH_ASSIGN_PIN(name, B, 5); // name,port,pin -- B5 ... then > TOSH_MAKE_name_OUTPUT() // or input ... then > TOSH_SET_name_PIN // or _CLR_ > > You should be able to find usage examples by searching on > the first two words of any of the macros. Also search for the ATMEGA 128 controller manual and be prepared for many long nights of study... MS Kalin Trifonov wrote: > Greetings, > My name is Kalin Trifonov. I am a student in Waseda University in Tokyo, > Japan and have recently bought some MICAz motes from Crossbow Japan. I > made an inquiry with Crossbow and they advised me to email the TinyOS > community for assistance. > Here is my problem: > I need to use 4 outputs and as far as I can understand from the manual > the only available outputs seem to be INT0,1,2,3. The ADC's and PW's are > only inputs. Is this correct? I was searching on-line, but could not > find how to send data on any of the ports. INT, ADC or PW. I could only > find how to send over radio, or to the LEDs, but not to the outputs. > Please let me know where I can find some information on that matter. I > need to output a signal to a motor driver to control a DC motor. > I would appreciate any help you can give me. > Thank You very much. > Sincerely, > > Kalin Trifonov > e-mail 1: [EMAIL PROTECTED] > e-mail 2: [EMAIL PROTECTED] > e-mail 3: [EMAIL PROTECTED] > tel.: +81 80 5388-7262 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
