Jump to content

enl

Members
  • Content Count

    328
  • Joined

  • Last visited

  • Days Won

    22

enl last won the day on June 18 2017

enl had the most liked content!

About enl

  • Rank
    Level 2

Profile Information

  • Gender
    Not Telling
  • Location
    Northeast
  • Interests
    Machining, welding, electronics, woodwork, making, education, tools, toys

Recent Profile Visitors

1,537 profile views
  1. enl

    Best way change I2C freq to 400kHz

    UCSSEL_2 is the selector bit set for the sub-main clock as the clock source for the UCB serial module. I have not looked through the code (and do not use the MSP432 processors) so I I can't give details, and someone else may be able to give you a full answer, but if you see assignments to UCBxBR0 and UCBxBR1, these are setting the baud rate register divider (the BR in the names is for "BAUD RATE"). If no one comes in with more complete information in the next day or two, I can look at the source.
  2. I don't have the libs you are looking for, but I would guess that someone may be able to help you in the next day or two. The traffic here has slowed is fairly low these days, but many of the members do check in fairly often. If you don't hear anything in a day or two, I will do some digging. If you find the library you need elsewhere (or find it here somewhere), please do follow up in this thread.
  3. enl

    CC3200 launchxl reset button

    That indicates that the 0ohm resistor is in place, as it should be. This pretty much leads to the conclusion that either you have an issue with the jumper you are using to ground the reset pin, or there is something really, really weird. If it is something really, really weird, it will make you slap your head with a ball pein hammer when you find it. One thing to note about the use of a jumper: the stock pin headers on most of the various launchpads I have are suitable for a board connector, but the pins are borderline for a female shell connector on a cable. It seems weird when you first experience it, but the cable terminating contacts require about 1 to 2mm more pin length. In fact, UI need to run a new board for a CNC controller tomorrow, since I used the wrong pin headers (Always double check the components. I didn't realize I had the shorter pin version in the parts rack) and the control connectors are not fully seating, and are working loose due to vibration of the control panel. One of the reasons I still use a wire wrap tool and 30AWG Kynar wire these days.
  4. enl

    CC3200 launchxl reset button

    I am presuming that you have the proper ground connection for the various methods you are trying: Connect a scope probe to the reset pin on the header (P2, pin 5) and push the reset button. You should see the line go from high to low If not, the pin is not connected to the line. It should reflect the state of the button, but is listed in swru372b as an OUTPUT (tab;l 8 on page 13, and fig 8 pin map) for resetting daughterboards, and though it should be usable as an input based on the schmatic. What I would guess is not there is the 0ohm resistor R84 that connects the header pin to the line. (see CC3200-LAUNCHXL_SCH_REV4P1-C.pdf, sheet 2, location D2 shows this) If that isn't it, you got me. I can't see any other way for this to happen (presuming the wire is good, you have the wire connected to actual ground, etc).
  5. enl

    CC3220SF watchdog timer

    SInce no other responses have come along, I will get the ball rolling by asking for a bit more detail. What errors are you getting? What are you trying to do with the watchdog? As far as I know (not using the CC32XX series), Energia supports the 3220 launchpad board. See https://forum.43oh.com/topic/13311-connecting-cc3220sf-to-cayenne-mqtt-using-energia/ (Rei Vilo's msg: 6th in the thread)
  6. Glad to see you worked it out. For most standard/common setups, I keep a collection of code snippets, so I don't need to think too hard.
  7. There are two answers: 1: Strictly using hardware, you have two independent PWM channels, as long as you aren't using either timer for anything else (the two TIMER_A modules-- timer type A, a 16 bit with counter with a selection of control inputs for counting, output modes, and other options. Other MSP430 devices may include other timer types, such as TIMER_B). There are several pins that can be attached to each for PWM output, but, for practical purposes, they are not independent. 2: Using software, you can have as many PWM as you have output pins, but more than 8 gets more difficult. The max PWM frequency will not be as high as the hardware only solution, and the precicion will be lower, but for many applications, it is quite acceptable. This requires using an interrupt service routine triggered by a timer at the PWM resolution. If you want a PM cycle of 10ms (100 cycles per second) and a n 8 bit resolution (256 PWM pulse widths), you will need the interrupt to trigger every 39 microseconds. This is about the limit for an MSP4302553 at the max clock frequency, if you want to get anything else done, like control the PWM. I have used this approach a number of times, and have at least one example on this site (8 channel spooky eye controller for hallow'een ). For motor control, this might be quite sufficient, especially if you use a table in memory for control. For a three phase BDC motor, you are likely to be able to use 3 or 4 bit resolution and a PWM cycle of about 500 microseconds. This will give you a max RPM of the order of 18KRPM (300 rev/sec) As regard to your response to Rei Vilo,: A key skill that anyone working with electronics, microcontrollers, PGA's, and so on, is reading and interpreting data sheets and data books. For a complex device, which the MSP430's are, this is not easy, but is still a needed skill and you will need to do it to complete any project that is not trivial, and a three phase driver is decidedly not trivial. The information for response 1 is directly in the pin map. Response 2 requires experience.
  8. enl

    Project using the FR2311 and DC Motors

    For the sampling strategy, you probably don't want the repeated strategies. If it were me, I would use ADC_SEQofchannels for the two channels. As for the dead zone, I generally estimate then adjust it during testing. The value I tend to start with is about 5 degrees (2.5 to either side of the zero)or 2 to 3 percent for linear slides, unless the pot has very small mechanical range (less than 180 degrees, shorter than 10mm for linear). You don't set this in the ADC. That is pure arithmetic after reading, with an approach described above. There are other approaches.The one above doesn't do it if you need control all of the way to zero (with motors, you usually don't, as there won't be enough torque at the bottom end to turn the motor unloaded, much less with load). As an example: 270 degree pot, and 5 degree dead zone: When reading, the range for ADC12 is [0..0xfff]. That gives approximately 0x10 counts per degree. The sequence I would use is: // n is a signed int to represent the speed // d is a bool for direction //PWM_max is a constant for the max PWM value. Presume the desired values are UNSIGNED in the range [0..PWM_max] scale_val <- PWM_max / 0x800 // this will be computed at compile time. It is more efficient if it is an int n <- ADC - 0x800 // set center of pot at zero if n<0 then d <- false else d <- true n <- abs(n) if n < 0x28 then n <- 0 // dead zone is 2.5 degrees to either side of zero PWM_value <- n*scale_val //scale PWM The 0x28 sets the dead zone width. There are other ways, as well, of you need PWM all of the way to zero, or want independent control of the PWM low end and dead zone width
  9. enl

    Project using the FR2311 and DC Motors

    I can't address everything you asked (I haven't used the eComp) , but as to bidirectional control, that doesn't matter. Presume you get a value in the range [0..0xfff] as your control value. There are several approaches, but they all boil down do, essentially, subtracting 0x800 from the read value to put half of the range negative, and half positive. For the PWM, if you have a bidirectional driver (inputs are a direction and a PWM pulse) you use the sign for the direction output and the magnitude (absolute value) to set the PWM, probably with scaling. For a driver like the 293, you do a bit more in software, but it comes to the same thing. Hold both drives low for stop, Depending on the sign, you pull one high or the other high via PWM. For a setup like this, I might set a 'dead band' around the stop. After abs value, if it is less than some small value, treat it as zero. This makes stopping MUCH less touchy, and makes it much easier to avoid the condition of PWM too low for the motor to run, but still heating up the motor and driver.
  10. You have a wide variety of clock options from 48MHz down to about 10KHz, on board, the ability to use external clocks (crystals or other sources), and direct support for 32768Hz crystals (and others). You can't reliably go beyond 48MHz, but the internal clock generator will give a fairly smooth range down to the low end (I don't recall the bottom end of the DCO, but the LFO-- ultra low power, low frequency onboard unit- is below 10KHz) Most libraries and language families will provide a way to select which clock and set the rate for the DCO or other source. See http://www.ti.com/lit/ds/symlink/msp432p401r.pdf page 123 for summary.
  11. It is a clever solution, and I learned a few things I hadn't realized about the interrupt flags, but I do think it is a solution in search of a problem. To me, it isn't that the interrupt handler is the only way, or always the best way, but that it is simple and has a low penalty in cycle usage and power, relative to polling this way. Fewer clock cycles per loop (single mask to check one bit, rather than several changes to control register states and masks), and, since this is likely to be a rare event at code speed, net minimal hit. Without working out the numbers, I would guess that each NMI costs about twice as much as each polling loop hit in this example (cycles and power), versus much greater saving each loop for the polling operation. Also, the NMI handler is a natural fit to dropping to lowest power states (though the '430 is better than many processor families with regard to wake up from assorted conditions) and allowing the handler to wake up for the polling loop. Can you tell I am not a fan of delay functions that do not sleep the processor? [My first experience with this involved halt on a Z80, with a line frequency-- actually video frame rate-- wake-up used for delay in 8.3ms increments in conjunction with processor HALT... This allowed for wake up as needed, and, by the standard of the times, moderate power savings] Please do correct me if I am missing something here... This isn't something I have really considered with this processor before.
  12. The few times I have needed to do this, I used interrupt handlers that did nothing but set or reset a bit to reflect the state.
  13. As a general rule, you should never use file or directory names with spaces in them. They tend not to work well with many tools, and tend not to work well across platforms, and do not work at all with some environments/platforms. We have all seen the abomination that occurs when a URL contains a space, and some of us have seen environments where some superstar realizes that, on windows, a filename or directory name can consist of nothing but spaces. Have fun with that. It does not help that Windows does not handle paths consistently across contexts, and, though better than in the days of Win95, still does not handle capitalization in file/directory names consistently across all contexts.
  14. enl

    Circuit Help

    Best advice I can give you is to breadboard it. The LM3915 is pretty rugged, as long as you don't mix up the power supply pins, and everything else except the analog switch is, as well. The frequencies are low. This is very bread-boardable. The 4000 series IC's are not as static sensitive as some, but they do take some care. ALL unused inputs should be connected to ground or V+. I generally use about a 10K resistor, rather than direct connection, primarily because there are some failure modes that can occur during power cycling if the inputs are direct connected to V+ or ground, and the resistor limits current generally preventing damage. The unused analog pins should also be connected to ground.
  15. enl

    Circuit Help

    See, for example, https://web.stanford.edu/class/archive/physics/physics105/physics105.2002/datasheets/Analog_Linear_OpAmp_ICs/LM3915.pdf pages 8-21 I like this IC family, and have used them many times for many things. I miss them, but not much.
×