Jump to content

Search the Community

Showing results for tags 'encoder'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 6 results

  1. Hallo guys, I am working on MSP430 and want to use incremental rotary encoder to control the menu, that I will later make. I decide to try to flicker the both LED first to see if I have the right programm to take input from the rotary encoder. I have the A_Output (CLK) and B_Output (DT) on Pins 2.1 and 2.2 #include "msp430g2553.h" char c_P2IN; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P2OUT |= 0x07; P2REN |= 0x07; P1DIR |= 0x41; // Set P1.0 and P1.6 to output direction P2IE |= 0x07; // P2 (Bit0, Bit1 und Bit2) interrupt enabled P2IFG = 0x00; // P2IFG cleared _BIS_SR(LPM4_bits + GIE); // Enter LPM4 w/interrupt while(1) { c_P2IN = P2IN; //Monitoring the P2IN; } } // Port 1 interrupt service routine #pragma vector=PORT2_VECTOR __interrupt void Port_2(void) { if(P2IFG&BIT1) { if (!(c_P2IN&BIT2)) { P1OUT^= BIT6; _delay_cycles(100); P2IFG = 0x00; } } if(P2IFG&BIT2) { if (!(c_P2IN&BIT21)) { P1OUT^= BIT0; _delay_cycles(100); P2IFG = 0x00; } } } It works for maybe 4-5 turns, and then it doesn't for 2 turns, and for the next few turns it works again. Can you please give me idea how to do it?
  2. This is an Energia sketch designed to be used with a rotary encoder with push button. The difference is that input can be made coarser or finer by pushing the button. The need came about because I wanted to be able to adjust a frequency generator between 1 and 40 MHz with fine adjustment on the order of 1 Hz with a simple interface on the board. A potentiometer would not work due to low resolution and jitter. Buttons or a simple encoder might work but it would take a lot of button pushing or knob turning to get from 10 Hz to 10 MHz. I thought about a solution where the rate of turning the knob would determine the incremental increase or decrease but that seemed fiddly. I could use multiple buttons but I liked the idea of a knob and in the end I only had one rotary encoder on hand. So my solution was to use the encoder push button to provide for coarse to fine adjustment. For example, the encoder can be set to increase or decrease the value by 100 with a twist. By pushing the button it can be made to improve fine control by say 1 value per click. This allows the user to rapidly change values or achieve fine control as desired. The sketch is here. A couple on additional points: Capacitors were used for hardware debouncing. You may wish to modify the sketch or use a different encoder scheme with software debouncing. Interrupts were used for both encoder pins and the switch. You may need to change the pins to a port with interrupt capability with different LaunchPads. The sketch allows the minimum and maximum values to be set, as well as the change rate for coarseness. It seems to work pretty well although it is a cheap encoder and with a minimal effort I can now rapidly change the frequency on my AD9850 and see the results on the FR6989 LCD. I still need to put together a BoosterPack.... Tested with Energia V17 on the following LaunchPads: MSP-EXP430FR6989, EK-TM4123GXL and MSP-EXP432P401R. UPDATE: There is a 43oh post that shows the BoosterPack I created here: http://forum.43oh.com/topic/9402-ad9850-frequency-generator-boosterpack/
  3. I had a lack of digital input pins for a pushbutton rotary encoder switch so I used an analog input. I wrote up my results here: https://analog10.com/posts/rotary_encoder_analog_input.html It works pretty well except for an occasional reverse tick but that's probably a flaw in my code.
  4. anyone used a continuous rotation resistor for a dc motor for tracking position like this one from digikey: http://www.digikey.com/product-detail/en/3382G-1-103G/3382G-1-103GTR-ND/1944266 manufacturer is Bourns. I need to track rotation of motor, to linear motion, like a lead screw. motor is 6v, ~1500rpm. only need to track about 20 revolutions in either direction. anyone have any other cheap suggestions, that are relatively small in size.
  5. What have you guys used for stepper motor position feedback? I'm aware of shaft encoders, hall effect sensors, magnet and reed switches... but haven't used any to actually get feedback/control. Code/Links appreciated (especially Energia sketches)! It's for use with a little open source 1000PSI hydraulic pump that I'm iterating. The stepper feedback is for accurate hydraulic flow measurement, which will help us zero in on hydraulic positioning (not an easy thing!) curious/interested (blogpost -no BS, no commercials): http://www.arduinoforgoodnotevil.blogspot.ca/2013/07/arduino-1000-pounds-per-square-inch.html THANKS!
  6. I need to measure the speed of a encoder, which creates pulses approx. 4 times per second. I'm not sure whether the timer can do that, or how to code it. The encoder is connected to the MSP, and i get signals in the 'coolterm' for testing purposes, but i need to figure out a way to get the timer to measure the time (ms) between each pulse. Thanks in advance Jais
  • Create New...