Hi
I have very simple question. I try write program: When i push the button, led light.
I tried this but isn't work.
void main(void){ PE_low_level_init(); for(;;) { if(SW_GetVal()=1) { LED_SetVal(); } } }
Led component is configurated as Output:
SW component is configurated as Input
I have TWR-MCF51CN(MCU=> MC51CN128)
PS. I don't want to use interrupts. I want use only methods GPIO!
Please help me...
Hi Problem_with_driver,
Best to look at the Freescale MQX 3.6\mqx\examples\gpio\cwmcu63\gpio_twrmcf51cn.mcp project. It does all of this and more.
The \mqx\examples has a wealth of really good short examples.
Regards,
David