. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. Well lets think this through...

    Whats the slowest meaningful step rate, 1 step/second? how long after the last step do we want to wait, 10 seconds?

    So every time there is a clock pulse, reload an 'n' second counter. when the counter reaches 0 start a PWM output with a frequency of 100Hz say, and a mark/space ratio controlled from 2 dip switches giving 100 (off), 75, 50 and 25 settings

    Use a couple more DIP switches to set the initial delay 'n', say 20, 10, 5, 2 seconds.

    Pseudocode:

    Interrupt routines:
    If INT0 (external)
    read delay value
    reset main counter to delay value
    set PWM output high (open collector)
    reset INT0
    return
    If INT1 (main counter reached 0)
    read PWM value
    initialise PWN registers
    start PWM running
    reset INT1
    return
    Main program:
    set PWM frequency
    set PWM output high
    configure counter clock divider
    configure INT0 on external trailing edge
    configure INT1 on counter timeout
    read delay value
    reset main counter to delay value
    enable INT0
    enable INT1
    halt
    obviously, depending on the chip used you may have to synthesise the PWM function with counters and a lookup table to determine the correct counts for each DIP setting.

  2. #2
    I wont pretend to understand that, but it looks impressive, cheers

    Any tips for laying out pcbs in Eagle or is it practice makes perfect? this could take a while.....

  3. #3
    er the ones that always hits me, repeatedly, I am not learning. Everything looks much smaller when it's actually on a pcb, smaller than the screen that is. So those neat narrow little traces and tiny pads are even smaller than you thought. oh and make the holes in the pads very small as large ones make soldering not as neat and the drill won't center aswell. Well those are things I need to remember, but don't till I am looking at the laser print.

    I seem to remember Mariss from Gecko offering to sell cplds programmed pretty much as in the geckodrives, for something like $5 a time?
    It was mentioned in the looooong thread about the Alegro A3986 chip that everyone decided didn't work properly, this is on CNC zone. That must be worth a look.

Thread Information

Users Browsing this Thread

There are currently 15 users browsing this thread. (0 members and 15 guests)

Similar Threads

  1. Replies: 1
    Last Post: 16-03-2014, 07:29 PM
  2. Dc servo driver
    By Treemonkey in forum Motor Drivers & Controllers
    Replies: 11
    Last Post: 11-02-2013, 08:16 PM
  3. Driver suggestions
    By Shinobiwan in forum Motor Drivers & Controllers
    Replies: 0
    Last Post: 04-03-2012, 03:54 PM
  4. Driver wiring help...
    By mike in forum Motor Drivers & Controllers
    Replies: 12
    Last Post: 21-09-2010, 09:29 AM
  5. Driver box
    By John S in forum General Electronics
    Replies: 1
    Last Post: 21-06-2009, 12:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

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