AnsweredAssumed Answered

Wait() command using code warrior 3.1 SE

Question asked by Kris Shankar on May 25, 2006
Latest reply on May 25, 2006 by David Payne
Hi im Kris im a University student, quick background on my hardware. Im using the 13192 SARD development kit (GT60 MCU).

Just to familiarise myself with the chip and its functionality i have been attempting to write some code to turn the leds on then off in sequential order. I

n the codewarrior help there is a wait() command( wait(2000) = wait seconds) but im unsure what header file it requires (anyone know?)

Currently just for testing i use a delay function

void main(void) {
/*intialise hardware code is here*/
for(;:smileywink:{
_RESET_WATCHDOG()
if (PUSH_BUTTON1==PRESSED){
LED1=LED_ON; delay(500);
LED1=LED_OFF; delay(500);
LED2=LED_ON;
/*same code till led 4 */
}
}
}
void delay(long int count){
long int i;
for (i=0;i

The code synatax is wrong because after i posted the code some formatiing option deleted stuff so ignore obvious mistakes in code.


Assuming I/O ports have been set in the header file(which they have) for some reason when i hold down PUSHBUTTON1 only LED1 flashes the rest dont even light up.

Any ideas why?

Thanks in advance

Regards Kris

Outcomes