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.00 seconds.

  1. 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.
  2. Replies
    1
    Views
    6

    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...
  3. 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...
  4. Replies
    1
    Views
    112

    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...
  5. Replies
    1
    Views
    111

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

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

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

    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.
  8. Replies
    1
    Views
    57

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

    Do you have a link to the datasheet for this encoder?
  9. 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.
  10. 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 =...
  11. 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...
  12. 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.
  13. 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...
  14. 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...
  15. 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) {...
  16. 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...
  17. 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...
  18. Replies
    7
    Views
    282

    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...
  19. 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...
  20. 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...
  21. 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.
  22. Replies
    27
    Views
    490

    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...
  23. 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...
  24. Replies
    27
    Views
    490

    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?
  25. 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...
  26. Replies
    102
    Views
    6,657

    _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...
  27. Replies
    7
    Views
    256

    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:...
  28. Replies
    27
    Views
    490

    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...
  29. Code please...

    Code please...
  30. 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...
  31. Replies
    3
    Views
    158

    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...
  32. Replies
    15
    Views
    250

    And what value potentiometer are you using?

    And what value potentiometer are you using?
  33. 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.
  34. 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...
  35. 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...
  36. 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...
  37. Replies
    14
    Views
    238

    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 -...
  38. 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...
  39. I should add that every logic chip needs this,...

    I should add that every logic chip needs this, always. Its purpose is to decouple the supply at high speed, when the
    power supply traces are seen as mainly inductive and unable to keep a stiff...
  40. Replies
    4
    Views
    200

    20 quid for a manufacturers module? That's dirt...

    20 quid for a manufacturers module? That's dirt cheap - professional evaluation boards are usually far more expensive, and this is
    basically an evaluation board.

    One thing I'd be wary of is the...
  41. Not from eBay are they?

    Not from eBay are they?
  42. As poeple have said, you don't have pullup(s) for...

    As poeple have said, you don't have pullup(s) for the buttons. A single pullup resistor to 3.3V on the output of the
    multiplexer might be all you need?

    CMOS logic inputs shouldn't be left...
  43. Replies
    14
    Views
    238

    Well that's what the datasheet says, which I...

    Well that's what the datasheet says, which I checked. Its very rare to see active-high chip selects in fact, a hangover from
    TTL conventions where selects and output enables were usually active...
  44. NPN transistor needs no more than about 0.7V at...

    NPN transistor needs no more than about 0.7V at the base to turn on, I don't know where you got that idea
    about needing 5V. You normally take the transistor output current, divide by 10, set the...
  45. Replies
    2
    Views
    119

    Most 3mm LEDs will be rated 20mA maximum, so 30mA...

    Most 3mm LEDs will be rated 20mA maximum, so 30mA is possibly bad for them. Modern hyperbright LEDs need
    a lot less than 20mA to be bright enough for indoor use... Perhaps your 3mm LEDs are only...
  46. Replies
    14
    Views
    238

    The chip selects are active low, so I think need...

    The chip selects are active low, so I think need to be initilized HIGH, presuming that the begin() method knows
    what its doing. It should handle such details for you. begin() returns success, not...
  47. I think the problem is you are trying to regulate...

    I think the problem is you are trying to regulate 5V down to 5V ? Sounds like it. Doesn't work like that, a linear
    regulator drops about 2V in operation, so you'd need an external supply >= 7V to...
  48. Replies
    10
    Views
    164

    This thread should explain things:...

    This thread should explain things: https://forum.pjrc.com/threads/57269-I-can-t-seem-to-use-all-of-the-Teensy-4-0-s-memory
  49. You may have crashed the SDcard. An SDcard is...

    You may have crashed the SDcard. An SDcard is just a microcontroller with more flash...
  50. Replies
    8
    Views
    2,656

    I-squared-t is a fuse rating - I-squared is...

    I-squared-t is a fuse rating - I-squared is proportional to the power dissipated, so I-squared-t is a measure of the energy
    needed to melt the fuse in terms that the rest of the circuit can...
Results 1 to 50 of 320
Page 1 of 7 1 2 3 4