John Girgenti

Demo board MC9S08DZ60, global declarations

Discussion created by John Girgenti on Jul 9, 2011
Latest reply on Jul 10, 2011 by bigmac

Hi, I am fairly new to the Freescale line of microcontrollers and not too experienced with ANSI C overall.  What I am trying to do on this demo board is to read in 52 bits from a clocked pin.  The data is in ultimatley in 12x 4-bit words.  I can get this running using a array of char[52].  This is obviosly a huge waste of memory.  This array is declared globally so it can be populated in an interrupt triggered by the clock pin, and manipulated in the ProcessorExpert main() into a char array where I can at least handle the 4-bit words.  I can create a boolean array in the ProcessorExpert main(), but if I try it as an extern bool array[] the compiler throws an error (C2450 Expected: ; = ,) I think this would be an ideal way to collect the bits, either that or make up two long structures.  Any sugguestions?


Thanks in advance!