Skip to main content
fan
Associate
April 14, 2008
Question

str9comstick blink LED?

  • April 14, 2008
  • 2 replies
  • 770 views
Posted on April 14, 2008 at 04:52

str9comstick blink LED?

This topic has been closed for replies.

2 replies

michael
Associate III
May 17, 2011
Posted on May 17, 2011 at 09:51

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) ;

and

Code:

GPIO_Write(GPIO8, GPIO_Read(GPIO8) & 0xFE) ;

[ This message was edited by: michael.tamir on 14-04-2008 08:23 ]

fan
fanAuthor
Associate
May 17, 2011
Posted on May 17, 2011 at 09:51

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,

Howard