Closed joe318 closed 5 years ago
In the interrupt routine:
ISR(TIMER1_COMPA_vect){
PORTF |= 1 << 0;
PORTF &= ~(1 << 0);
}
You're still toggling the STEP pin only for the first driver.
You can also use digitalWrite
in there but it's slower and will limit your maximum stepping rate. But you need to determine if this is an issue for you in the first place.
omg thank you can i bother you little more ? lol First ok yes was sure it's the fault or my skills, you don't have morre simple example ready for just read stallguard?
and i don't undesrtand what i need put in interrupt? can you help me please :)
Interrupts provide a more consistent stepping rate and are needed to reliably read the value.
If you were to just send the step pulses inside the Arduino loop
, the step pulses would stop for the duration of SPI communication. This would then affect the readings.
yes yes ok i know and understand ok i go ask to google more about interrupts, i'm little new with arduino, i'm old php sql javascript css but young arduino player lol
omg wait don't lose time, i found you answer the solytion to another one, idn't know about this way to use the arduino port thanks
i test it right now and post here, if someone need
ok done it's working, but because you i need study more loool study this bitwise story.
message for newbie like me ahahah : PORTF |= 1 << 0; it's PF0 or A0 or pin 54 PORTF &= ~(1 << 0);
PORTF |= 1 << 3; it's PF3 or A3 or 57 PORTF &= ~(1 << 3);
and learn about bitwise here https://www.arduino.cc/reference/en/#structure for can understand.
ok now i feel me a kid arduino not a newbie, but it's cool coz i love learn, let's go to play and learn. Thanks a lot
Hello, First of all MERRY CHRISTMASSSSSSS ;)
I'm new with this tmc2130, i'm in project mode lol, i do one thing with 3 nema 17, first i put a4988, after i put drv8825, without problem, working well, sure with this crazy noise but working well, i discover this tmc2130 in internet and i decide to buy for update my project.
My problem is with stallguard, it was nice if can put it work with the 3 nema, i use 2 switch for now.
I try first ur simple example with a mega and 2 nema17 sure with 2 tmc, working well, i play little with the values, no problem, after that i try the stallguard example, no problem with one nema, but with twoo i have one problem, one work well, can read the values, but the second is here but he dont move, but i think he read the values, i don't know where is my mis coz sure it's my fault but idk where.
like u see in the pic, the lr work well but the hr nothing, he is here but he dont move.
my sketch
thank youuuuuuuu