Search results

  1. M

    SPI with 2 or 4 data lines?

    Thank you!
  2. M

    SPI with 2 or 4 data lines?

    Now I'm confused. GPIO1 or GPIO6 or GPIO6_PSR ? Why shifted 16 bits to the right, if the signal names are AD_B1_xx with xx = 00 to 15 ? Is this explained somewhere? Michael
  3. M

    SPI with 2 or 4 data lines?

    > Agreed, parallel mode is (probably) simpler. On Teensy 4.1 you can read all 16 bits with a single GPIO register if you connect the data pins to all the "AD_B1_xx" GPIO pins. What's the name of the register that must be read? Thanks, Michael
  4. M

    SPI with 2 or 4 data lines?

    Then I better use the 16-bit parallel interface. Thanks, Michael
  5. M

    SPI with 2 or 4 data lines?

    Which library must be used?
  6. M

    SPI with 2 or 4 data lines?

    Is it possible to use a SPI interface in Teensy 4.0 or 4.1 with 2 or 4 data lines? Are there any examples? I want to use the AD7606B which needs at least 2 data lines for full throughput. See page 37 in the datasheet...
  7. M

    Read multiple input pins simultaneously

    Thank you! Michael
  8. M

    Read multiple input pins simultaneously

    Is it possible to read multiple digital input pins on Teensy 4.0 simultaneously, for example an 8-bit port? If yes, which pins belong together to a port? Michael
  9. M

    random()

    Thank you for your answers, that was very helpful! Michael
  10. M

    random()

    What I wrote above was wrong. It seems random() gives only positive numbers from 0 to 2^31-1. random(4294967295) gives no compiler warning, but the numbers are always smaller than 2^31, always in the lower half of the uint32 range. My question is: How can I generate a full-range uint32 random...
  11. M

    random()

    When I use random(65535*65535) and move the mouse over "random", then it's shown that the type is uint32_t. However when compiling, I get an integer overflow warning. Why?
  12. M

    random()

    random() without any argument seems to give a random number in the range [-2147483648 to 2147483647]. How can I convert this number to an unsigned long in the range [0 to 4294967295]? Thanks, Michael
  13. M

    About the Teensy 4.0 3.3V limit.

    The absolute maximum ratings are specified in the data sheet: https://www.pjrc.com/teensy/IMXRT1060CEC_rev0_1.pdf On page 21: Input/Output Voltage range = OVDD + 0.3V, where OVDD is the I/O supply voltage. Michael
  14. M

    Assembly code listing

    Just found the solution myself. The upload port wasn't set correctly. Now it works.
  15. M

    Assembly code listing

    I was using Arduino IDE 1.8.19 and Teensyduino 1.57. I just installed Arduino IDE 2.1.0 and now I can see the assembly listing. But now I have a new problem. The code doesn't upload to the Teensy. I get this error message: Opening Teensy Loader... Memory Usage on Teensy 4.0: FLASH...
  16. M

    Assembly code listing

    I did try the Sketch->Export Compiled Binary option, but it did produce only a *.hex file.
  17. M

    Assembly code listing

    Back in the days of 8051 programming (many years ago) I did write time-critical interrupt routines either in assemby code, or I did program them in C and then checked the code in the assembly listing. Often it was possible to iteratively change the C code until the fastest possible assembly code...
  18. M

    44.1kHz or 48kHz timer interrupt

    thank you! Michael
  19. M

    PT8211 with irregular clocking signals (non I2S) from T4

    Where can I find the documentation for digitalWriteFast() ? Michael
  20. M

    44.1kHz or 48kHz timer interrupt

    It works. But where is this function documented? Thanks, Michael
  21. M

    44.1kHz or 48kHz timer interrupt

    Is it somehow possible to create a 44.1kHz or 48kHz timer interrupt with Teensy 4.0? The problem is that IntervalTimer.begin does only accept microsecond resolution. 20us --> 50000Hz 21us --> 47619Hz 22us --> 45455Hz 23us --> 43478Hz Michael
  22. M

    PT8211 with irregular clocking signals (non I2S) from T4

    I did only rename "saw" to "value". The pin definitions and setup are the same as in your code. Some unnecessary lines removed.
  23. M

    PT8211 with irregular clocking signals (non I2S) from T4

    I figured out that if you write only to the left channel, then the same signal comes out of both channels. If HALFCLKns is set to the lowest possible value 28, both output channels can be updated in about 1us: digitalWriteFast(WS,1); // write to left channel for (int i=15; i>=0...
  24. M

    How to initialize the 16-bit audio DAC?

    That looks interesting, will try it.
  25. M

    How to initialize the 16-bit audio DAC?

    It seems easier not to use the audio module and the audio library, but instead use a PWM output on Teensy 4.0 with 12 or 13 bit resolution, with a carefully designed low pass filter. I don't need more than 10kHz bandwidth at the output. What a pity that Teensy 4.0 has no built-in DAC. The DAC in...
  26. M

    How to initialize the 16-bit audio DAC?

    Is it possible with the audio library to have an interrupt routine running at 44.1kHz, so that inside this routine I can calculate the 16-bit value that's sent to the DAC?
  27. M

    How to initialize the 16-bit audio DAC?

    Hello, I'd like to know how the 16-bit DAC on the TEENSY4_AUDIO module must be initialized and how a 16-bit value can be written to the DAC. Are there any examples? I'm hopelessly lost with the documentation of the Teensy Audio Library and would prefer not to use this library. Thanks, Michael
  28. M

    Where is the documentation for math functions?

    Hi, I'd like to know where the math functions are documented. I found a list here: https://www.arduino.cc/reference/en/ But this list is incomplete. For example atan(), atan2(), log(), asin(), acos() are missing in the list, but they are available. I wonder what else functions exist. Thanks...
  29. M

    Teensy LC: Bug in documentation

    The sentence in the documentation says that the AREF pin (not the internal reference voltage) is 3.3V by default. That's clearly wrong. Without an external resistor, the AREF pin is 0V by default.
  30. M

    Teensy LC: Bug in documentation

    On this page https://www.pjrc.com/store/teensylc.html is written: "The AREF pin is used to set the analog input range. By default, AREF is 3.3V due to a resistor. External shunt-type reference chips may be connected for lower reference voltage." This is wrong. There is no resistor connected to...
  31. M

    Teensy LC: Bug in schematic

    No, the VUSB pad does not replicate the connector pad. The fuse is between the connector and the VUSB pad. The other three surface pads (GND, D+ and D-) replicate the connector pads, but VUSB doesn't.
  32. M

    Teensy LC: Bug in schematic

    Yes, there are two VUSB tags in the schematic and there are also two VUSB pads on the board. One is a surface pad on the back side, and the other is a through hole. They are connected to each other and the fuse is not between them. Are you sure that it's not a fuse that blows, but a PTC fuse...
  33. M

    Teensy LC: Bug in schematic

    There seems to be a bug in the schematic of the Teensy LC on this page: https://www.pjrc.com/store/teensylc.html The VUSB pad on the back side is not connected directly to the USB connector. It is connected to the VUSB pin which is behind the fuse. Question: How much current can an external...
  34. M

    Teensy LC, DAC

    On this page https://www.pjrc.com/store/teensylc.html is written: "The AREF pin is used to set the analog input range. By default, AREF is 3.3V due to a resistor. External shunt-type reference chips may be connected for lower reference voltage." But when I measure the voltage at the AREF pin...
  35. M

    Teensy LC, DAC

    Well, I have an example running with ADC and DAC, but I'm still unable to find any documentation for the functions. For example, there is a function analogReference(). Where is the documentation for this function, including the complete list of the possible arguments? If there exists no...
  36. M

    Teensy LC, DAC

    Where can I find the documentation for analogWriteResolution() and analogWrite() functions? The AREF pin is only an input, correct? Michael
  37. M

    Teensy LC, DAC

    Hello, where can I find a code example for the DAC on Teensy LC? What's the output voltage range? Does the DAC use the same reference voltage as the ADC? Is it possible to make the internal 2.56V reference available at an output pin? I mean not the DAC pin. Thanks, Michael
Back
Top