Jump to content


  • Content Count

  • Joined

  • Last visited

  1. It is a 5 volt chip, I have the 5volts coming from T0 on the launchpad. then it's basically p1.0 and 1.1 are the select bits, and 1.2 is the enable bit. it works fine.. after i poke at it with my MM. but not before. can't figure it out for the life of me. i'll try to draw up a schematic and take a pic when I get home.
  2. Hey guys, i'm using a 754410 hbridge as a motor driver for a little 3.3 volt radioshack motor. Having a wierd problem though. Whenever I start running my code, nothing happens, but then if I pull out my MM and start checking pins to make sure everything is where it's supposed to be, well, then it starts working. I thought it might be a loose connection but have eliminated that from possibility. any ideas what this could possibly be?
  3. When using this to initialize adc10, ADC10CTL0 &= ~ADC10ENC; ADC10MCTL0 = ADC10INCH_12; ADC10CTL2 = ADC10RES; ADC10CTL1 = ADC10DIV2 | ADC10SSEL_0 | ADC10SHP; ADC10CTL0 = ADC10SHT_2 | ADC10ON | ADC10ENC; I'm getting these errors? "../main.c", line 26: error: identifier "ADC10ENC" is undefined "../main.c", line 27: error: identifier "ADC10MCTL0" is undefined "../main.c", line 27: error: identifier "ADC10INCH_12" is undefined "../main.c", line 28: error: identifier "ADC10CTL2" is undefined "../main.c", line 28: error: identifier "ADC10RES" is undefined "
  4. Ok i'm having a really interesting problem. Everything is wired up fine and my code is now fine, but for some reason, the motor doesn't start to turn until I start probing around with my multimeter. Once i do this, it starts working perfectly. I first thought it was maybe a short or loose connection but i've since eliminated that as a possibility. maybe capacitance across the MM? any ideas? i'm pretty stumped here.
  5. so would I just call this function to seed srand? Thanks by the way. really bailing me out.
  6. no help possible on the adc seed? or the whole twenty minute timer set up?
  7. Ok so I understand I need to use an adc reading as the seed, anyone care to explain what an adc reading is and how to go about taking one? thanks.
  8. Alright guys, ran into a problem that is really really holding me up and could use some quick help. first of which, I need some way to delay operations but I need to be able to pass it a variable instead of just a constant so delay_cycles won't work. Here is what some quick google searching yielded. will this work? void delay_ms(unsigned int delay) { while (delay--) { __delay_cycles(16); } } also, I need the easiest way to get a random number 1-20. I tried.. srand( (unsigned int) time(NULL) ); int i= rand()% 20; is that the best way to go ab
  9. awesome. now if only i could get pwm figured out. lol. thanks guys.
  10. yeah, i'm using the 754410. i just jumpered from tp1 and it's at just shy of 5 volts. somewhere like 4.92V. shouldn't cause any problems right?
  11. alright. i'll keep giving it a try. I'm pretty sure all my hardware is just fine because occasionally the motor turns, it's just never turning when I want it to. I can get the select bits set just fine and checked em with my DMM, Just the 2nd bit is not doing what it needs to do and I can't figure it out. How much risk of burning stuff up am I gonna be if i just don't use PWM and set bit 2 to high when I want it on, and low when I don't?
  12. so do i actually manipulate the 1.2 bit? or CCR1 to turn the thing on and off? i've tried a million combos and nothing seems to do what I think it's going to
  13. ok one more stupid question. using the given code, 1.0 and 1.1 are the control bits for the motor direction. got that. what I don't understand is what's actually happening with CCR1 and bit2. It seems based off the video and the code from the example that the lower CCR1 is, the faster the motor goes. but I think i'm missing something very fundamental. say for example, bit 1 and 0 are set to 1 and 0 respectively, what do I actually do to change the signal on 1.2 to turn the thing on or off?
  14. thanks a lot. I had an initial grace configuration, should i just get rid of all that junk now>
  15. alrighty. so would i just replace my code with where he does his demo movements? or in the bottom function. so you fully understand what I'm needing to accomplish.. this thing is going to be plugged in almost all the time. all i want is the button press to make it execute my code(start a loop which will run a set amount of times), which is going to turn on an LED(stimulus light for drug discrimination research) turn it off, then turn the motor one way which is converted to a small linear actuator. then turn it other other way, then wait a set amount of time, and start the loop over. after
  • Create New...