Search results

  1. S

    Not receiving data from external USB device in USBhost_t36

    Thanks for the response. I removed the queue_Data_transfer. It is not neccesary. Copied it from other code. But it makes no difference. I notice two things: the transmit queue is hanging after it is full. So data is not removed. And the receive queue is not working. I am still trying to find my...
  2. S

    Not receiving data from external USB device in USBhost_t36

    I am trying to add an unsupported USB device to the USBhost_t36 library using the Teensy 4.1. Someone already wrote code for this USB device for the ESP32, which can be found here: https://github.com/Builty/TonexOneController/tree/main/source/main My problem is that I do not seem to receive any...
  3. S

    Ra8876

    Here is my library for this display: https://github.com/sixeight7/ER-TFTM0784-1 For the touch module, I use this library: https://github.com/sixeight7/arduino-goodix
  4. S

    Reset Teensy 4.1 to program mode

    Thanks a lot. That worked!
  5. S

    Reset Teensy 4.1 to program mode

    Is there a magic code that will reset the Teensy 4.1 to program mode? I have used _reboot_Teensyduino_(); and SCB_AIRCR = 0x05FA0004; in the past, but these don't work for the Teensy 4.1.
  6. S

    Teensy 3.6 RAM memory use very high

    So, how does it compare speedwise? Running code from flash on the Teensy 3.6 compared to running code from flash on the Teensy 4.1? The Teensy 3.6 has a much higher bandwidth - 411 vs 66 on the Teensy 4.1. Or is that not a relevant specification in this case?
  7. S

    Teensy 3.6 RAM memory use very high

    So technically a Teensy 3.6 can have more code than a Teensy 4? Or is there a way around it? I did read something about FLASHMEM (https://forum.pjrc.com/threads/57326-T4-0-Memory-trying-to-make-sense-of-the-different-regions), but to add that to every bit of the code seems impractical. Or does...
  8. S

    Teensy 3.6 RAM memory use very high

    I have been working for the past six years on a big project with a lot of code. Recently I have moved from Teensy 3.6 to Teensy 4.1. Now when I compile it, Arduino shows: Sketch uses 307840 bytes (3%) of program storage space. Maximum is 8126464 bytes. Global variables use 345108 bytes (65%) of...
  9. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    It does look like some of the data is being sent and then it stops when the hub is connected. Is there anyway to do a crude jumpstart? I can set a timer inside write_packed that can detect when it is taking too long for the buffers to become available. But most of ehci.h is a complete mystery to...
  10. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    Here is the serial monitor after one successful and then one unsuccessful MIDI message. I uncommented all //print and //println statements I could find in ehci.h. And I added two print statements to midi.c: void MIDIDeviceBase::write_packed(uint32_t data) { if (!txpipe) return; uint32_t...
  11. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    Tried that, but it does not make a difference. It still works without a hub and fails with the hub.
  12. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    The MG-300 fails with all hubs. Two Midi messages are sent and then the USBHost library hangs in the loop that is in write_packed(). Tx1 count and tx2_count are not cleared. That is as far as I got.
  13. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    Hi Paul, To explain a bit more clearly: I have tried several hubs. Belkin, D-Link and some cheap thing from China. They all work fine with the USBHost_t36 library with all sorts of MIDI devices, apart from this NUX MG-300. This NUX device is giving me a trouble, even though it does work when I...
  14. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    I have been trying to decipher the USBHost library for days. But it is very complicated. What would be a good strategy to find out where the data gets stuck? It looks like it is starting to send a message, but it is never actually being sent. Who can explain how this actually works? i am...
  15. S

    How to fix the [-Wreorder] warnings?

    Thanks Kurt. I changed the order in the constructor to the order that was shown in encoder.h and now it compiles without warnings. Here is the new constructor: ClickEncoder::ClickEncoder(uint8_t A, uint8_t B, uint8_t BTN, uint8_t stepsPerNotch, bool active) : pinA(A), pinB(B), pinBTN(BTN)...
  16. S

    How to fix the [-Wreorder] warnings?

    I use the following library for my encoders: https://github.com/sixeight7/encoder Everytime I compile it, it generates the following warnings: In file included from /Users/cfeddema/Documents/Arduino/libraries/encoder-arduino/ClickEncoder.cpp:12:0...
  17. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    I added the following lines to the top of void MIDIDeviceBase::write_packed(uint32_t data) in midi.cpp of the USBHost_t36 library: println"("tx1_count: ", tx1_count); println"("tx2_count: ", tx2_count);( When the library send data succesfull, both tx1_count and tx2_count are 0. After that...
  18. S

    MIDI device stops working when connected through hub (using USBHost_t36 library)

    My MG-300 guitar processor works fine when connected directly to the USB host port of a Teensy 3.6. But stops responding after a couple of messages when it is connected through a hub. This hub works fine when I connect the MG-300 to a mac or PC. Also this hub works fine with the USB host port...
  19. S

    MIDI using USBHost_T36 library slow/lagging.

    Reviving an old thread. I have developed the MIDI usb host library further. It now supports multiple messages per USB packet for regular MIDI too. The updated code is in my Github repository: https://github.com/sixeight7/USBHost_t36 But I have one specific midi device that only works without a...
  20. S

    MIDI loopback test fails with large messages on Teensy 3.2 and 3.6

    Finally fixed this issue. The solution: default buffersize for Serial1 is 64 bytes. I changed this to 255 bytes and all is well. This value can be changed in the following file on Mac: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/serial1.c...
  21. S

    MIDI loopback test fails with large messages on Teensy 3.2 and 3.6

    Even SoftSerial gives me incomplete data. What am I missing here. Anyone? #include <MIDI.h> #include <SoftwareSerial.h> SoftwareSerial swSerial(0, 1); // RX, TX MIDI_CREATE_INSTANCE(SoftwareSerial, swSerial, midiSw1); #define MSG_SIZE 200 // Set message size here struct MySettings : public...
  22. S

    MIDI loopback test fails with large messages on Teensy 3.2 and 3.6

    I tried different buffer sizes, different speeds. Even bypassed the entire MIDI library. No difference. Max message size is 130 bytes. Above that value, data gets lost. Has anyone been able to receive large messages using Serial1?
  23. S

    MIDI loopback test fails with large messages on Teensy 3.2 and 3.6

    I ran into an issue trying to receive large MIDI messages over Serial1 or Serial2 port on both the Teensy 3.2 and 3.6. I was not receiving any data at all. To pinpoint the issue I wrote the sketch below. When I transmit 120 bytes, I receive 120 bytes. That works fine - using Teensy 3.6. When I...
  24. S

    MIDI using USBHost_T36 library slow/lagging.

    I found out normal MIDI also supports multiple messages per USB packet. I have done some further experiments with my changes in the previous post. But I found the Teensy hangs whenever I send a message that is larger than the buffer. It must be something to do with the dual tx buffers. I...
  25. S

    MIDI using USBHost_T36 library slow/lagging.

    I found a solution to the slowness of the USBmidi with Roland devices. My hunch in the previous post was correct. The USBHost library only sends one 32 bit message in every USB package. But Roland supports multiple MIDI messages in one package. Not sure if normal USB MIDI does this as well...
  26. S

    MIDI using USBHost_T36 library slow/lagging.

    Now I am in no way in expert in USB Midi. But I am comparing the USBHost_t36 library with https://github.com/YuuichiAkagawa/USBH_MIDI/blob/master/usbh_midi.cpp, the MIDI library that goes with the Arduino host shield. Could it be that MIDI sysex messages in the t36 library are split into...
  27. S

    MIDI using USBHost_T36 library slow/lagging.

    Thanks KurtE for responding. I have tried the send_now() command, but it does not seem to make any difference. So maybe it is not a timing issue, but something else. I have tested the library with a different MIDI device. That device is showing the error MIDI buffer full. I do not get these...
  28. S

    MIDI using USBHost_T36 library slow/lagging.

    Did some further tests. Other MIDI devices connected to the USB host port also respond slow to midi messages sent via this library. Is there any way to speed up USB Host communication, or is this not possible. Would a Teensy 4.0 with its faster clock speed give better results?
  29. S

    MIDI using USBHost_T36 library slow/lagging.

    I have developed a MIDI foot controller that uses a Teensy 3.6 and has midi connections via USB host, USB regular and via serial midi (2x). I noticed that sending MIDI messages out from my foot controller that the USB Host port midi is lagging. When I connect the same device via the other midi...
  30. S

    One Midi Device not working with the USBHost_t36 library

    Today I finally solved this issue. It turns out the Boss GP-10 only supports sysex messages via cable 1. The default is cable 0. So the example above will work by changing one line: usbhMIDI.sendSysEx(6, sxdata, true, 1);
  31. S

    One Midi Device not working with the USBHost_t36 library

    Thanks for replying Paul. I will revive thuis thread once T4 is out and the issue had not been solved some other way.
  32. S

    One Midi Device not working with the USBHost_t36 library

    Most non compliant Boss/Roland can be fixed by adding a quirk to the usb host library. The USBHost_t36 library has this quirk and it works for the Boss Katana, the Roland GR55 and VG99 which all are not class compliant. It is just the GP-10 that is not working.
  33. S

    One Midi Device not working with the USBHost_t36 library

    I have looked at this issue for many hours now, and I cannot get my head around it. Though I would reply to my own post to bump it and hope somebody will give me some new ideas or clues. A few things I noticed: - The Boss GP-10 responds very sluggishly to MIDI PC messages using the host port of...
  34. S

    One Midi Device not working with the USBHost_t36 library

    Here is the output from one of the devices that is working (Boss Katana 100): sizeof Device = 36 sizeof Pipe = 96 sizeof Transfer = 64 power up USBHS PHY reset waited 5 USBHS_ASYNCLISTADDR = 0 USBHS_PERIODICLISTBASE = 1FFF9000 periodictable = 1FFF9000 port change: 10001003 connect port...
  35. S

    One Midi Device not working with the USBHost_t36 library

    I am building a device that should be able to connect to several Roland devices. So far I am quite successful, as three of the four devices are working, but one is not. Here is a short video of the current progress on this project: https://youtu.be/a3bDT5Viceo The device that is not working...
  36. S

    Getting WS2811 to run with Teensy 3.6

    I have connected a WS2811 chip to a Teensy 3.6 to control my RGB display backlight. I was really struggling to get it to work. Initially the RGB would turn on, but after that the command to change the colour was ignored. The solution that made it work was to change Optimize in the Arduino IDE...
  37. S

    Connecting Raspberry Pi to Teensy 3.2

    Here is a link to my code: https://github.com/sixeight7/VController_v3/tree/master/Firmware/VController_v3 The low level midi stuff is in MIDI.ino. The VController project has 13 character displays, 16 buttons connected via i2c, 3 serial midi ports, usbMidi and 12 neopixel LEDs. And when...
  38. S

    Connecting Raspberry Pi to Teensy 3.2

    Changed the Contents/Resources/Java/hardware/teensy/avr/cores/teensy3/serial3.c file inside the Arduino program object. Tried setting the receive buffer to 256 and the interrupt priority to zero. But it does not seem to make any difference. @Therimingenieur. The communication is at normal 31250...
  39. S

    Connecting Raspberry Pi to Teensy 3.2

    I am having trouble getting a Raspberry Pi and a Teensy 3.2 to talk MIDI to each other. Well actually it works fine when I connect the raspberry pi to Serial1 or Serial2 via a full midi circuit (optocoupler on both Tx and Rx in both directions). But Serial3 seems to give me trouble. This port is...
  40. S

    Teensy 3.5 usb host

    The Teensy 3.5 has the same usb host pins as the Teensy 3.6. Is it possible to use these pins to connect a usb device? Will the USB host library of the Teensy 3.6 work on the Teensy 3.5?
  41. S

    PCF8574T / PCF8574AT running at 800 MHz

    PCF8574T / PCF8574AT i2c serial board running at 800 MHz I have developed a Midi foot controller with 13 displays running on the i2c bus. I have posted this over here: https://forum.pjrc.com/threads/34072-V-Controller-version-2 The displays are controlled by the LiquidCrystal i2c library I...
  42. S

    Base Emitter Resistor for 6N139 on MIDI input?

    I have used 6n138's for awhile for midi. That one also needs a resistor to drain the charge from the base. But now I have changed to 6n137's. These do not need the extra resistor for the base. Also the pull up resistor can be a lot larger. The resulting signal is much sharper.
  43. S

    Debouncing trouble of switches connected to four MCP23017s

    Getting this to work has taken me quite a while. But I have managed it in the end: * I found i2c speed was kept slow, because the i2c LiquidCrystal library started the i2c bus at 100 kHz and later speed commands did not seem to effect the i2c bus speed. I changed it in that library and I am...
  44. S

    V-Controller version 2

    Built a new version, with much better firmware. Here is a video of the VController v3: https://youtu.be/dFgOi_WOnbg
  45. S

    Debouncing trouble of switches connected to four MCP23017s

    It does in the example I have provided. In the MIDI controller the loops get long after I have pressed a switch. The first response to a switch, even when it has to read all of the display boards, is not sluggish. My main problem is that for some reason a single press on a switch leads to a...
  46. S

    Debouncing trouble of switches connected to four MCP23017s

    expanderWriteBoth (MCP23017_GPPUA, SWITCH_PINS, 0x00); // pull-up resistor for switch pins SWITCH_PINS = B00001111. So the command above does enable the pull-up resistor on the switch pins and disables it on all the other pins which I use for the displays. expanderWriteBoth writes to GPPUA...
  47. S

    Debouncing trouble of switches connected to four MCP23017s

    I am struggling to get my foot switches working properly on my MIDI foot controller. I find that I am changing the debouncing time all the time, but the debouncing is not working steadily when the loop takes slightly too long. I would like somebody to look at my code and see if I am missing...
  48. S

    Reboot Teensy 3.2 programmatically

    Excellent! That was it. Now it works!
  49. S

    Reboot Teensy 3.2 programmatically

    Tried the command _teensyduino_reboot_(). But the Arduino compiler does not recognize the command and gives an error: error: 'teensyduino_reboot' was not declared in this scope Do I need to include anything to use this command? i am on Arduino 1.6.1 and teensyduino 1.23 and have a Teensy 3.2...
  50. S

    Teensy 3.6 USB Host support

    Just found this library: https://github.com/PaulStoffregen/USBHost_t36 So status is: usbmidi read works and usbmidi write is still a work in progress.
Back
Top