ben kazimier

MC9S12C32 using codewarrior and P&E bdm debug module

Discussion created by ben kazimier on Sep 11, 2007
Latest reply on Sep 22, 2007 by ben kazimier
Can someone please tell me why PortA when used as an output produces a square wave? I tried redefining the port and each time I turn an output on I get what looks like a clock signal.  Code shown below:
#include <hidef.h>      /* common defines and macros */
#include <mc9s12c32.h>     /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12c32"
#define PORTAA (*(volatile unsigned char*) (0x00))
#define DDRAA (*(volatile unsigned char*) (0x02))
void main(void) {
PORTAA= 0x01;
PORTAA= 0x00;