Ports on the Due?

Glad you got it sorted...

By the way, if you're doing this because you're beginning learning a more powerful IDE such as Atmel Studio, then the Atmel Software Framework (ASF) has functions built in that behave like DigitalWrite do in the Arduino core.