PaulStoffregen's latest activity

  • PaulStoffregen
    Try measuring the 3.3V voltage while the power is on the input parts are hot. Do not rely on ohms measurement. If the voltage is very low, only several mV, that's a sure sign the short is metal. Usually these problems can be fixed if you find...
  • PaulStoffregen
    I tried to look up the minimum pulse width needed for the GPIO interrupt hardware, but couldn't find it in NXP's documentation. But as a general rule of thumb, usually 2 clock cycles are needed because they almost always use a circuit that...
  • PaulStoffregen
    The ADC inside Teensy is far too slow for this type of narrow pulse. You will need to handle this as a 3V a digital signal. A voltage comparator is probably the best way, but TL714 is probably too slow. I'd recommend trying a faster chip, like...
  • PaulStoffregen
    I also have no understanding of the context here which makes answering difficult. (the reason I haven't replied to the latest questions) @rootwyrm - Have you actually connected the signals to your Teensy 4.0 or 4.1 and experimented yet? Maybe...
  • PaulStoffregen
    Try replacing all the wires carrying the USB signals with short lengths of real USB cable. Don't use ordinary hookup wire for D+ or D- anywhere, not even for short lengths. Even if all the wires are real USB cable, the use of non-USB connectors...
  • PaulStoffregen
    Well, this was just a guess. But it fits the facts you mentioned, that the code had worked on a previously used Teensy 4.1 but failed when you tried on a new Teensy 4.1. The uninitialized contents of emulated EEPROM would be a likely...
  • PaulStoffregen
    When you edit usb.c, first try adding any simple syntax error. Then click Verify. Arduino IDE should notice the file changed and recompile. Seeing the syntax error quickly confirms Arduino really is recompiling the code and you really are...
  • PaulStoffregen
    Earlier I believed you had cut a USB cable and soldered its wires directly to the pads on the bottom side of Teensy 4.1. I assumed that from words "not from a USB cable connected to the D+ / D- and GND pins". But in this photo, it is not a USB...
  • PaulStoffregen
    Just a guess, maybe one of those other functions does not like the scenario where INDEX_ADDRESS or DEVICE_ID_ADDRESS is a number like 255 (the uninitialized EEPROM value)?
  • PaulStoffregen
    PaulStoffregen replied to the thread digital input.
    The website for that sensor says the minimum power is 10 volts.
    • 1714468550477.png
  • PaulStoffregen
    PaulStoffregen replied to the thread digital input.
    Now I see how it should work. :) The LED and 300 ohm resistor should connect between the collector and 3.3V. When the optocoupler turns on the collector is pulled to GND by the NPN phototransistor. So for the LED to show on condition, connect...
    • 1714464303959.png
  • PaulStoffregen
    Posted on the website https://www.pjrc.com/rv-leveling-helper/
  • PaulStoffregen
    Posted on the website https://www.pjrc.com/ws2812b-led-controller/
  • PaulStoffregen
    I tried setting the edit time limit to 5 hours. Hopefully that gives enough time to fix typos or technical errors, but stops spammers from turning their odd but acceptable AI generated messages into obnoxious spam.
  • PaulStoffregen
    I'm not very familiar with Windows. I mostly use Linux. On Linux, certain characters are special and need quotes so the command line doesn't parse them and instead passes the info directly to the program. Maybe Windows command line is similar...
  • PaulStoffregen
    Maybe Arduino IDE is printing that error? Teensy software has only English language.
  • PaulStoffregen
    Maybe you could show us the exact error, as either copy & paste of the text, or a screenshot if the text can not be easily copied?
  • PaulStoffregen
    Spam is rising again. Reporting spam quickly really does help! If you see spam, please report it. Speed matters. Just writing "spam" in the report is fine, no need for more. Reports affect more than just 1 message. If the spammer has...
  • PaulStoffregen
    PaulStoffregen replied to the thread digital input.
    I don't understand your schematic. You said you are using "a Capacitive Proximity sensor". But on the schematic, I see only resistors, capacitors, diodes, a quad optocoupler, a connector, and net names that imply connection to other stuff we...
  • PaulStoffregen
    First check if your program has something like "while (!Serial)" in setup. This is common in most example programs, to wait for the Arduino Serial Monitor so you don't miss any Serial.print() info. But if left in your final code, it will just...
  • PaulStoffregen
    PaulStoffregen replied to the thread About expansion to RAM1.
    The solution is to add FLASHMEM to some of your code, so it doesn't use RAM1, and/or to add DMAMEM to some of your arrays so they are allocated in RAM2 rather than RAM1. RAM1 is faster than RAM2, and *much* faster than flash. But both RAM2 and...
  • PaulStoffregen
    4 blinks usually means an issue with the crystal. Might be a good idea to inspect that area for debris or leftover flux from soldering nearby pins.
  • PaulStoffregen
    If you don't find the solution, try taking some photos so we can actually see. Might help, might not. Worst case you waste just a few minutes to shoot photos and transfer (maybe resize) so they can be posted here. Many times on this forum a...
  • PaulStoffregen
    Maybe you meant input pin? With output pins, which you control with analogWrite(), you should already know the setting because your code set it. If you need to later have this info, just store it into a variable which you can later use. But to...
  • PaulStoffregen
    You might also consider using analogWriteFrequency() in setup(), so your PWM outputs are at the specific frequency you want. Details here: https://www.pjrc.com/teensy/td_pulse.html I see you wrote "written identically to pin 28 and pin 29". I...
  • PaulStoffregen
    I don't understand why you would call analogWrite() every time loop runs. The PWM output will continue updating indefinitely, so you need to call analogWrite() when you want to change the output. Likewise, why delay for 1 second? You'll only...
  • PaulStoffregen
    This really should work. Any chance the wire colors aren't matched up to the corresponding pins inside the cable? (for example, white and green really connected to GND and +5V)
  • PaulStoffregen
    Unfortunately, no. Nobody can really give a clear definitive answer about what happened, or even might have happened. First, we just don't know enough. We can't see what type of motor you're using. Maybe it's something very small like on this...
  • PaulStoffregen
    OctoWS2811 on Teensy 4 is probably the most complicated DMA of any library. You'd probably be better off reading the DMA code from a much simpler library, like WS2812Serial. To answer this specific question, 16K is the distance between each of...
    • 1714153880524.png
  • PaulStoffregen
    PaulStoffregen replied to the thread PWM Voltage Conversion.
    I don't understand the reluctance to use a proper 5V tolerant buffer chip. For 3 signals, you'd need 1 chip and 1 decoupling capacitor for good quality results. Seems better than using 6 parts for marginal quality waveforms.
  • PaulStoffregen
    PaulStoffregen replied to the thread PWM Voltage Conversion.
    This circuit has some limitations which may or may not be a problem. Understanding the issues can help you to anticipate whether it will work well enough, or if those limitations will cause problems. The main issue is the diode's forward...
  • PaulStoffregen
    Yes, this is expected behavior. If you leave any record queue active but your program doesn't remove the data, incoming audio quickly uses up the available memory. It is not a bug in the audio library. This is the way queues work.
  • PaulStoffregen
    I've committed a fix on github. https://github.com/PaulStoffregen/ShiftPWM/commit/4c25bfda72ac3cb99fc20ae7cb8c35aa8926e363 Sadly, this library isn't tested by my script that tries to compile all examples from all libraries because these...
  • PaulStoffregen
    If you want me to investigate, please post another complete program to demonstrate the problem. Even if the change from the code you showed in msg #5 is trivial, I need you to understand I have a long history of wasting time not able to...
  • PaulStoffregen
    For the sake of testing, I'd try allocating many more blocks, like 100. Then if you see your usage is in the 90s, you'll know one or more of the queues is hogging memory.
  • PaulStoffregen
    Try using AudioMemoryUsage() to monitor how many of the 10 audio memory blocks are used up. Or use AudioMemoryUsageMax() to check whether you have at any point used up all the memory. My guess, admittedly from only a quick glace at your code, is...
  • PaulStoffregen
    To configure the input pins, you'll need to write to the mux registers and also the select input registers. IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_02 IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_03 IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_04...
  • PaulStoffregen
    One small gotcha... before you access any of the GPT2 registers, enable its clocks by setting the CCM_CCGR0_GPT2_BUS and CCM_CCGR0_GPT2_SERIAL bits in the CCM registers.
  • PaulStoffregen
    Some pin mapping info which might help: GPT2_CLK is on pin 14 (AD_B1_02 mux = ALT8) GPT2_CAPTURE1 is on pin 15 (AD_B1_03 mux = ALT8) GPT2_CAPTURE2 is on pin 40 (AD_B1_04 mux = ALT8) - Teensy 4.1 only
  • PaulStoffregen
    Quick answers I believe the GPT timers might able to do this. In the reference manual, see Figure 52-2 on page 3015, and section 52.3.1 on page 3016. The GPT timers are also 32 bits wide, which is much simpler than dealing with only 16 bits...
  • PaulStoffregen
    I don't see any connection in this diagram between Teensy and the dual motor driver. Assuming there is indeed a connection for Teensy to control the motors, check the GND wire. Perhaps GND is not properly connected between them? And maybe that...
  • PaulStoffregen
    Usually when that happens to me its the wiring. On quick review looks like you have RST got to 3,3v so either have RST set to 255 or hook it up to pin 3. Looks like you have pin 3 going to one of the touch pins? I would start by not hooking up...
  • PaulStoffregen
    Each open source library has license terms which allow you to the use the code. Usually this can be found in the comments at the beginning of the code. Some have a separate license file. I need to emphasize the official word is in those...
  • PaulStoffregen
    Basically, luck. As I tried to explain on that other thread, the U2 chip is never meant to be desoldered and used this way. The behavior is undefined. It might work, might fail, might partially work, might be unreliable.
  • PaulStoffregen
    Does "bootloader chip from a teensy 4.1 dev board" mean you desoldered and reused the chip from an actual Teensy 4.1 circuit board, or you purchased this T4 bootloader chip? Either way, 2 blinks means the JTAG connection is not working at all...
  • PaulStoffregen
    Would love to show this on the website. Any chance for a photo showing the hardware connection with MicroMod and with Teensy 4.1?
  • PaulStoffregen
    Article posted on the website https://www.pjrc.com/debugging-with-visual-micro/
  • PaulStoffregen
    Was this circuit board ever built? Do you have any photos, especially any photo or video of the LEDs in use?
  • PaulStoffregen
    Quick followup on this old project... is it still in development, or was it replaced with Microcosmos?
  • PaulStoffregen
    Thanks for measuring the high-res sine wave! I've often idly wondered this. Turns out the linear interpolation on table lookup is pretty good. Would be interesting to know if the excessive Taylor Series approach make a difference with a higher...
Back
Top