PMDC SERVO MOTOR WITH quadrature encoder DRIVE ?


Closed Thread
Results 1 to 38 of 38

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Hi Henrik,

    I started playing with the 4431 DIP version and wonder if you have ran into this with the one you are using. Maybe it is a 4331 problem, maybe whole series.

    When using a 4Mhz resonator and have the config set for HSPLL and DEFINE OSC 16 all works well.

    If I replace the 4Mhz with a 10 Mhz and try DEFINE OSC 40 everything goes erratic.
    The PIC runs but even a simple "blinky" will blink randomly.

    Here is the very simple code and configs I was playing with to set the OSC.
    Code:
        @ __CONFIG    _CONFIG1H, _OSC_HSPLL_1H
        @ __CONFIG    _CONFIG2H, _WDTEN_ON_2H & _WDPS_512_2H
        @ __CONFIG    _CONFIG2L, _BOREN_OFF_2L & _PWRTEN_ON_2L    
        @ __CONFIG    _CONFIG3H, _MCLRE_OFF_3H
        @ __CONFIG    _CONFIG4L, _LVP_OFF_4L  
        
         DEFINE OSC 16
         
        START:HIGH PORTD.1:PAUSE 500
        LOW PORTD.1:PAUSE 500:GOTO START
    Maybe you need to set manuel 4 nibbles of config manuel :

    Code:
    bit 7 IESO: Internal External Switchover bit
    1 = Internal External Switchover mode enabled
    0 = Internal External Switchover mode disabled
    bit 6 FCMEN: Fail-Safe Clock Monitor Enable bit
    1 = Fail-Safe Clock Monitor enabled
    0 = Fail-Safe Clock Monitor disabled
    bit 5-4 Unimplemented: Read as ‘0’
    bit 3-0 FOSC<3:0>: Oscillator Selection bits
    11xx = External RC oscillator, CLKO function on RA6
    1001 = Internal oscillator block, CLKO function on RA6 and port function on RA7
    1000 = Internal oscillator block, port function on RA6 and port function on RA7
    0111 = External RC oscillator, port function on RA6
    0110 = HS oscillator, PLL enabled (clock frequency = 4 x FOSC1)
    0101 = EC oscillator, port function on RA6
    0100 = EC oscillator, CLKO function on RA6
    0010 = HS oscillator
    0001 = XT oscillator
    0000 = LP oscillator
    and probe ?
    Last edited by phoenix_1; - 1st September 2009 at 20:34.

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  2. Best quadrature encoder for buck?
    By jrprogrammer in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd June 2009, 13:58
  3. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 08:40
  4. saving RCREG to word
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th September 2008, 13:51
  5. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts