Thanks TomChiron! That was very helpful and the post you showed cleared it up a lot. I'm going ton search around myself and simply start from scratch. I need to find information on using the Teensy as a USB Host and...
I have mapped GPIO6 for my project this way:
So I multiplexed the high order 16-bit of GPIO6 into mix of input/output signals using latch or bi-directional buffers.
- GPIO6.PIN = 8-bit MSB address bus as output...
Thank you so much Paul.
This was tremendously helpful.
From a business standpoint, your support (to us and to others on this forum) keeps us coming back for more of your designs.
Generally speaking, the...
The noise generator should have an impedance of 50 ohms.
I would accept a non-linearity of the ADC, because this could be corrected. Also a somewhat slow calculation could be compensated by waiting. But that certain...
This is the pin out from Arduino
They confuse things by counting from 1 on both sides, but using the normal IC pin numbering, starting from top left, running down the left side and then back up the right side, pin 8...
You need as many waveforms (or whatever sound generators) as you would like to be able to play back in parallel, i.e. polyphonic voices at the same time.
If you should have "only" 16 input keys than it could be easy...
Did you use a low impedance source to drive the ADC - many ADC only reach their published performance for low impedance drive. ADCs built in to microcontroller chips are usually a poor compromise in performance since...
Not at all, I’ve placed one at least 6 inches away before and I had an export error that made me unable to use the PCB traces so I had to use hookup wire for those 6 inches to the connector. The signal integrity seems...
Maybe the Power Up Sequence info on this page can help?
https://www.pjrc.com/store/ic_mkl02_t4.html
Click the little javascript buttons to highlight each power up step on the schematic. ;)
Hello,
I have a project where I need to power a Teensy 4.1 from 3.3V. My current setup is as follows:
- I have cut the VUSB/VIN pad jumper on the bottom of the Teensy
- I have connected a CR2032 to the VBAT pin to...
I would be glad to start from scratch if someone could give me a head start on how to setup a 16 note polyphonic waveform synth with the teensy a usb host and a 16 key midi controller(the Keybow 2040). Do I need 16...
I just stopped using pin 48 and moved to another pin. I am not planning on changing the default startup code, and would have to do this every time we update Teensyduino. It seems like adding a pulldown resistor to pin...
I have made measurements with the built-in ADC. When I displayed the data graphically, I noticed that certain values are missing or are displayed as "0". Interestingly these values are in the binary-typical distance of...
In your code you have been mixing up bytes and integers.
In your send routint you have Wire.write(channels); where channels is an integer and Wire.write accepts a byte ( as I understand it ).
In your receive...
Hello everyone. Recently I started building a basic synth for my young niece, so obviously bright blinky lights were a big factor. :) I started creating my own pcb and used Cherry MX keyboard keys. Then multiplexing...
@jmarsh Applying this patch solved the issue for me! Many thanks. Now if the crash happens inside the thread, the correct place is show in addr2line and the .lst file.
Thanks jmarsh! I decided to change from pin 48 to other pin and this fixed the issue for me. As for pin 36, I placed a pull-down using a 1K ohm resistor and was also able to solve the issue with this pin. Still not able...
Is the other board also a Teensy? I can tell you I've personally verified Teensy (I2C master) to Teensy (I2C slave) many times. Many people have also successfully used Teensy in either mode, so I'm pretty sure the...
The transmitter is always sending eatch time 1 component of the array channels by time. i thought that when the first has arrived to the receiver the others would be coming directly after that. In total it's passing all...
I have no familiarity with sbus or I2C slave mode so this is all very generic but a couple of things stick out as possibly causing issues in your receiver code.
void receiveEvent(int byteCount){
...
Pin 48 is likely being driven high when (after) the PSRAM initialization runs (it checks for any attached chips). In theory this could be patched out of startup.c.
I'm not aware of any reason why pin 36 would be driven...
I am currently facing a similar issue but with different pins: 36 and 48 (back) on Teensy 4.1. My situation is very similar to the one from @mwolters. I have chosen 8 different digital pins to control 8 relays, and pins...
Works fine for me with Optimize Smallest Code ...and with LTO.
I'm also using Visual Micro with Visual Studio.
Using Teensyduino vs 1.59b3 with Arduino 1.18.19
Teensy Board Package v1.58.1
Affects: Arduino IDE, Visual Micro
Summary:
After uploading the Blink Sketch to a Standard Teensy 4.1, the LED does not blink.
This is only found when using the "Smallest Code"...
Hi, I found a library that allows a teensy to comunicate with an sbus receiver. I need to pass the data received (an array of integers) to another board with I2C. I can see things happening on the board connected to the...
If it's easier, this is the patch if you want to manually apply it: https://github.com/PaulStoffregen/cores/commit/c27fdcff4010d153c136e249d1b3157c134aa95a
Sorry not sure which Teensy or Library.. But will assume a Teensy 4.x or 3.x using the built in USB type including joystick?
if this is the case, there are two modes of operation, controlled by the call:...
As this thread became long, I will add to phorton1 solution above and try to summarize my final solution to both problems related with TeensyThreads (non-reentrant code and malloc/new). I hope that someone finds this...
Thanks @defragster and @jmarsh for the tips!
I will modify my code to start using the CrashReport.breadcrumb functionality to help better track the crashes.
Also, just a quick question: Is the location where...
Does PJRC publish dimensional drawings of the various Teensy's to aid in development of footprints in CAE libraries?
I'm looking for a LibrePCB Teensy component but can't seem to find it. I'm therefore contemplating...
HI all,
I'm having an issue/need help coding sys ex messages.
I am able to send sys ex without an issue.
I need help to read and analyse sys ex messages being received.
If a sys ex message is received and...
Good day everyone,
thanks a lot for all the great suggestions.
Will definitely change the pcb in the future.
But in the first step i told my colleagues to alter the case and make it bigger.
Thanks a lot to...
Hello,
I would like to add a usbC connector to the pcb I am designing around a teensy 4.1.
Where normally you might have the teensy’s usb connector on the edge of a pcb to access it through an enclosure, I’d like to...
Does the joystick library track the last known values for the buttons and analog values, so that I can blindly set the read values in every loop() and it will determine when the HID report(s) need to be sent, or do I...
the length of the time slice wont fix the basic disagreement between teensyThreads and malloc ... though I think I saw some other work arounds in previous posts, I think the one I suggested is kinda simple and elegant.
The solution I settled on to solve the teensyThreads malloc() problem was to intercept sbrk() and have it invariantly use the MSP ('main' stack pointer), rather than the current executing stack pointer. Paul made...
There is another solution, at least for stdlib functions like malloc, write, read, etc: override the locks and locking functions (all the stuff in sys/locks.h) that are built-in to newlib. That is after all what they're...
Did you read the last few messages of the thread? There are lots of things in Arduino/Teensy that are non-reentrant, so a "generic" solution is set a long time slice so that all task switches occur via yield().
Yes, the problem seems pretty obvious. new/malloc() is using TOS (which grows downwards) minus top_of_heap to determine how much unallocated space exists. It assumes TOS is above top_of_heap cuz thats the way the...
PJRC only solders the normal square pins. We can't offer other types, because the contract manufacturer that actually does the soldering has special tooling built specifically for holding those pins, and we have custom...
BTW, I suspect there may be a new version of the eyes code shortly. Adafruit has released the following new products (plus some more displays pre-announced):
Qualia ESP32-S3 for TTL RGB-666 Displays:...
Interesting @jmarsh about stack tracking update. Missed that so not sure when.
Indeed starting with CrashReport.breadcrumb(1, threadID) would be a good start.
Perhaps also/next CrashReport.breadcrumb(2, __LINE__)...
As far as I can see the only way to mount the Teensy with headers attached and have a PCB to top of Teensy dimension of less than 6mm is to mount the Teensy sub PCB top surface.
The breadcrumbs functionality seem very nice. However, I am still not sure which strategy to use to help me pinpoint unknown crashes that I have no idea where could have happened (think a 40000+ lines program that...
Hi,
I have been using this module from Adafruit in SPI mode and it works fine. I'm now looking to implement it on a custom board using it in place of the SD card on the Teensy via SDIO. I have removed the IC from the...
Hi,
I am developing a Simulink Embedded Coder Target for Teensy 3.x and 4.x. I tested the library only for Teensy 4.1.
The library uses the Simulink Embedded Coder to generate the C/C++ code for the Simulink model and...
Outrigger female headers can be on the underside of the PCB allowing lower profile: https://www.mouser.co.uk/ProductDetail/TE-Connectivity/1-147726-3?qs=yRTBpGnAb25VxMGLYRRBjQ%3D%3D
A voltage divider is for signals, and only works if unloaded, since it can't regulate voltage against changes in load.
A 100k divider would not be able to supply more than a few microamps anyway.
A 1ohm:1ohm...
Yep assuming which NANO, as they are now a family of different processors.
https://www.arduino.cc/en/hardware#nano-family
And for example recently I learned that not all Arduino UNOs are created equal... i.e. UNO...
Are you using the latest Teensyduino? There were changes a while ago to make sure the correct stack is examined in the crash handler, which would affect where the fault location is gathered from.
TeensyThreads is a unique process not widely used - so many things fail with thread switching in spite of the good work behind it to proved the feature.
CrashReport wasn't designed to work with it, it may take some...
Look at the library source code, at FreqMeasureCapture.h
Don't know which teensy you are using, but for example for Teensy 4.x I see:
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__)
#define...
Thank you sir for the help. I think I encountered some "glitches" on my PC's com port. I'll try to troubleshoot what causing my teensy not connecting to the serial port of my PC.
Thank you so much for your help.
Works for me:
Although I did add a wait for the Serial port before the code ontinued:
void setup() {
Serial.begin(115200);
while (!Serial) {} // wait for Serial port
Serial.println("From The T4.1");
}
A couple of things that might be happening is that the Teensy might have completed sending your print before you can open Putty. If you change the sketch to:
void setup() {
// put your setup code here, to run once:...
I would typically use some form of external voltage regulator, maybe something like:
https://www.pololu.com/product/2831
Which one might depend on how much power you need. The one I mentioned here is 1amp, they have...
Hi,
Trying to figure out how to use this library FreqMeasure, on Arduino first and then Teesy. Example code below. Where do I tell it what input pin is used?
Ultimately trying to build a guitar tuner. I'm currently...
Hi, thank you sir for your response. I drafted a simple sketch to check the connectivity of Teensy to the PC serial port (via PuTTy).
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);...
Most guitar pedal supplies are somewhere between 9-9.5vdc. Would a simple voltage divider (100k/100k) work to power Vin without USB? That would be something in the 4.5-4.75 range.
Just a guess, but make sure there is nothing else that is using the Serial port. For example the Arduino Serial monitor.
I am assuming a windows machine as you mention PuTTy.
Other potential things. On boards...
Hi again, I'm new to Teensy boards and I almost finished migrating my program from Arduino Mega to Teensy 4.1.
My past project using Arduino is connecting the serial port of my Arduino (via USB) to my PC, reading the...
Hello all! Sorry for commenting on this old thread but I am facing a very similar issue regarding debugging a crash in a Teensy sketch that uses threads (TeensyThreads library).
I have noticed that every time the...
Ok, this has been confirmed. We used the 2MB chip on this board because we had some trouble securing the 8MB versions for some time and accidentally used the 2MB chip during population, this is where some of my...
The bootloader is supposed to detect which flash chip you have connected. The 2MB (16Mb) chip means Teensy 4.0 and the 8MB (64Mb) chip means Teensy 4.1.