2008-04-13 07:52 PM
2011-05-17 12:51 AM
I'm trying to write a simple program just to blink the LED.
From Str9com Demo I can see: C:\Program Files\Hitex\HiTOP52-STR9-comStick\Examples\STR9\Hitex-STR912\GNU\UART\Source\main.c /* Turn OFF leds connected to P9.0, P9.1 pins */ GPIO_WriteBit(GPIO8, GPIO_Pin_0, Bit_SET); /* Insert delay */ Delay(0x1FFFF); /* Turn ON leds connected to P9.0, P9.1 pins */ GPIO_WriteBit(GPIO8, GPIO_Pin_0, Bit_RESET); Though the comment contradicts the code, I tried both. Neither work. How does the LED connect? To which pin and pull/push or open collector? Better there's a schematics. Thanks, Howard2011-05-17 12:51 AM
Hello,
I don't have a comStick but rather a MCBSTR9. I tried to use GPIO_WriteBit but it does not work; still have not investigated why. Use GPIO_Write instead :Code:
GPIO_Write(GPIO8, GPIO_Read(GPIO8) | 0x1) ;
andCode:
GPIO_Write(GPIO8, GPIO_Read(GPIO8) & 0xFE) ;
[ This message was edited by: michael.tamir on 14-04-2008 08:23 ]