Search results

  1. J

    What happens if a Teensy 4.1 is powered via Vin and USB ast the same time?

    My understanding is that it may cause damage to a connected device. That said, since my original post, I had done this literally tens of times and the USB port on the PC was never affected.
  2. J

    Teensy 4.1 PSRAM Problems: some saved array elements set to zero.

    Thank you. I am testing the following per your message: arm_dcache_flush(zeroDistArrChr, sizeof(zeroDistArrChr)); It seems to be working. Thanks again for your help. There was no way I would have been able to figure this one out!
  3. J

    Teensy 4.1 PSRAM Problems: some saved array elements set to zero.

    Thank you @defragster. I have been restarting after 10 seconds but I can wait as long as is needed. How long should I wait before restarting?
  4. J

    Teensy 4.1 PSRAM Problems: some saved array elements set to zero.

    I am using an 8MB PSRAM chip with a Teensy 4.1. I have done the memory test and the chip passed. From an earlier post, apparently only character arrays can be stored in PSRAM. As I need to save an array of integers, I am using the code below. After saving the values, I then checked the...
  5. J

    Crashes with PSRAM

    Thanks you @AndyA.
  6. J

    Crashes with PSRAM

    Thank you @AndyA. My strings are all constant length. Also, 8MB is so large for my needs.
  7. J

    Crashes with PSRAM

    I will add code that converts my string array to an array of character array so I can store it in PSRAM. My knowledge of Arduino strings is limited so I will do some reading on it. Thank you Paul and @defragster.
  8. J

    Crashes with PSRAM

    I meant that my board has the PSRAM chip installed. When using const int BUFFER_SIZE = 200; EXTMEM String circularBuffer[BUFFER_SIZE]; or const int BUFFER_SIZE = 200; String circularBuffer[BUFFER_SIZE]; The code works. When const int BUFFER_SIZE = 250...
  9. J

    Crashes with PSRAM

    Thank you Paul. Did you mean with EXTMEM?
  10. J

    Crashes with PSRAM

    I have a Teensy 4.1 and added an 8 MB PSRAM chip and it passed the memory test. In my sketch, I am using the PSRAM memory to save a String array: const int BUFFER_SIZE = 200; EXTMEM String circularBuffer[BUFFER_SIZE]; This compiles fine with the following memory usage...
  11. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you @defragster. I made the change but there is no difference so it is probably not called by my code. Do you think using UDP may help? Thanks.
  12. J

    Interfacing to a high throughput Ethernet Sensor

    Hello @defragster, Please forgive my newbie question. Should I be using a EthernetUDP instead of EthernetClient client? If I continue to use the EthernetClient, how do I use EthernetFrame.setReceiveQueueSize(size)? I could not find any code examples. Thanks again.
  13. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you very much @defragster. I will try it.
  14. J

    Interfacing to a high throughput Ethernet Sensor

    I wrote the attached code to interface to that sensor. The code is a modified example from the QNEthernet library. As a way to check for consistent operation, I calculated the time between each update. It should be about 7 ms. However, as you can see from the attached trace, every 10 updates...
  15. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you. Definitely worth investigating.
  16. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you @clinker8 I have no objections to UDP. I am just not sure if the option is available…
  17. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you! This is encouraging news. The QNEthernet library is what we are using due to its stability. I realize that TCP is a bit more "wordy" than UDP but there is some hope in that we only need to read continuously for about 5 seconds each time. So this in combination with temporary...
  18. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you @defragster for taking the time to read the document. You are correct, the data is way more than 4000 bytes/sec. I estimated this number from a PC DLL implementation but it is incorrect. Each reading is a unique message. Basically, the sensor sweeps/scans (in 2D) 150 times a...
  19. J

    Interfacing to a high throughput Ethernet Sensor

    Thank you @defragster. The device is a rotating laser which sweeps from 0 - 270 degrees at 150 Hz. The angular resolution is 0.75 degrees. So, for every 0.75 degrees between 0 - 270, the sensor outputs the angle and its associated distance. So basically, every scan has 360 distances (every...
  20. J

    Interfacing to a high throughput Ethernet Sensor

    I have an Ethernet sensor which outputs about 4000 bytes per second continuously. Can I read from this sensor using a Teensy 4.1? Reading and deciding needs to be done in real-time. Thanks in advance for your help.
  21. J

    Teensy 4.1 with CANBUS adapter and flexcan t4 - no CAN data stream?

    @Taymar I am not using an RS232 plug but the resistor needs to be between the Can H and Can L lines on the Teensy side. In my installation, I am using a Waveshare Can module connected to my Teensy. So the resistor is between the Can H & L lines of the Waveshare module.
  22. J

    Teensy 4.1 powered from both the USB cable and VIN.

    Thank you very much PaulS, defragster and Bricomp or the detailed answers. If I use 2 Schottky diodes, which diode?
  23. J

    Teensy 4.1 powered from both the USB cable and VIN.

    I have a board with a Teensy 4.1 that is powered by a 5VDC power supply to VIN. However, I have been upgrading the firmware through the Teensy's USB (while also powered from VIN) numerous times without a problem .... I understand that it is not recommended. But what may happen to the Teensy...
  24. J

    Teensy 4.1 with CANBUS adapter and flexcan t4 - no CAN data stream?

    It does not hurt to swap the H & L lines as PaulS is recommending. On the 120 Ohm issue, the resistor needs to reside on both sides per the link I sent before .... In my case, the circuit was working at lower speeds until I raised the speed to 500 Kb where it stopped working. The 120 Ohm...
  25. J

    Teensy 4.1 with CANBUS adapter and flexcan t4 - no CAN data stream?

    I had a similar issue. The library can work at speeds of 1000 Kb but I am using 500 Kb. The reason you may not be getting an output from the bus was resolved in my case my adding a 120 Ohm resistor across the Can H and L lines. Most Can interfaces will have the resistor on the sensor side but...
  26. J

    Teensy 4.1: Dealing with Base64 Strings - handling and maximum length?

    Thank you very much Paul. This code is very helpful. I was not aware that one can add memory to the Teensy 4.1. I prefer to read the entire stream because I need to extract some limited information from it before re-sending it to another TCP client. I estimate my String to be a maximum of...
  27. J

    Teensy 4.1: Dealing with Base64 Strings - handling and maximum length?

    Thank you. I did not realize that one can stream directly without first saving the String. So, in this case, one would send each byte as it is received? Is there any example code? Thanks again for your time.
  28. J

    Teensy 4.1: Dealing with Base64 Strings - handling and maximum length?

    I have a PC application which acts as a TCP Client. Periodically, it sends a Base64 String to a TCP server. It is a long string because it contains an image. I can reduce the size of that string by reducing the image resolution. I would like to use a Teensy 4.1 to act as the TCP Server...
  29. J

    Detecting Axles using a Teensy 4.1

    Thank you @BriComp. Yes, we sue that in the US too but it is bulky, cumbersome and is only for a temporary installation.
  30. J

    Detecting Axles using a Teensy 4.1

    Thank you. Yes, those are called axle sensors. They are expensive and require embedding in the asphalt. I need something simpler ….
  31. J

    Detecting Axles using a Teensy 4.1

    I would appreciate advice on creating an axle sensor using a Teensy 4.1 connected to a sensor. Basically, I need to detect when a wheel of a vehicle rolls over a thin/narrow aluminum strip which is glued to the roadway and placed perpendicular to the direction of traffic. The system needs to...
  32. J

    Teensy 4.1: WDT_T4 - Explanation of settings

    Thank you very much @defragster for responding. So in the code above, feedTheDog() is called by the loop every 5500 ms. If 30 seconds go by and the automated interrupt callback had not been called, the Teensy will reset itself. I still do not understand how the trigger (in my case (40 sec)...
  33. J

    Teensy 4.1: WDT_T4 - Explanation of settings

    Teensy 4.1: WDT_T4 watchdog library - Explanation of settings I have been using the watchdog Timer library (WDT_4) and find it to be indispensable especially in remote installations. The library seems to be working but I have never been able to find a good explanation of its settings. There...
  34. J

    Teensy 4.1: Bounce Library stops working

    I have a relatively large program running on a Teensy 4.1. The program has a web server, a TCP server and interfaces to two sensors. The system is connected to a traffic loop. When a car comes, the loop is triggered and the teensy senses a "dry contact". I then start reading from the...
  35. J

    Detecting a Dry Contact - false detections

    Thank you KurtE for your help on this question and on previous posts. I will read the link you provided to find the value for the resistor.
  36. J

    Detecting a Dry Contact - false detections

    Thank you very much rcarr. Is this what is called "crosstalk"? Would the circuit with the resistor look like this?
  37. J

    Detecting a Dry Contact - false detections

    I have a Teensy 4.1 which is being used to detect a "dry contact" on one of its pins (basically a relay closure where no voltage is involved). I am using the Bounce2 library. In the office, when shorting pin 32 to GND using a short wire, everything works as expected and I can detect the...
  38. J

    Update Teensy 4.1 firmware from microsd

    Thank you, will check it again.
  39. J

    Update Teensy 4.1 firmware from microsd

    Thank you for your prompt answer but the problem is that I already have a few units in the field. If I have to upgrade their firmware to include the Flasher code, I might as well use a PC ... This is why I was thinking of using an additional Teensy ....
  40. J

    Update Teensy 4.1 firmware from microsd

    Thank you very much for helping and for your time in creating this utility. I am lost though as to how it can be used. Here is what I have: 1) A Teensy 4.1 (T1) running some old firmware which I wish to upgrade. 2) The new firmware as a .HEX file on the computer or on a SD. 3) A second...
  41. J

    Update Teensy 4.1 firmware from microsd

    I have a Teensy 4.1 at a remote site. I wish to update its firmware but due to its location, it is not practical to update its firmware using a PC. Is there a way to upload an updated HEX file to that Teensy either by connecting it to another Teensy or from a microSD card inserted in the...
  42. J

    How to protect a Teensy 4.1 pin from higher voltages?

    Thank you @BriComp. If I use discrete Schottkys, what component should I use? IN5817?
  43. J

    How to protect a Teensy 4.1 pin from higher voltages?

    Thank you very much. I was not aware those boards exist.
  44. J

    How to protect a Teensy 4.1 pin from higher voltages?

    Thanks to all. I received the parts. I tried first with a BAT54S Shottky but I was never able to solder them as they are so tiny! So I tried with the attached circuit using a Zener diode. Up to 24V, the Teensy pin only got about 2V which means it is protected. However, my main question is...
  45. J

    How to protect a Teensy 4.1 pin from higher voltages?

    I am just trying to protect from the possibility of the Teensy being destroyed if a pin accidentally is connected to 24V. I have ordered the parts and will test it ...
  46. J

    How to protect a Teensy 4.1 pin from higher voltages?

    Thank you @liudr. I appreciate the description.
  47. J

    How to protect a Teensy 4.1 pin from higher voltages?

    I do not know how this circuit works ...
  48. J

    How to protect a Teensy 4.1 pin from higher voltages?

    Thank you @KurtE. I thought so too but wouldn't this connection completely bypass the diode?
Back
Top