Tic Stepper Motor Controller library for Arduino
|
#include <Arduino.h>
#include <Stream.h>
#include <Wire.h>
Go to the source code of this file.
Classes | |
class | TicBase |
class | TicSerial |
class | TicI2C |
Enumerations | |
enum | TicProduct { Unknown = 0, T825 = 1, T834 = 2, T500 = 3, T249 = 4, Tic36v4 = 5 } |
enum | TicError { IntentionallyDeenergized = 0, MotorDriverError = 1, LowVin = 2, KillSwitch = 3, RequiredInputInvalid = 4, SerialError = 5, CommandTimeout = 6, SafeStartViolation = 7, ErrLineHigh = 8, SerialFraming = 16, RxOverrun = 17, Format = 18, Crc = 19, EncoderSkip = 20 } |
enum | TicCommand { SetTargetPosition = 0xE0, SetTargetVelocity = 0xE3, HaltAndSetPosition = 0xEC, HaltAndHold = 0x89, GoHome = 0x97, ResetCommandTimeout = 0x8C, Deenergize = 0x86, Energize = 0x85, ExitSafeStart = 0x83, EnterSafeStart = 0x8F, Reset = 0xB0, ClearDriverError = 0x8A, SetSpeedMax = 0xE6, SetStartingSpeed = 0xE5, SetAccelMax = 0xEA, SetDecelMax = 0xE9, SetStepMode = 0x94, SetCurrentLimit = 0x91, SetDecayMode = 0x92, SetAgcOption = 0x98, GetVariable = 0xA1, GetVariableAndClearErrorsOccurred = 0xA2, GetSetting = 0xA8 } |
enum | TicOperationState { Reset = 0, Deenergized = 2, SoftError = 4, WaitingForErrLine = 6, StartingUp = 8, Normal = 10 } |
enum | TicPlanningMode { Off = 0, TargetPosition = 1, TargetVelocity = 2 } |
enum | TicReset { PowerUp = 0, Brownout = 1, ResetLine = 2, Watchdog = 4, Software = 8, StackOverflow = 16, StackUnderflow = 32 } |
enum | TicDecayMode { TicDecayMode::Mixed = 0, TicDecayMode::Slow = 1, TicDecayMode::Fast = 2, TicDecayMode::Mixed50 = 0, TicDecayMode::Mixed25 = 3, TicDecayMode::Mixed75 = 4 } |
enum | TicStepMode { Full = 0, Half = 1, Microstep1 = 0, Microstep2 = 1, Microstep4 = 2, Microstep8 = 3, Microstep16 = 4, Microstep32 = 5, Microstep2_100p = 6, Microstep64 = 7, Microstep128 = 8, Microstep256 = 9 } |
enum | TicAgcMode { Off = 0, On = 1, ActiveOff = 2 } |
enum | TicAgcBottomCurrentLimit { P45 = 0, P50 = 1, P55 = 2, P60 = 3, P65 = 4, P70 = 5, P75 = 6, P80 = 7 } |
enum | TicAgcCurrentBoostSteps { S5 = 0, S7 = 1, S9 = 2, S11 = 3 } |
enum | TicAgcFrequencyLimit { Off = 0, F225Hz = 1, F450Hz = 2, F675Hz = 3 } |
enum | TicPin { SCL = 0, SDA = 1, TX = 2, RX = 3, RC = 4 } |
This enum defines the Tic's control pins. | |
enum | TicPinState { HighImpedance = 0, InputPullUp = 1, OutputLow = 2, OutputHigh = 3 } |
enum | TicInputState { TicInputState::NotReady = 0, TicInputState::Invalid = 1, TicInputState::Halt = 2, TicInputState::Position = 3, TicInputState::Velocity = 4 } |
This enum defines the possible states of the Tic's main input. More... | |
enum | TicMiscFlags1 { Energized = 0, PositionUncertain = 1, ForwardLimitActive = 2, ReverseLimitActive = 3, HomingActive = 4 } |
enum | TicMotorDriverError { None = 0, OverCurrent = 1, OverTemperature = 2 } |
enum | TicHpDriverError { OverTemperature = 0, OverCurrentA = 1, OverCurrentB = 2, PreDriverFaultA = 3, PreDriverFaultB = 4, UnderVoltage = 5, Verify = 7 } |
Variables | |
const uint8_t | TicCurrentUnits = 32 |
const uint8_t | TicT249CurrentUnits = 40 |
const uint16_t | TicInputNull = 0xFFFF |
This is the main header file for the Tic Stepper Motor Controller library for Arduino.
For more information about the library, see the main repository at: https://github.com/pololu/tic-arduino
Definition in file Tic.h.
|
strong |
This enum defines possible AGC buttom current limit percentages.
See TicBase::setAgcBottomCurrentLimit() and TicBase:getAgcBottomCurrentLimit().
|
strong |
This enum defines possible AGC current boost steps values.
See TicBase::setAgcCurrentBoostSteps() and TicBase::getAgcCurrentBoostSteps().
|
strong |
This enuam defines possible AGC frequency limit values.
See TicBase::setAgcFrequencyLimit() and TicBase::getAgcFrequencyLimit().
|
strong |
This enum defines possible AGC modes.
|
strong |
|
strong |
This enum defines the possible decay modes.
See TicBase::getDecayMode() and TicBase::setDecayMode().
Enumerator | |
---|---|
Mixed | This specifies "Mixed" decay mode on the Tic T825 and "Mixed 50%" on the Tic T824. |
Slow | This specifies "Slow" decay mode. |
Fast | This specifies "Fast" decay mode. |
Mixed50 | This is the same as TicDecayMode::Mixed, but better expresses your intent if you want to use "Mixed 50' mode on a Tic T834. |
Mixed25 | This specifies "Mixed 25%" decay mode on the Tic T824 and is the same as TicDecayMode::Mixed on the Tic T825. |
Mixed75 | This specifies "Mixed 75%" decay mode on the Tic T824 and is the same as TicDecayMode::Mixed on the Tic T825. |
|
strong |
This enum defines the Tic's error bits. See the "Error handling" section of the Tic user's guide for more information about what these errors mean.
See TicBase::getErrorStatus() and TicBase::getErrorsOccurred().
|
strong |
This enum defines the bits in the "Last HP driver errors" variable.
|
strong |
This enum defines the possible states of the Tic's main input.
Enumerator | |
---|---|
NotReady | The input is not ready yet. More samples are needed, or a command has not been received yet. |
Invalid | The input is invalid. |
Halt | The input is valid and is telling the Tic to halt the motor. |
Position | The input is valid and is telling the Tic to go to a target position, which you can get with TicBase::getInputAfterScaling(). |
Velocity | The input is valid and is telling the Tic to go to a target velocity, which you can get with TicBase::getInputAfterScaling(). |
|
strong |
This enum defines the bits in the Tic's Misc Flags 1 register. You should not need to use this directly. See TicBase::getEnergized() and TicBase::getPositionUncertain().
|
strong |
This enum defines possible motor driver errors for the Tic T249.
|
strong |
This enum defines the possible operation states for the Tic.
|
strong |
This enum defines the Tic's pin states.
|
strong |
This enum defines the possible planning modes for the Tic's step generation code.
|
strong |
This enum defines the possible causes of a full microcontroller reset for the Tic.
|
strong |
This enum defines the possible step modes.
const uint8_t TicCurrentUnits = 32 |
const uint16_t TicInputNull = 0xFFFF |