-1

I at the moment trying to interface to an stepper motor control board - (ST330-V3)

I wrote the code, but aren't sure how i should test it. Is there someway i could scope it, such that also can be sure that the timing is met, and all the pins are set as they should be.. Something like simulink, where you can simulate the output?? Further specified.. Problems with scopes and the mentioned are that i am not able to test a specific area, or from start to some specified time.

  • Is there someway i could scope it”. Yes, with an oscilloscope. – Edgar Bonet Sep 20 '16 at 8:03
  • Its not clear from your question what platform you code is running on. That is going to make a difference, since the answers supplied so far won't be relevant to a PC or Pi. If its not an Arduino program that you are talking about you will get more appropriate answers from the Electronic Exchange or Stack Overflow forums. – Code Gorilla Sep 20 '16 at 11:59
  • I wrote a testing library that might be able to handle this, and I think this would make a great use case to help me develop that feature. Is your project available on GitHub? – Ian Jan 31 '19 at 12:28
0

There is a free Arduino simulator that is called Autodesk Circuits (aka 123D Circuits). You are specifically after the Electronics Lab where you can simulate Arduino programs and display the outputs as a simulated scope trace.

https://circuits.io/lab

As an alternative, you can always load it onto your Arduino board and use either a digital multi-meter or oscilloscope to measure the signal.

0

if timing is critical you can use AVR assembly and just calculate the timing manually, most instructions are 1 cycle... scope it if you have a scope and if not use the hardware timer to time it.

edit: if you only need millisecond resolution you can use the arduino millis() otherwise you need to start a timer before the code then read the timer after, optionally setting up an overflow ISR.

  • You can also use micros(), which has better resolution than millis() (4 µs on the Uno). – Edgar Bonet Sep 21 '16 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.