Search found 269 matches

by OldCow
Mon Apr 12, 2010 9:37 pm
Forum: SparkFun Product Questions
Topic: Current regulating question (for IR comms)
Replies: 16
Views: 1916

Re: Current regulating question (for IR comms)

What kind of IR receiver are you using? If you use a sub-carrier of 30kHz to 60kHz, you can find very cheap and very sensitive receivers. But the data-rate is rather slow -- like 120 b/s.
by OldCow
Sat Nov 07, 2009 8:55 am
Forum: MSP Microcontrollers
Topic: debug loop
Replies: 3
Views: 1176

I sometimes get stuck too when I am in debug mode. This has very little to do with what tools I use. I get stuck even without any tool.
by OldCow
Mon Sep 21, 2009 3:56 pm
Forum: MSP Microcontrollers
Topic: OldCow's bugs
Replies: 1
Views: 970

OldCow's bugs

This has nothing to do with Schrödinger's cat (http://en.wikipedia.org/wiki/Schr%C3%B6dinger%27s_cat). But all un-tested code have lots of bugs. And they also have no bugs at all at the same time.
by OldCow
Thu Sep 17, 2009 8:07 am
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

Only Up-mode and Up-down-mode do not need ISR to generate PWM. Using Cont.-mode, you can use CCR0 to assist you (I think you did that). This way you only need to execute ISR once per period. You can also use the buffered load to make it less time critical. The limitation is <period> has to be longer...
by OldCow
Tue Sep 15, 2009 10:23 am
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

When you use continues mode to generate PWM, you need ISR twice per period, once at the beginning of the pulse and once at the end. ISR execution time imposes a lower limit to both <pulse_width> and <period – pulse_width>. Using the double buffer may help, but there are still limits. When you use up...
by OldCow
Sat Sep 12, 2009 7:40 am
Forum: MSP Microcontrollers
Topic: char to Hex
Replies: 7
Views: 2108

Some time people do not mean what they say.

Asc() in BASIC does not do what he said but probably does what he wanted.
by OldCow
Fri Sep 11, 2009 10:25 pm
Forum: MSP Microcontrollers
Topic: char to Hex
Replies: 7
Views: 2108

If you just want to convert a byte into 3 digits in ASCII, try this:

dig[0]=byte/100+'0';
dig[1]=byte%100/10+'0';
dig[2]=byte%10+'0';
by OldCow
Mon Sep 07, 2009 8:50 am
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

The code I posted yesterday was based on:
I think you can set TACCTL5=0x0090;
In the corresponding ISR, you do TACCR5 += 1667;
Your ConfigTimerB_PWM routine could work too. But the ISR needs to be:

Code: Select all

{
  TBCCR0 = TBCCR5 + 1667;
  TBCCR5 += 3333;
}
by OldCow
Sun Sep 06, 2009 9:03 pm
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

#include "msp430.h" #define UINT unsigned int #include "your_posted_code.txt" void main( void ) { WDTCTL = WDTPW + WDTHOLD; //Set up your ACLK here ... ??? ... //Call your routines Init_TimerB(); ConfigTimerB4_Timeout (12345); ConfigTimerB6_Timeout (54321); //But do not use your ConfigTimerB5_PWM()...
by OldCow
Sat Sep 05, 2009 12:10 am
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

Do you know which pin is able to output OUT5 signal from TB?

Did you set up that pin to do so?
by OldCow
Wed Sep 02, 2009 3:45 pm
Forum: MSP Microcontrollers
Topic: PWM using TimerB in continuous mode
Replies: 12
Views: 3220

I think you can set TACCTL5=0x0090;
In the corresponding ISR, you do TACCR5 += 1667;
by OldCow
Fri Aug 28, 2009 9:33 pm
Forum: MSP Microcontrollers
Topic: How can you do 2 PWMs (one of them complimentary)
Replies: 8
Views: 2154

Todd, Thanks for the URL. I am not familiar with motor drives. I read the data sheet of the chip and the user manual of the evaluation board, but cannot tell if this chip is for DC motor or stepping motor. And I am not sure about how to drive the control signals. For DC motor, my understanding is, y...
by OldCow
Fri Aug 28, 2009 6:06 am
Forum: MSP Microcontrollers
Topic: How can you do 2 PWMs (one of them complimentary)
Replies: 8
Views: 2154

I thought you were using the term PWM loosely to mean a square wave with adjustable frequency. Now I realize that you really mean Pulse Width Modulation. I am very curious about how this motor works. Do you mind giving me an URL or pointer about this?
by OldCow
Thu Aug 27, 2009 9:29 pm
Forum: MSP Microcontrollers
Topic: Choosing the MSP430-JTAG/MSP430-JTAG-TINY for the MSP430F543
Replies: 10
Views: 2605

The published bug list is pretty formidable already. And there are more un-published bugs and un-discovered bugs. I am waiting for rev-A too. But I would not hold my breath.
by OldCow
Thu Aug 27, 2009 9:12 pm
Forum: MSP Microcontrollers
Topic: How can you do 2 PWMs (one of them complimentary)
Replies: 8
Views: 2154

Yes, that is correct.

To drive a H bridge, it is important to use break-before-make. This is in the Users Manual too.