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

Search:

Type: Posts; User: Nominal Animal

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. 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...
  2. 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...
  3. 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...
  4. Replies
    13
    Views
    614

    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...
  5. (I am not ashamed to admit that I use K to remind...

    (I am not ashamed to admit that I use K to remind me which side is the cathode, and A to remind me which side is the anode, in a diode or a LED.)

    (I haven't found a good one for polarity yet. The...
  6. Replies
    13
    Views
    614

    For non-cryptographic work, I recommend using one...

    For non-cryptographic work, I recommend using one of the Xorshift variants; many of them are as random as Mersenne Twister, but much faster. In fact, my preferred one, using only the 32 high bits of...
  7. My ping-pong...

    My ping-pong test shows that Teensy 4.0 has issues at high-bandwidth 1024-byte messages, but it does not tell us where the problem is.

    When you suggested testing transfers in just one direction...
  8. No worries! Anyway, here is the Teensyduino...

    No worries! Anyway, here is the Teensyduino sketch for Teensy 4.0 with USB Serial:


    // SPDX-License-Identifier: CC0-1.0

    #define SEED 1
    #define SIZE 512

    static uint64_t state;
    static...
  9. Ah, right; with 512 byte packets, even this old...

    Ah, right; with 512 byte packets, even this old HP Pavilion 11 x360 can do 270 Mbits/s (34 Mbytes/s) locally. I bet an i5/i7 or a relatively recent AMD can do >480Mbits/s locally with 512 byte...
  10. @KurtE, @defragster -- If you happen to have a...

    @KurtE, @defragster -- If you happen to have a fast-ish Linux machine (virtual machine is perfectly okay), you might wish to test the following program pair. I finished these first; I'll implement...
  11. Replies
    3
    Views
    137

    I agree with Frank B. It turns out it is...

    I agree with Frank B.

    It turns out it is usually easier to construct the value using integer types, and convert it to double when needed for computation. One would use something like the...
  12. Me too, that's why I do tests using raw termios...

    Me too, that's why I do tests using raw termios on Linux.


    Excellent idea; doing one-way tests will tell us a lot more about exactly what is happening.

    Unfortunately, I just noticed I have a...
  13. No, there are odd issues even with C code that...

    No, there are odd issues even with C code that can easily handle the full USB bandwidth (using termios in Linux), but keels over with Teensy 4.0.

    It looks like a "lockup" of some sort when either...
  14. Replies
    12
    Views
    401

    I've used an awk scriptlet to do this. While you...

    I've used an awk scriptlet to do this. While you can use the C preprocessor (avr-cpp in Arduino, arm-none-eabi-cpp in Teensyduino) to do all preprocessing, it is easier to write a simple awk script...
  15. Replies
    2
    Views
    456

    Do you need to generate the sample clock also, or...

    Do you need to generate the sample clock also, or just the -0.3V/+0.3V sync pulses/pulse pairs?

    If we look at just the sync pulse (pair) itself, starting at 0V (idle):

    The output drops to...
  16. Replies
    795
    Views
    32,631

    I've been tickled pink at being recognized as...

    I've been tickled pink at being recognized as potentially useful beta tester :o -- Thanks!
    But as of now, I have my hands full :( (with stuff involving 4.0).

    I will be getting a Teensy 4.1 later...
  17. Replies
    4
    Views
    226

    To expand on what Pete (el_supremo) already...

    To expand on what Pete (el_supremo) already answered, the Arduino sketches are actually just a subset of C++ compiled using GCC, with some autogenerated code (like function prototypes, which may look...
  18. Replies
    5
    Views
    417

    Teensy 4 is not an 8-bit AVR, it is a 32-bit ARM....

    Teensy 4 is not an 8-bit AVR, it is a 32-bit ARM. Are you sure your firmware building tool will work for Teensy 4?

    Teensy 4 does not have 8-bit ports (PORT A..F bit 0..7), it has 32-bit GPIO...
  19. Replies
    17
    Views
    620

    Perhaps micros() and millis() could be...

    Perhaps micros() and millis() could be implemented on top of a GPT running at 1 MHz (using the peripheral clock, ipg_clk), so its counter is directly in microseconds, and wraps around every ~ 4295...
  20. You won't have much accuracy at all doing it that...

    You won't have much accuracy at all doing it that way.

    I would recommend you use a MAX31865 instead, with its voltage or ground switched via a transistor or MOSFET on demand by Teensy.

    You can...
  21. Yes, it does work. This is how resistive...

    Yes, it does work. This is how resistive four-wire touch panels are read as well: a pair of pins is used as outputs, and the coordinate along that axis is read from either of the two other pins;...
  22. For what it is worth, I agree. @PaulStoffregen,...

    For what it is worth, I agree. @PaulStoffregen, there is definitely something odd here.

    In cores/teensy4/analog.c:analog_init(), the ADC1_CFG = mode | ADC_HC_AIEN | ADC_CFG_ADHSC; line is...
  23. FWIW, here...

    FWIW, here is the EasyEDA project for the SAMD51 blitter board. While it can be used standalone, I really am envisioning it more like the boards used on most display modules their flat flex cable is...
  24. The helper SAMD51J20A does have 256k of RAM,...

    The helper SAMD51J20A does have 256k of RAM, which is enough for tiles, sprites and fonts, or for a 320240 framebuffer. Since it is Arduino-programmable -- basically the same as Adafruit Feather M4...
  25. 16-bit parallel ILI9341/ILI9488/etc. displays with Teensies

    Just out of technical interest, I've looked at a few different possibilities of connecting cheap 240320/320480 TFT display modules using 16-bit parallel connection to various Teensies.
    The...
  26. Correct. (You could replace the division by a...

    Correct.

    (You could replace the division by a power of two (2, 4, 8, 16) by a multiplication with the exact reciprocal (0.5f, 0.25f, 0.125f, 0.0625f). I've actually expanded on this in this...
  27. Replies
    5
    Views
    341

    Since I happen to have both a Teensy 4 and an...

    Since I happen to have both a Teensy 4 and an ADuM3160 USB isolator, I tested it.

    Teensy 4 works and programs fine with the USB isolator in 12 MBit/s (full speed) mode; no changes necessary. ...
  28. First one is exponential filtering with...

    First one is exponential filtering with coefficient 0.5, the second is windowed filter with 2 sample window. They are equally valid.

    How to define "accuracy"? The main purpose is to smooth out...
  29. Replies
    5
    Views
    358

    You might find Mark Allen Weiss...

    You might find Mark Allen Weiss's Data Structures and Algorithm Analysis (either second edition in C, or third edition in C++) interesting and useful. You can find the second edition online if you...
  30. Replies
    5
    Views
    358

    Preprocessor only does math in #if clauses, but...

    Preprocessor only does math in #if clauses, but the compiler does integer arithmetic on literals at compile time. (For floating-point math, it depends on options used, and whether the expression has...
  31. Note that there is a technical issue...

    Note that there is a technical issue to cleanly solve this.

    As you noticed, .begin() and .end() don't actually do anything; the reason I used them is more to do with us human programmers than...
  32. Teensyduino: Add data_lost = Serial.reset(flags)?

    Hi @PaulStoffregen, @FrankB, and others working on the nitty-gritty details of USB Serial in the Teensyduino cores,

    I'd like to propose a new member function, .reset(), with an optional flag, that...
  33. Okay, it was much simpler than I thought. We...

    Okay, it was much simpler than I thought. We just use Serial.begin() when we first notice an userspace application has connected (by noticing that (Serial) is now true), and when (Serial) turns...
  34. Hopefully this will explain what, why, and how...

    Hopefully this will explain what, why, and how that happens.

    First, let's create a simple sketch, a variant of the Blink example, serial-blink.ino:


    #define LED 13

    void setup() {
    ...
  35. Perhaps this illustration of 100 samples (a sine...

    Perhaps this illustration of 100 samples (a sine wave plus noise) gives you some idea:
    19084
    The same data, but with different coefficient and window size:
    19085
  36. No, just once (gauge_value). Think of...

    No, just once (gauge_value).

    Think of gauge_shown as the needle in the gauge, dragged around by the sampled gauge_value , but limited to a maximum rate of change.



    If the sampled value...
  37. Let's say you have the following variables: ...

    Let's say you have the following variables:



    float gauge_value; /* Actual gauge value measured; changes rapidly */
    float gauge_shown; /* Displayed gauge value */

    #define GAUGE_MAX_UP ...
  38. Using #include "usb_serial.h" #define ...

    Using


    #include "usb_serial.h"
    #define MSGLEN 512

    static unsigned char msg[MSGLEN];
    static uint32_t msg_read;
    static uint32_t msg_written;
  39. But.. are you sure you are using POSIX read() and...

    But.. are you sure you are using POSIX read() and write() correctly?

    A very common error I see is using if (read(ttyfd, buffer, bytes) < 0) error(); , assuming that read() will always read the...
  40. Yes. I would scavenge (cut) an existing cable...

    Yes. I would scavenge (cut) an existing cable with the desired connector, solder the wires directly to the Teensy 4.0, and use UV curing glue or epoxy to help keep the wires in place.

    I'm not...
  41. BTW, KurtE is absolutely right. It always makes...

    BTW, KurtE is absolutely right. It always makes sense to look at the whole, and consider which details matter.

    The cases where a double frame buffer would be useful are relatively rare. ...
  42. Consider the case where sending/writing the frame...

    Consider the case where sending/writing the frame buffer to the display takes t1 milliseconds, and it takes the microcontroller t2 milliseconds to redraw everything in the framebuffer.

    If you use...
  43. For a keypad, I recommend the diode approach. ...

    For a keypad, I recommend the diode approach.

    If you have NM keys, you need N+M I/O pins: N outputs and M inputs. You can use an expander, shift register, counter etc. for the N outputs, if you...
  44. True; apologies for hijacking the thread, KurtE....

    True; apologies for hijacking the thread, KurtE.

    Back on topic, looking at the datasheet, the signals, timing, and command set seems very similar to ILI9341/ILI9488 (noting that I am mostly...
  45. That also makes porting (between displays)...

    That also makes porting (between displays) easier.

    For example, if one wants to use ILI9341/ILI9488 in 9-bit parallel mode (for 18-bit color, or 6 bits per component), one can use the...
  46. The main difference between SPI and parallel...

    The main difference between SPI and parallel transfer is the maximum display frame rate one can achieve. SPI is certainly simpler: fewer wires, easier to get going, libraries already exist. Simpler...
  47. I don't know what my affliction is called, but me...

    I don't know what my affliction is called, but me fail English often in the "tone" or subtext, and spelling mistakes makes it hard for me to read/understand.

    When I encounter mistakes like...
  48. ILI9488_t3 supports the palette method I...

    ILI9488_t3 supports the palette method I described above, although it calls it pallet :rolleyes:

    It does support DMA too, by precalculating the data sent via SPI into a buffer, then using a DMA to...
  49. To simplify a bit, the DMA engine is a separate...

    To simplify a bit, the DMA engine is a separate unit in the microcontroller, that transfers 8-bit bytes or 16- or 32-bit words, while the processor itself is working on something else.

    ILI9341,...
  50. On the Teensy 4.0, although there aren't 16 pins...

    On the Teensy 4.0, although there aren't 16 pins available on any I/O port (closest is AD_B1, which has 0-3, 6-11, 14-15), bit-banging them will do just fine due to the 600 MHz system clock, because...
Results 1 to 50 of 189
Page 1 of 4 1 2 3 4