In your first post, the PulseView screendump shows the CS going low every now and then. But with 4MHz SPI clock rate, the CS signal is always high? Weird...
Just to make sure that the CS pin is not broken, you could...
Perhaps the Teensy 4.0 emits more radiation than a Teensy 3.2?
A Teensy 4.0 runs at 600MHz clockrate. What happens if you compile your code with the processor clock set to 150MHz ?
Paul
Isn't that the whole purpose of locking your Teensy? Such that no one can ever overwrite your code? Except ofcourse you, by programming EHEX files that are created using your key.
But perhaps I don't fully understand...
Like KurtE stated, lowering the SPI clockrate will allow your analyzer to take more samples of that alternating signal.
What will not improve is the sampling of your CS signal - here another phenomenon is present....
I assume you are talking about a Teensy4.x-based custom board.
Had a look at the schematic of the Teensy 4.1:
"1) would this apparently low voltage cause the teensy to not be recognized?" > possibly. 2V3 is...
Your logic analyzer is fooling you. The sample rate of the analyzer is just too low to reliably catch all edges of a 16MHz SPI signal.
With respect to the CS signal: I think the threshold level of your analyzer (to...
Quickly ran your code on a Teensy 4.0 here.
Using Audacity 3.3.3, Arduino 1.8.19, Teensyduino 1.58, Windows 10 Pro: no clicks whatsoever, just pure sine wave.
Hope someone using Ubuntu 22 can try as well.
Paul
Does it also click when you select "USB Type: Audio"?
That test code does not generate the waveform you showed - I'm expecting just a pure sine wave.
The URL gives me a "Sorry, the file you have requested does...
Good observation! Yes, combining all the SDO signals is not going to work this way.
Wonder if the OP needs to be able to read the DAC(s). If not, get rid of all the SDO signals.
Paul
Since there are only level shifters connected to the Teensy 3V3 pin, we need to focus on that part now.
Can you measure the resistance from the 3V3 to GND at an unpowered PCB1?
Is it possible to disconnect the Teensy...
Just to recap to make sure I understand:
- PCB1 contains a Teensy 4.1, 13pcs TXU0304 and 13pcs X1 connector.
- PCB2 contains one DAC and one analog mux.
- The system will consist of one PCB1 and 1-13pcs PCB2's.
...
In the Sender code, to print out the TS of the received message, should this line of code be like this?
Serial.print(" TS: "); Serial.println(rMsg.timestamp);
Paul
1. You don't need a level-shifter if you connect the DAC's Vio pin to 3V3. See datasheet, page 21. All digital signals will be on 3V3 level so can connect to the Teensy directly.
2. Just checking: you are connecting...
The fastest interface on a Teensy 4.1 is the USB interface at 480Mbps. The Ethernet chip on the T4.1 is has a max datarate of 100Mbps.
Question is I guess how fast compiled VB.Net code can handle USB data versus...
That makes me think there has something seriously gone wrong on the daughterboard. Can you disconnect the 3V3 from the Teensy to the daughterboard? Or even separate the whole Teensy from the motherboard?
Paul
Normally that would mean that the load on the TPD3S014 is higher than it can handle.
But since there is no load on the USB host connection, I can only assume that one or more the inputs of the chip has been exposed to...
Long time ago I wrote a few programs using VB.Net And I used the serial port as well.
For my purposes at that time it was fast enough.
Perhaps it's fast enough for you now as well, but it depends on the amount of...
Check out this page which states: Unlike a Arduino Uno & Mega which use slow serial baud rates, the Teensy USB Serial object always communicates at native USB speed, either 12 or 480 Mbit/sec.
Paul
I guess it depends on what data your Teensy-based spectrometer is going to send to the PC for displaying.
A Teensy 4.x has a 480Mbps USB interface so it can spit out data probably faster than your PC can handle.
Can...
When you do these measurements, is the multimeter perhaps in the conductivity/diode mode? I'm asking because my mulitmeter only beeps in that mode, not in resistance mode. You should measure in resistance mode.
You...
Are you using Serial.print to send the actual values over the USB serial port?
You are using the word 'skript', do you mean the code in a sketch?
Yes
Does it show up as COM port? Is the COM port still...
I think you need to solve this issue first. A COM port in the device manager should be present.
What code are you running on the Teensy? Did you set Tools > USB Type: to Serial?
Paul
Good suggestion when using a Teensy 4.x.
In my quick test above, a Teensy LC was used so this is not applicable.
But not knowing which Teensy the OP used, it might be useful. Although I doubt in his case this solves...
Ran your code on a home-made MIDI-controller with 100mm linear ALPS faders .
The sensorValue values look very linear in relation to the position of the faderknob.
Fader pin 1 connected to Teensy GND, fader pin 2...
This fader comes in 2 resistance taper flavors: with audio taper or with linear taper. See this table:
If it is really a linear fader, you should read a sensorValue of ~0 at one end, ~1023 at the other end and...
Each WS2812 LED can consume up to 60mA, so 30 LEDs means 1800mA max. Not something you want to pull from the Vin pin. So you will need an external 5V power source.
Most new WS2812 LEDs, powered from a 5V source, will...
Couldn't agree more. For a lot of my little projects, the LC processing power is enough. And I do like the 5V output on pin 17 for driving NeoPixel strips/rings.
Wish I had bought more LC's in advance...
Paul
Your schematic seems to be copied OK from the datasheet's Typical Application Schematic.
Did you follow the PCB Layout Guide as recommended in the datasheet? These regulators can be picky on the PCB layout.
Did you...
So if I understand you correctly you are looking for a temporary connection between Teensy 4.1 board and carrier board?
What about making a small Teensy-sized PCB with 48 double ended pogo pins? Like this:
...
Got it working (well, that is to say, my logic analyzer shows data on all 3 I2C ports of a Teensy 4.1).
Had to add "displayXX.cacheOff();" to the code otherwise no data would be sent out...
Here are the images of...
How would the actual lines of code look like then? Something like this?
HT16K33 display1(0x70, Wire);
HT16K33 display2(0x71, Wire);
HT16K33 display3(0x72, Wire);
HT16K33 display4(0x73, Wire);
HT16K33 display5(0x70,...
@philip.porhammer stated above "I want to use 12 displays with 4 on each I2C port".
The displays he's using (I assume) have only 2 address jumpers hence only 4 addressable displays on each I2C port.
So we are looking...
I understand what you want to accomplish.
Thing is you need to tell the library which I2C port it needs to use: Wire, Wire1 or Wire2. Again, I don't think the library is written such that it supports setting the...
As far as I can tell, the SparkFun_Alphanumeric_Display_Arduino_Library does not support selectable I2C ports (but I could be wrong).
Another option would be to use an I2C switch like this one.
With the mentioned...
Just checking: so you have 2 displays on 2 different I2C busses?
Why don't you connect both displays to the default I2C bus and connect them like Sparkfun's multidisplay example states?
Paul
That's probably due to the fact the MCP.digitalWrite function reads the IOR register first to determine whether it actually needs to update the digital output pin.
bool MCP23S17::digitalWrite(uint8_t pin, uint8_t...
You're right, after checking the library code and the datasheet, I agree that MCP.digitalWrite(8, LOW); translates to GPB0 (physical pin 1) set to LOW.
Paul
Did you also do this as instructed here?
I just started Arduino 2.1.1, opened File > Examples > Snooze > deepsleep > button_hold_wakeup and it compiled fine.
Paul
I wonder whether the two libraries using the same SPI bus will play nicely together.
You use SPI.h with transactions, setting MODE2 and speed, but MCP23S17.h does not use transactions. So can we be sure that...
Not necessarily. If I understand the paragraph Transactional SPI configuration on this page correctly, you can address multiple SPI devices that have different SPI modes and/or frequencies on the same SPI bus. Problem...
Ah, thanks. I had always understood from the AN-1070 document that you had to soft-reset the chip everytime you write a new frequency. But just writing the new frequency makes sense!
Paul
A bit dirty but you could even lower the SPI clock if the SPI signal levels are reached slower due to the parallel loading.
Just curious: did you hear any clicks when changing the frequency? According to the AD9833...
It may not be that bad. An AD9833 has an input pin capacitance of 3pF (typ) and an input current of 10 uA (max), so probably mutiple chips can be driven by the Teensy pins. The SCK pin of the Teensy has the LED...
Yeah, a timing issue came to mind first.
Looking into the MCP23017 library, I noticed the SPI clock is set to 1 MHz (if I understand correctly). That may collide with your code setting it to 12 MHz?
The MCP23S17 can...
Did you perhaps try to get the AD9833 to work without the expander?
And do you need an expander at all? You stated "..AD9833 boards..." but you could also use different Teensy pins for the different FSYNC signals.
...
External amplified speakers should be connected to the audio adapter using the line-level outpu pins, not the headphone output. The issue is that the GND of the headphone output is a virtual GND (floating GND if you...
It would be helpful if you could post photo's of your setup.
Two remarks:
1. a Teensy 4.0 does not have a DAC output so I don't see how you can generate an analog audio signal.
2. you stated "The data wire is still...
The DRV8825 is not a specific 5V device. From this page: "Can interface directly with 3.3 V and 5 V systems".
Also the spec of the chip shows this:
I have succesfully driven these DRV8825 modules with a Teensy....
The Arturia MIDI controller is a full-speed device, not a high-speed device.
But your Saleae remark triggered me to check what my logic analyzer could do.
Well, it can decode USB messages but that's about...
Looked at this USB protocol analyzer: usbpacketviewer but do not feel comfortable about the software... Price is ~$160...I guess you get what you pay for.
Just curious, what transfer/endpoint types are used for...
Looking further into the polling stuff and related timing, I read this article.
Using USBtreeview, I noticed that Arturia specifies a bInterval of '0'.
If I read the USB 2.0 spec correct, that bInterval value...
I just did, using Paul's fix from message #71.
Had to change MIDIDevice_BigBuffer midi1(myusb); to MIDIDevice midi1(myusb); to get forced full-speed to work.
But unfortunately forcing to full-speed did not help,...
Thanks a lot for testing and sharing your thoughts on your findings so far. I concur with your plausible assumption.
I'm glad you own this pricey Beagle USB 480 Protocol Analyzer - it's nearly impossible to debug these...
Found this document on Github.
Nevermind, the document is already on your disk at C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\docs\manual.pdf.
Couldn't find the Entropy library on Github...
Yes correct, my mistake.
Yes, that thought crossed my mind as well a few days ago, but I checked the output of the Arturia and it seems OK. See message #56.
With respect to your other question: do you always...
Absolutely agree, the challange though is to make a testpattern that exactly mimics the Arturia.
Here is screendump of the latest fail with the Arturia:
20:06:56.886 -> Note On, ch = 1, note = 68, velocity = 127,...
Hmm, mixed results...
I copied the changed midi.cpp & USBHost_t36 to both C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\USBHost_t36 and...
OK, thanks to jmarsh and fiddling with the test pattern code, I got it now to fail within a few seconds.
The test pattern code (I removed the delay(100); ):
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
...
OK, have been thinking about a better test.
What I came up with is this:
1. have the Arturia emulator generate a specific testpattern with a defined number of notes every 100 msec,
2. let the host check for the...
Yeah, that came to my mind as well. What I understand is that USB is a polled bus where the host initiates all transactions so perhaps there is a programmatic way to tell the host to no longer request USB packets from...
Some general advice on your project: if you indeed want to build this MIDI controller based on a Teensy 3.2, please check whether you can actually purchase a T3.2. They are extremely scarce because that actual NXP...
Correct, it's the schematic of the Teensy board with the internal signal connections between the different on-board components and the pins that form the interface to the outside world. That big rectangle with...
The third pins are connected to +3V3. Look closely at R3 in the middle image above.
Yes, Teensy 3.2 has 2x 3.3V pins connected on the board, 2x GND pins connected on the board and an AGND pin .
You can check the...
Well, "reliably" turned out to be the keyword for the last few hours... I had to generate a lot of messages in a message burst to consistently get a fail.
Anyway, here is the test code:
void setup() {
...
All this got me wondering whether the Arturia itsself did not send out correct data when hitting a lot of keys at the same time.
So I checked a whole lot slams with this tool.
Here is a screenshot of 17 keys hit at...
Switching to Arduino 2.1.1 with board package 0.59.3 did not solve the issue.
Steps to reproduce:
1. Updated Arduino 2.1.1 with board package 0.59.3.
2. Recompiled & uploaded both sketches from message #13 and #44 to...