Hi,
I'm using the PIC 16F628. The idea is that the PIC outputs a pulse chain at a given frequency to trigger my stepper driver IC one one pin of one of the PIC ports. The other pins on that port specify direction, step mode etc. If one of the PIC's pins - my 'address' pin - on the other port is sent high by the paralell port on my computer, then the PIC interrupts and reads new instructions on motor direction, frequency etc from some other pins which are atached to the paralell port. It then alters the frequency output and other pins accordingly. If the 'address' pin is not high, then the other pins are ignored and the PIC goes on outputting its pulses. This interrupt on one pin gives the PIC an 'address' so I can run two together, but issue commands to one or the other - each will only call its interrupt routine when a specific pin is sent high.
Both PICs have 4Mhz external XTs. The actual output frequency is not actually that important, within reason. What is more importnant is the relative frequencies - I need to know that I am stepping one motor at x times the other, but the exact speed is not importnant. Thiis is because the motors are used to control a mount which must track in a given direction. Roughly knowing the speed of each motor is nice, but more important is relative speed of the motors, and thus the tracking direction.
I was looking through the picbasic manual, and came across pause comands thate were used in one example. Presumably I could use this function? Although there would be an error due to the time taken to actually process the looping commands etc, this error should be constant whatever my desired frequency, giving me a constant offsett...?
I chose a 4Mhz XT because it was as low as I could go, but
still only lets me get hardware PWM down to about 250Hz it seems ...
Cheers (and sorry for the long post)
Ben
Bookmarks