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:
- -Pin for I/O =>PTE3_KBI2P3_TPM1CH0
- -autoslected pull-up
- -push-pull
- -Direction =>Output
SW component is configurated as Input
- -Pin for I/O =>PTE5_KBI2P5_IRQ_TPM1CH2
- -autoslected pull-up
- -push-pull
- -Direction => Input
I have TWR-MCF51CN(MCU=> MC51CN128)
PS. I don't want to use interrupts. I want use only methods GPIO!
Please help me...