Max Freq Input with Step/Dir

Max Freq Input with Step/Dir

Postby morbak » 01 Jun 2012, 16:23

Hi,

I drive a TMC249 with µC via SPI.
µC Freq is 10Mhz with internal PLL(x4) [PIC18F4582]

I converting Step/Dir inputs to SPI (16bits) and I want to know what is the max Step frequencie input and what is themotor's max rotation speed ?

I've noticed when i comment the SPI reading of TMC249's ErrorBits , the motor move, but when i uncomment the SPI reading the motor don't move and make strange noise even a very low freq step input:

Code: Select all
            WriteSPI(BYTE1(SPIData));
//           BYTE1(ErrorBits)=ReadSPI();

            WriteSPI(BYTE0(SPIData));
 //         BYTE0(ErrorBits)=ReadSPI();


i my program , there an interrupt on every step input to count the pulse. and a main loop to extract the value to the sin table and send the 2 byte over SPI, it's very light.


Thx, have a good WE
morbak
Power User
Power User
 
Posts: 34
Joined: 08 Jun 2010, 08:19

Re: Max Freq Input with Step/Dir

Postby TRINAMIC_BD » 01 Jun 2012, 19:10

Hello,
in order to assess the max. possible frequency, you must make sure, that the interrupt procedure is ended before the next step comes. You could measure with a scope, by setting an output pin during the runtime of the procedure which must run for every step. In order to speed up, you could skip every second step at high input frequency.
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2450
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)


Return to TMC236 / TMC239 / TMC246 / TMC249

Who is online

Users browsing this forum: No registered users and 2 guests