Jump to content
43oh

mektek

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. digitalWrite(12, LOW); digitalWrite(10, LOW); digitalWrite(8, LOW); digitalWrite(6, LOW); Is there a way to combine these four commands in one command? thanks in advance
  2. I'm confused here. When I have "void main(void)" as cde said, I get an error saying that "::main must return int". What is the right way to do it? The project code in the link above ( given by sptrks ) also gives errors.
  3. Thank you all for the help. I will start writing the code on Energia paying attention to what you guys suggested. When I had "void main(void)", energia gave me an error saying that the function must return an int so I though I'd make it "int main(void)" . I guess this is wrong as well.
  4. I'm planning to use msp430g2231. I checked out the examples. They seem simple and easy to understand. So every code should be in the form of a setup() and a loop() function?
  5. I think the code is written for the IAR compiler but I only Energie. Would it be a problem to use this code in Energia?
  6. It doesn't compile. I got two errors: 1) "::main" must return 'int' 2)'_bis_SR_register' was not declared in this scope Any idea how I can fix these errors? I haven't tried it yet but I will after I fix the errors and upload the code to MSP430. Thanks
  7. Thanks for the response. It is very helpful for me. Yes I'm using an H-bridge. I already have the circuit. I can control it by hand by playing with the input values. Now, I need to hook up an MSP430 to control it. Then, I will try to control it wirelessly. I'm trying to do it step by step. Thanks again
  8. Hi, I'm trying to control a motor drive circuit using MSP430. I have the following code but it just doesn't work. Since I'm a beginner, I'd like to ask for your opinions and suggestions. Thanks in advance #include "io.h" #include "in430.h" #define Button_Forward P1IN_bit.P0 #define Button_Backward P1IN_bit.P1 #define Button_Stop P1IN_bit.P2 #define IN_1 P2OUT_bit.P0 #define IN_2 P2OUT_bit.P1 #define EN_A P2OUT_bit.P2 #define EN_B P2OUT_bit.P3 int main(void) { WDTCTL = WDTPW + WDTHOLD; DCOCTL=CALDCO_1MHZ; BCSCTL1=CALBC1_1MHZ;
×
×
  • Create New...