0
\$\begingroup\$

Page 166 of datasheet of atmega328 shows the use of a register called DDR_XCK.

When using synchronous mode (UMSELn = 1), the Data Direction Register
for the XCKn pin (DDR_XCKn) controls whether the clock source is internal (Master mode) or
external (Slave mode). The XCKn pin is only active when using synchronous mode. 

No sign of it in the io.h file associated with the atmega328, nor in the register summary section. Where I can find infos about it ?

\$\endgroup\$
1
  • \$\begingroup\$ PD4 in atmega328 is XCK pin. So the Data Direction Register for the XCKn (PD4) pin is DDRD register. \$\endgroup\$
    – G36
    Sep 22 at 6:09

1 Answer 1

1
\$\begingroup\$

Section 13.2, There you have the data direction registers for every port, just choose the register and bit that matches your clock pin (XCKn)

it's definitely not written in the most clear way

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.