[Tinyos-help] reading whole port in Mica 2

Caloy Diaz caloykoy_one at yahoo.com
Wed Aug 8 17:01:29 PDT 2007


Thank you so much Ravi and Michael, I will be trying out both of your suggestions :)

Thanks!

- Caloy

"There's an example of reading PortC in:
    http://www.etantdonnes.com/Motes/AVR128timers.zip
MS"

"O.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = "us"; YAHOO.Shortcuts.lang = "us"; YAHOO.Shortcuts.document_id = 0; YAHOO.Shortcuts.document_type = ""; YAHOO.Shortcuts.document_title = ""; YAHOO.Shortcuts.document_publish_date = ""; YAHOO.Shortcuts.document_author = ""; YAHOO.Shortcuts.annotationSet = { "lw_1186617521_0": { "text": "Tinyos-help at Millennium.Berkeley.EDU", "extended": 0, "startchar": 1121, "endchar": 1155, "start": 1121, "end": 1155, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/instance/identifier/email_address"], "category": ["IDENTIFIER"] ,"context": " Tinyos-help mailing list   Tinyos-help at Millennium.Berkeley.EDU   https://mail.millennium.berkeley.edu/cgi-bin/m"}, "lw_1186617521_1": { "text": "https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help", "extended": 0, "startchar": 1162, "endchar": 1234, "start": 1162, "end": 1234, "extendedFrom": "", "weight": 1, "type":
 ["shortcuts:/us/instance/identifier/URL"], "category": ["IDENTIFIER"] ,"context": " list   Tinyos-help at Millennium.Berkeley.EDU   https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help"}, "lw_1186617521_2": { "text": "http://autos.yahoo.com/green_center/", "extended": 0, "startchar": 1438, "endchar": 1473, "start": 1438, "end": 1473, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/instance/identifier/URL"], "category": ["IDENTIFIER"] ,"context": " vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/"} };  YAHOO.Shortcuts.overlaySpaceId = "97546169";  YAHOO.Shortcuts.hostSpaceId = "97546168"; Hi,

You can directly use a port name as a varible.
avr-gcc provides this abstraction.

example:
for reading port A use PORTA

uint8_t x = PORTA;

this will assign the 8 bits os port A into varible x.

Similarly you can write to ports

PORTB = 0xFE;

Regards
Ravi"



       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070808/c3b6b845/attachment.htm


More information about the Tinyos-help mailing list