Kevin Huffman

Using Port A as a general purpose output - MC9S12C32 controller

Discussion created by Kevin Huffman on May 28, 2008
Latest reply on May 29, 2008 by Daniel Lundin
This should be really simple, but I'm stuck.  I want to use a bit on Port A to drive a chip select line on a peripheral chip.  The problem is I don't appear to be toggling the Port A pin.  My test code snippet is very simple:
DDRA = 0xff;
PTAD = 0x00;
PTAD = 0xff;
I verified the routine with Port T and it works fine.  I'm looking at the output of Port A with a meter and seeing no state change.  I'm assuming that Port A can drive the line high (without a pull-up resistor).  The chip is on an ElMicro CHIPS12 carrier board and I'm using the Imagecraft V6 compiler.  Any ideas on what's going on???

Message Edited by KH@SRNL on 2008-05-28 09:04 PM