Go Down

Topic: port initialization (Read 1 time) previous topic - next topic


hi guys.. im a new user of arduino.. i just want to ask if i can initialize a port?

int portLED = PORTD;
void setup ()
 portMode(portLED, OUTPUT);

void loop()

im trying to compile the code above but i shows some error message  :'(.. i hope you can help me guys.. thank you so much..


Aug 12, 2008, 06:54 am Last Edit: Aug 12, 2008, 06:55 am by mem Reason: 1
There is no arduino command in the form you tried that will write all bits to a port at once. If you need to do this you can use the low level functions for direct port IO. The reference page on port manipulation is a good place to start: http://www.arduino.cc/en/Reference/PortManipulation


ok sir... i'l try it.. thank you so much!  ;D


Aug 12, 2008, 07:11 am Last Edit: Aug 12, 2008, 07:12 am by mem Reason: 1
Oh, I forgot to mention that there is a link to a good tutorial on bitwise math on that page, its well worth reading this if you need help on working with code that operates on some but not all bits.

Have fun!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131