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

Search:

Type: Posts; User: Nominal Animal

Page 1 of 5 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    254

    No, I just misunderstood you. I thought that by...

    No, I just misunderstood you. I thought that by "output looks different", you meant between the two functions in that listing.
    I didn't realize you meant compared to when using different compiler...
  2. Replies
    17
    Views
    254

    Frank B: The difference is that foo1() verifies i...

    Frank B: The difference is that foo1() verifies i is between 1 and 11, inclusive, and subtracts one from it so that the mask always has the least significant bit set. 2×1451 == 2902 == 0xb56, so no...
  3. Replies
    17
    Views
    254

    Manu: Correct. The test is ((1

    Manu: Correct.

    The test is ((1 << i) & mask) and literally means, "if the i'th bit in mask is set, then...".

    To construct the mask, you take each acceptable value v, shift 1 (value one) left by...
  4. Replies
    17
    Views
    254

    i is assumed to be a number between 0 and 31. ...

    i is assumed to be a number between 0 and 31. Each possible value corresponds to a single bit, bit i.
    For example i=0 corresponds to the least significant bit (bit 0), and i=31 to the most...
  5. It's simpler than it seems. The English...

    It's simpler than it seems. The English Wikipedia Noise shaping article contains a very good Operation chapter, describing the basic idea behind noise shaping.

    Essentially, whenever you produce...
  6. Using SPI, you could also use DOUT (pin 7 or pin...

    Using SPI, you could also use DOUT (pin 7 or pin 11) with a 16-bit write (0b0101010101010101 = 0x5555 = 21845, or 0b1010101010101010 = 0xAAAA = 43690), with the SPI clock double the desired...
  7. You can always cut the VIN-VUSB trace at the...

    You can always cut the VIN-VUSB trace at the back, and use two Schottky diodes with their cathodes connected to the VIN pin, one anode to VUSB pin, and one anode to your external power. That way...
  8. Sure. Why do we multiply by 32768? Because the...

    Sure.

    Why do we multiply by 32768? Because the function that applies the FIR filter is arm_fir_fast_q15(), and that uses Q15 fixed point format, which has a sign bit and 15 fractional bits.
    The...
  9. I haven't seen any magjacks that'd expose the...

    I haven't seen any magjacks that'd expose the RJ45 side pins for TVS use (LC03-3.3BTG).

    If you look at say Abracon ARJM11 104 model RJ45 with magnetics – noting that compared to TI tidues1a...
  10. I'd use a 74LCV1T45...

    I'd use a 74LCV1T45 in say SOT-23 (TI SN74LVC1T45DBV*) for this, with pin 1 (VCCA) connected to Teensy 3.3V, pins 2 (GND) and 5 (DIR) to ground, pin 3 (A) to Teensy input pin, pin 4 (B) to LBO, and...
  11. I have no idea which tool Paul Stoffregen used,...

    I have no idea which tool Paul Stoffregen used, but the sources include screen captures.

    The FIR filter coefficients are in signed fixed-point 16-bit format. The actual coefficient values are 21...
  12. You're welcome! And sorry, I didn't realize...

    You're welcome!

    And sorry, I didn't realize you only needed to know the resistor sizes. Me fail English...

    Another option is to contact BuyDisplay/EastRising at...
  13. You'll want the 4-wire serial mode (easier SPI...

    You'll want the 4-wire serial mode (easier SPI mode, with Chip Select (CS), Data (MOSI/DO), Clock (CLK), and the fourth pin is a generic I/O pin that determines Command/Data mode), right?

    For...
  14. Are you talking about this one...

    Are you talking about this one, or some other module?
    EastRising/BuyDisplay has a LOT of different modules, so it is very important to be precise about which product you're talking about.
  15. The original FAT filesystem only supports file...

    The original FAT filesystem only supports file names with at most 8 characters, followed by a dot, followed by at most 3 characters.

    The way Windows added support for longer file names is via...
  16. Replies
    37
    Views
    5,130

    Thanks, vjmuzik! I know exactly why that...

    Thanks, vjmuzik! I know exactly why that happens. Indeed, it is very similar to what happens on Firefox; just with a much more noticeable delay.

    I think I'll have to do a test page with sixty or...
  17. Replies
    37
    Views
    5,130

    Yup, no worries; I can definitely understand why...

    Yup, no worries; I can definitely understand why the IT folks said that. (I used to be one. I don't use Chrome either, and have a completely fake/dedicated email address to use with Google stuff –...
  18. Replies
    37
    Views
    5,130

    Thanks a lot, Mark! I think replacing the bullet...

    Thanks a lot, Mark! I think replacing the bullet character with a small image would help with that cursor issue. You don't happen to use Chrome, do you? (Although that version of Edge already uses...
  19. Replies
    37
    Views
    5,130

    I have played with various ways to implement the...

    I have played with various ways to implement the interactive pinout card on a self-contained web page, but most approaches feel too clunky for me; that's why the long delay. However, I finally found...
  20. Replies
    42
    Views
    4,386

    I'm just glad to be of help. I've got another...

    I'm just glad to be of help. I've got another project going on – Teensy 4.0 and 4.1 interactive pinouts in a browser – so I'll concentrate on that for now. If you'd like me to try and find the bug...
  21. Replies
    42
    Views
    4,386

    As far as I can tell, we hit the kernel bug when...

    As far as I can tell, we hit the kernel bug when Teensy resets, and there is still data begin sent to the Teensy. If we could ensure the reset packet is the last one we try to send, immediately...
  22. Replies
    42
    Views
    4,386

    It's the same kernel use-after-free bug. When...

    It's the same kernel use-after-free bug. When the Teensy resets, some of the URB sent from the host to the Teensy need to be canceled. (acm_kill_urbs() in the oops, in this case.)
    Like I linked to...
  23. Replies
    42
    Views
    4,386

    To me, it looks like an actual Linux kernel bug,...

    To me, it looks like an actual Linux kernel bug, that occurs when an USB URB is canceled (because the device reset or vanishes).

    There is a relatively recent possibly related bug report on the...
  24. If you are referring to the 32-button limit per...

    If you are referring to the 32-button limit per USB Joystick, I recommend making your Teensy an USB Keyboard + Joystick pair, with the extra buttons producing standard keypresses.

    This thread has...
  25. Replies
    4
    Views
    735

    The effects in instruction timing (for Cortex-M4,...

    The effects in instruction timing (for Cortex-M4, PDF) you are seeing is a result of pipelining instructions within the Cortex-M4 core itself; i.e., at the lowest hardware level in the...
  26. (I haven't found any, and can't even find...

    (I haven't found any, and can't even find instruction timings for ARMv7 or FPv5 used on the i.MX RT1062 on Teensy 4.0 and 4.1.
    As far as I know, one would have to microbenchmark the various...
  27. Floats (Binary32) have 23 bits of precision, but...

    Floats (Binary32) have 23 bits of precision, but a 254-bit range.
    32-bit integers have 32 bits of precision and a 32-bit range, of course.
    If the absolute maximum signal range is known, then 32-bit...
  28. For that particular case, yes. On 32-bit...

    For that particular case, yes.

    On 32-bit microcontroller, it makes sense to use the 32-bit filter implementation only.
    On 8-bit microcontrollers, it makes sense to use the 16-bit filter if it...
  29. In C (as opposed to C++), one can use the...

    In C (as opposed to C++), one can use the following pattern. First, filter16.h:


    #if !defined(FILTER_NAME)
    #error Define FILTER_NAME as the name of the filter.
    #elif...
  30. Note: It looks like the state has to be an...

    Note: It looks like the state has to be an exact-width type (so uintN_t and not uint_fastN_t), as any extra bits will mess up the modulo arithmetic.

    The 16-bit state is intended for input samples...
  31. Do ignore my post #7: when I wrote that, I was...

    Do ignore my post #7: when I wrote that, I was obviously confusing a sliding window filter with the exponential moving average. (I'd edit it to correct it, but the grace period is over.)


    I...
  32. Here's a simple Python3 test bench anyone can...

    Here's a simple Python3 test bench anyone can experiment with:


    from random import Random
    from math import sin, pi

    class Source:
    __slots__ = ('prng', 'phase')

    def __init__(self,...
  33. Perhaps that was your intention, but fact is, the...

    Perhaps that was your intention, but fact is, the C++ implementation includes the rounding operation.

    Code to implement the above is different: you need to calculate average in fixed point as...
  34. Eh, what? I was describing a mathematical...

    Eh, what? I was describing a mathematical formula, not suggesting code.

    There is an important distinction here, by the way.

    The often used mathematical form

            state = (1 -...
  35. Exponential decay filtering,         average =...

    Exponential decay filtering,
            average = C·sample + (1-C)·average
    (where C is a real coefficient smaller than 1) is different to exponential moving average.

    Their main difference is that...
  36. No, OP's code is not right. A correct...

    No, OP's code is not right. A correct implementation would be


    constexpr int_fast16_t fractional_bits = 2;
    int_fast16_t heading = 0;

    int_fast16_t average_heading(int_fast16_t sample)
    {
    ...
  37. It is a common programming pattern for "animator"...

    It is a common programming pattern for "animator" functions to take a number as a parameter, describing the progress along the animation.

    However, looking at the code, neither drawRunAnim() nor...
  38. Replies
    37
    Views
    5,130

    Those are literally the same images;...

    Those are literally the same images; teensy41-sides.html links to the ones hosted here.


    True. I was thinking of the case when considering a pin on one side, and having to connect it from the...
  39. Replies
    37
    Views
    5,130

    OK! The first test is at...

    OK! The first test is at https://nominal-animal.net/teensy41/teensy41-pins.html, and the turning test at https://nominal-animal.net/teensy41/teensy41-sides.html.

    To repeat, the idea is that while...
  40. Replies
    37
    Views
    5,130

    Here's what I meant: 21007 saved as...

    Here's what I meant: 21007 saved as teensy-sides.html .
    (I realized I could make the SVG canvas a standard size, and reference the pin locations to that, then scale and rotate the JPEG images to...
  41. Replies
    37
    Views
    5,130

    I mean, if I add a button that changes the side...

    I mean, if I add a button that changes the side of the board shown –– and yes, pin positions will change, and effectively left and right side labels etc. swap places –– the image jumps, because the...
  42. Replies
    37
    Views
    5,130

    I know, defragster; the issue is that it is...

    I know, defragster; the issue is that it is slightly different size to the back one, so swapping them in place creates a jarring "jump" effect.
    I'd like big enough pictures I could rotate and scale...
  43. If draw_state is some unsigned integer type, then...

    If draw_state is some unsigned integer type, then (draw_state >> 3) == (draw_state / 8), and ((draw_state & 7) == (draw_state % 8)) (modulo, i.e. remainder if divided by 8).


    draw_state │...
  44. Replies
    37
    Views
    5,130

    Does anyone have higher-resolution front and back...

    Does anyone have higher-resolution front and back images of Teensy 4.1? I don't have one (yet), so I can't take my own pics either.
    I'd like to crop/rotate/scale them so that they match, and make...
  45. Replies
    37
    Views
    5,130

    I was too lazy to add more than the GND and SPI1...

    I was too lazy to add more than the GND and SPI1 pins, but at least you can see how this would work.
    I rotated https://forum.pjrc.com/teensy41_2.jpg, cropped it, and saved as a 199×704 pixel JPEG...
  46. Replies
    37
    Views
    5,130

    You know, I'd be happy to try and whip up an...

    You know, I'd be happy to try and whip up an example interactive page (client-side/browser only, will work fine even if saved as a local file) to show the different options, with tooltips/rollovers...
  47. Unfortunately, like I already mentioned most of...

    Unfortunately, like I already mentioned most of the motor controller drivers (including DRV8825) and even CNC/3D printer boards like SmoothieBoard use a common ground for motors and logic.

    The...
  48. There is no issue, as long as you explicitly...

    There is no issue, as long as you explicitly specify which byte order you use in the transfers.

    On some host hardware architectures, accessing an unaligned float may not work, and byte order...
  49. Ground potential difference (and thus a ground...

    Ground potential difference (and thus a ground loop) is a likely culprit.

    A simple fix is to get yourself a cheap ADuM3160-based USB isolator between Teensy and the host computer. It will limit...
  50. Replies
    14
    Views
    2,975

    I mean 3 distinct APIs. Whether you want it all...

    I mean 3 distinct APIs. Whether you want it all in one library, or split the crypto hash to a separate one, I do not know.

    With a tested ISAAC-based PRNG, I'd be happy with a single one.

    The...
Results 1 to 50 of 235
Page 1 of 5 1 2 3 4