Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: MarkT

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    157

    Power supply and stepper motor details are...

    Power supply and stepper motor details are useful, can you provide this?

    Also how long are the ribbon cables?
  2. MIDI isn't designed for timing that accurate. ...

    MIDI isn't designed for timing that accurate. You'd expect MIDI latencies to be measured in milliseconds, not microseconds.
    You'd be at the mercy of the receiving software as to what happens, but...
  3. Thread: Phase Shift PWM?

    by MarkT
    Replies
    2
    Views
    124

    You'd need to configure 4 separate timers for...

    You'd need to configure 4 separate timers for that (usually each timer controls multiple PWM pins). Depends on
    the precise microcontroller how to do this.

    But perhaps you just need decent...
  4. Replies
    1
    Views
    154

    Probably a lack of power or of bulk decoupling on...

    Probably a lack of power or of bulk decoupling on the LED supply - I make it 4A peak needed for 66 of
    those RGB leds, so the supply and decoupling needs to be up to the heavy load they pose and the...
  5. Replies
    3
    Views
    202

    When I write quadrature encoder code I use the...

    When I write quadrature encoder code I use the invalid transitions to increment an error count, not
    the position count. Then you can programmatically check for errors if you suspect you are not...
  6. Opamps don't usually break if you short the...

    Opamps don't usually break if you short the outputs or set them up to duel, they are designed to current-limit internally
    and indefinitely. 100 ohms or so is usually used on the outputs to prevent...
  7. Replies
    21
    Views
    6,575

    asm is the way to go really - updates to the...

    asm is the way to go really - updates to the compiler or selecting different optimization level wlll screw up
    the hand-selected C code approach.

    Having said that if the clock speed is alterable...
  8. An opamp buffer would provide a much lower output...

    An opamp buffer would provide a much lower output impedance, useful for driving long cables for instance.

    Low power opamps aren't great for audio, they have much higher distortion at high audio...
  9. Replies
    3
    Views
    111

    This thread may be useful:...

    This thread may be useful: https://forum.pjrc.com/threads/48417-Voltage-limit-on-Teensy-3-6-for-RTC-Vbat
  10. FP gives 8 more guard bits and no...

    FP gives 8 more guard bits and no saturation/wraparound issues (till the final output), its the right solution
    if you have hardware support for floats I think, otherwise 32 bit fixed point might be...
  11. Replies
    5
    Views
    156

    The values depend on the frequency, those values...

    The values depend on the frequency, those values don't work down to the frequency you're using. Add a resistor in series with the input
    pin too so that it won't be driven over or undervoltage too...
  12. There are no compound values passed as arguments...

    There are no compound values passed as arguments or results in C or C++, everything is a simple numeric/character/
    bool type or a pointer. So arrays cannot be passed by value, nor structs or...
  13. p isn't global, its nuked every time through the...

    p isn't global, its nuked every time through the loop() function.

    If something has to hold state across multiple function calls it must be global in extent.
  14. Replies
    1
    Views
    158

    The datasheet will say, but not enough with heavy...

    The datasheet will say, but not enough with heavy currents being switched on the same supply - separate supply is
    really going to help, as may some more decoupling, and attention to current paths to...
  15. Its just an I2C interface to program a bunch of...

    Its just an I2C interface to program a bunch of registers from what I can see - although there are interrupts you can also use if you want,
    but I suspect you just need an I2C library.

    It won't...
  16. Replies
    1
    Views
    136

    I normally code an algorithm up initially in...

    I normally code an algorithm up initially in Python and can use all the nice tools/libraries like matplotlib.pyplot
    and scipy.signal (super useful this one for DSP, everything Matlab has but...
  17. Replies
    1
    Views
    182

    Put AudioProcessorUsageMaxReset() in setup(),...

    Put AudioProcessorUsageMaxReset() in setup(), and then you can print out debugging
    using AudioProcessorUsage() and AudioProcessorUsageMax()
  18. Well maybe - its a compromise between protection...

    Well maybe - its a compromise between protection and transition speed - depends on the capacitance
    being driven.
  19. Replies
    11
    Views
    346

    In that case write both your counter and another...

    In that case write both your counter and another counter (or timestamp) that always increases, so that you can
    tell which is the latest position written.
  20. Replies
    1
    Views
    69

    Do you have a link to the datasheet for this...

    Do you have a link to the datasheet for this encoder?
  21. Indeed - the resistors also serve as protection...

    Indeed - the resistors also serve as protection should a servo fail with its supply shorted to the input pin. Somewhat higher value like 4k7 might be
    even better for this.
  22. The code in wiring.h is long map(T _x, A...

    The code in wiring.h is

    long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std::enable_if<std::is_integral<T>::value >::type* = 0)
    {
    long x = _x, in_min = _in_min, in_max =...
  23. Most logic inputs don't pull DC current(*), only...

    Most logic inputs don't pull DC current(*), only transient spikes for a few nanoseconds.

    Some servos may not be using standard logic gates though, and might take some current - this is something...
  24. Vocoding normally just adds formants, which is a...

    Vocoding normally just adds formants, which is a stack of tunable resonant filters, not a change in pitch of the signal itself.
  25. Hammond style vibrato/chorus via circuit simulation

    I wanted to improve the accuracy of my vibrato/chorus for my Hammond organ MIDI synth code, as its
    a distinctive part of the sound. (Note this is separate from the Leslie rotating speaker effect...
  26. Audio ADCs and DACs typically may not support...

    Audio ADCs and DACs typically may not support dynamically changing sample rates, requiring quartz-stable
    clocking to get good results - they often have clock-speed detection circuits to switch in...
  27. The AudioSynthWaveform class limits frequency to...

    The AudioSynthWaveform class limits frequency to Nyquist, so if the audio sample rate is set higher it will allow higher frequencies,
    just checked the code:



    void frequency(float freq) {...
  28. I suspect this is because there's no simple easy...

    I suspect this is because there's no simple easy way to do this for an arbitrary rate-conversion - the technically
    ideal way requires sinc-pulse summation (band-limited pulses) which is very to...
  29. That would be meaningless at 44100 sample rate as...

    That would be meaningless at 44100 sample rate as +23kHz = -21.4kHz, and unless you are handling complex (ie quadrature) signals
    negative and positive frequencies are indistinguishable. So going...
  30. Replies
    7
    Views
    312

    The Due and the Teensy both have through-hole...

    The Due and the Teensy both have through-hole micro USB sockets, meaning the steel body has 4 tabs that are soldered into
    plated through holes in the PCB, which is as good as you'll get (although I...
  31. Shifting a new pattern in is not the same as...

    Shifting a new pattern in is not the same as shifting in reverse... I think we were at odds because you happened
    to be shifting in a shifting pattern to a set of shift registers. With non-latched...
  32. We're talking about 20ns resolution for upto...

    We're talking about 20ns resolution for upto 100Ás pulses, I think custom fast counter hardware is the only way, the more I think about it,
    and there's probably a chip designed to do this - probably...
  33. Let me repeat, the '595 is _not_ bidirectional,...

    Let me repeat, the '595 is _not_ bidirectional, you need something like the '299 if you want to shift in either
    direction. If you don't believe me, read the datasheets.
  34. Replies
    27
    Views
    536

    A photo is not a link to the datasheet - but at...

    A photo is not a link to the datasheet - but at least I know the part number now and dug it out.

    The MAX5885 requires synchronous clock and data, so I don't see how what you are doing works with...
  35. Use 12 shift registers, with every other output...

    Use 12 shift registers, with every other output routed to the switches. Then feed the bit pattern '111' through.

    595's are not bidirectional - you'll need something else for that, I think...
  36. Replies
    27
    Views
    536

    Datasheet of DAC please.... 200MSPS? ...

    Datasheet of DAC please....


    200MSPS? Definitely need to see those specs for the DAC, this is 4+ layer PCB / impedance-controlled territory. How much of that 200MSPS
    are you needing?
  37. Just any fast-enough timer/counter hardware -...

    Just any fast-enough timer/counter hardware - various ways that could be implemented, but 18ns resolution means hardware
    only implementation (whether that's a peripheral inside an MCU or separate...
  38. Replies
    112
    Views
    7,209

    _socket_num and socket_num are entirely different...

    _socket_num and socket_num are entirely different things, note. This looks like the code has been updated without realizing
    it can be simplified. The zero test is to prevent multiple calls...
  39. Replies
    7
    Views
    293

    Yes. However this is not a band-limited...

    Yes.

    However this is not a band-limited sawtooth so it will have lots of spectral artifacts, but the standard Audio lib waveform
    generator has the same flaw. This thread might be interesting:...
  40. Replies
    27
    Views
    536

    At these speeds you have to consider whether the...

    At these speeds you have to consider whether the chip's pin drivers can actually drive hard enough
    for such fast signal edges. 3.3V logic signals are limited in risetime by the driver max current...
  41. Code please...

    Code please...
  42. A pulse stretcher won't measure anything, it just...

    A pulse stretcher won't measure anything, it just makes pulses long so they are easier to detect. You need
    a very high speed counter I think, or an analog circuit to integrate charge during the...
  43. Replies
    3
    Views
    171

    Yes, its basically 16 bit fixed point throughout...

    Yes, its basically 16 bit fixed point throughout the Audio library, so you have to manage the gain structure carefully. If it were floating point
    that would not be needed, but on some Teensy's it...
  44. Replies
    15
    Views
    275

    And what value potentiometer are you using?

    And what value potentiometer are you using?
  45. Does "read" mean "detect" or "measure the...

    Does "read" mean "detect" or "measure the duration of" or what? A simple pulse stretcher using a monostable might be enough.
  46. Yes, firstly threshold voltage is nothing to do...

    Yes, firstly threshold voltage is nothing to do with being on, its the point the device stops conducting
    at all.

    To be turned on with the rated on-resistance you look at the on-resistance...
  47. I think you just use capacitive coupling for...

    I think you just use capacitive coupling for this, as in this:
    https://www.intel.com/content/dam/doc/application-note/8255x-fast-ethernet-controllers-without-magnetics-appl-note.pdf

    Because...
  48. Darlingtons aren't useful at 5V as they lose...

    Darlingtons aren't useful at 5V as they lose about 1.1V

    The IRLZ44N is only rated down to 4V gate drive, so its not guaranteed to work reliably at 3.3V (many other MOSFETs
    are though, but they...
  49. Replies
    14
    Views
    257

    You need to declare the c[] array before the loop...

    You need to declare the c[] array before the loop so it exists after the loop, and the type is 'double', not 'Double'.
    An array variable is already a pointer so you just pass it straightforwardly -...
  50. The value is not critical, it needs to be high...

    The value is not critical, it needs to be high enough not to overload the output driving that line, and small enough to prevent noise pickup,
    something in the range 10k to 100k is commonly used for...
Results 1 to 50 of 332
Page 1 of 7 1 2 3 4