Hi Adonis,
External bus is 2nd Functionality (See Table 1-9. Pin-Out Summary).
When pins are not used with the any of alternative functions, these pins can be used as general purpose I/O.
So, you can use Port C/D as GPIO until you enable XEBI module. XEBI module could be used (is enabled) only in expended or emulated modes.
So, if you will use your MCU in normal or special single chip mode (MODA=MODB=0), you can use Port C/D only as GPIO.
For direction of port C/D, please use DDRC/DDRD registers. You can read/write value trough PORTC/PORTD registers.
Unfortunately ports C and D do not provide such high flexibility as other ports. You can just enable pull-ups (pull-down is not possible) and these pull-ups could be enabled only for whole port (we cannot choose which pins will have pull-ups). For more details, please check PUCR register.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------