There are various threads on here for direct port manipulation on the Due - have you searched for them?