Dan Doss

9S08QG - Can't get ports to configure properly

Discussion created by Dan Doss on Feb 27, 2008
Latest reply on Feb 27, 2008 by Dan Doss
Hello group,

I'm just getting started with CW and am trying to setup the port I/O on a 9S08QG4. I must be missing something really silly because the ports are not changing from their input defaults. Here's what I'm doing in the code:

#include <hidef.h>
#include <MC9S08QG8.h>


PTAD_PTAD0 = 0;           //set PTA0 LO
PTADD_PTADD0 = 1;    //set PTA0 as an output
PTADS_PTADS0 = 1;   //set PTA0 to High Drive Strength

This should set PTA0 as an output with a logic '0'.

What am I missing?

Thanks in advance.