584,854 active members*
4,273 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > PIC Programing / Design > More than one clock from the PIC to drive L297
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2013
    Posts
    0

    More than one clock from the PIC to drive L297

    Hello !

    I need to send clock signal (in this case at least two clock signals) from a PIC to L297 stepper motor driver. In other words, I need to control at least two motors at a time.

    Now, with one motor driven at a time there is no problem, but I will need more than that. Clock send to L297, as you know, determines speed of the stepper, e.g. number of steps in time. Problem is that I would need more than one clock signal from the PIC, different frequencies, of course.

    Currently, I am using 16F877 but I am not sure that I can do it with this controller. Any recommendation would be helpful.

    Thank you,

    Josip

  2. #2
    Join Date
    Jan 2005
    Posts
    1695
    Why not use the output compare modules?

  3. #3
    Join Date
    Feb 2013
    Posts
    0
    Quote Originally Posted by H500 View Post
    Why not use the output compare modules?
    Thank you for the reply.

    Actually, I did not use this method before. So, what type of PIC do you recommend, considering the fact that I need lots of ports (I am controlling 6 steppers) ?

    From reading 16f's datasheets I do not see this can be done with these.

    Josip

  4. #4
    Join Date
    Jan 2005
    Posts
    1695
    I'm not sure how fast you need to step or whether you need to generate acceleration profiles and accurate positioning, but the pic24 or dspic can run much faster than the 16f.

  5. #5
    Join Date
    Feb 2007
    Posts
    962
    You can use bresenhams algorithm to generate the 2 outputs. You can use an 8 bit or 16 bit.
    With 8 bit you probably can get 50-100 Khz on your 8 bit pic.
    Manufacturer of CNC routers and Viper Servo Drives
    www.LarkenCNC.com and www.Viperservo.com

Similar Threads

  1. another clock
    By balsaman in forum WoodWorking Topics
    Replies: 49
    Last Post: 05-14-2009, 02:17 AM
  2. A cnc clock
    By balsaman in forum WoodWorking Topics
    Replies: 69
    Last Post: 01-26-2008, 08:15 PM
  3. L297/298 - Will it drive these?
    By Micro_CNC in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 11-16-2007, 06:49 PM
  4. Atomic Clock
    By Al_The_Man in forum Community Club House
    Replies: 3
    Last Post: 07-20-2006, 08:15 PM
  5. Creating a chopper drive with discrete components using the L297
    By tpworks in forum CNC Machine Related Electronics
    Replies: 15
    Last Post: 05-31-2004, 06:04 PM

Posting Permissions

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