marco.fruhauf
Newbie level 2

Hi guys;
Below I copy my first code for MPS430F5438A.
It doesn't debbug. In all instructions in the function "while" the IAR saw an error with tihs description "espected an expression".
1What this it mean?
2these instructions are really bad?
3and finally, what more configuration the MCU need to run?
I ask tihs becuse I try to find this information in manuals but I haven't. I'm talking about setup of MCU clock, for example.
Sorry for my english, I'm learning. I'm learning a lot.
Below I copy my first code for MPS430F5438A.
It doesn't debbug. In all instructions in the function "while" the IAR saw an error with tihs description "espected an expression".
1What this it mean?
2these instructions are really bad?
3and finally, what more configuration the MCU need to run?
I ask tihs becuse I try to find this information in manuals but I haven't. I'm talking about setup of MCU clock, for example.
Sorry for my english, I'm learning. I'm learning a lot.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include "io430x54x.h" #include <stdio.h> #define LED1_on P10OUT_6 & = ~0x0040, #define LED1_off P10OUT_6 | = 0x0040, #define LED2_on P10OUT_7 & = ~0x0080, #define LED2_off P10OUT_7 | = 0x0080, #define switch_1 P4IN_0 | = 0x0001, int main( void ) { // Stop watchdog timer to prevent time out reset WDTCTL = WDTPW + WDTHOLD; P4DIR = 0xff; P10OUT = 0xff; while (1) { if(switch_1 == 1) LED1_off; else LED1_on; LED2_on; } }
Last edited by a moderator: