Forum Rule: Always post complete source code & details to reproduce any issue!

# Search:

Type: Posts; User: Frank B

Page 1 of 10 1

1. ## Thread: Multiple Virtual Serial Ports

by Frank B
Replies
5
Views
135

### Can you explain that in more detail? You can't...

Can you explain that in more detail?
You can't use Teensy like a hub, if that's your plan.
How does the Teensy know that it should connect it's usb host port to the usb device port? You'll need to...
2. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### that's pretty OK :)

that's pretty OK :)
3. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### Yes and we confirmed that python is the reason.

Yes and we confirmed that python is the reason.
4. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### Hm. Not that sure anymore. Is it faster by...

Hm. Not that sure anymore. Is it faster by calculating with float instead double? (again, the /100.0) is superfluent anyway - the PC can do that much better.
5. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### Assuming max 500 , it's two bytes unsigned...

Assuming max 500 , it's two bytes unsigned integer.

Against "3.13crlf" = 6 bytes.

So it saves 66%

Edit: You could save even more by using the upper bits which are always zero

2 seconds...
6. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### If two decimal places are really sufficient, i'd...

If two decimal places are really sufficient, i'd just multiply the data by 100 and save 30000 bytes this way(no ".") ... also, print uses cr+lf..replacing this by "," saves another 30000 chars :)...
7. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### Sorry, that question was to the OP. I'd...

Sorry, that question was to the OP.

I'd probably just write a short C program that captures the data to a file.
That's way faster than python. He could just read the file in python, then.
Or...
8. ## Thread: Data from Teensy 4.0 to Python via serial

by Frank B
Replies
19
Views
157

### Under windows?

Under windows?

by Frank B
Replies
22
Views
337

### Yes, often "APE" is used for aac. It stores the...

Yes, often "APE" is used for aac. It stores the information at the end of the file, like ID3v1. However, when I played with this, many y4ears ago, I had some aac files with ID3 Tags.

So, it's...

by Frank B
Replies
22
Views
337

### I guess ffmpeg can do this.

I guess ffmpeg can do this.
11. ## Thread: Watch Dog timer issue

by Frank B
Replies
9
Views
141

### Hm. 64 commits behind master, readme says " ...

Hm. 64 commits behind master, readme says "

Last commit (2016) mentiones Teensy LC (partial support)

int WatchdogKinetisKseries::sleep(int maxPeriodMS)

{
12. ## Thread: Watch Dog timer issue

by Frank B
Replies
9
Views
141

### I'd perhaps add a #warning "AVR Watchdog does not...

I'd perhaps add a #warning "AVR Watchdog does not work"... or better delete that file... as it is, it is a) confusing, b) leads to the wrong assumption "hey,wdt is there and will work", and c) wrong.
13. ## Thread: Watch Dog timer issue

by Frank B
Replies
9
Views
141

### ? What are you talking about... Builtin LED...

? What are you talking about...

Builtin LED is on pin 13.
14. ## Thread: Watch Dog timer issue

by Frank B
Replies
9
Views
141

### Note, better would be #define...

Note, better would be

#define wdt_enable(timeout) do{}while(0)
etc... which at least does not lead to syntax errors (but still does nothing)
15. ## Thread: Teensy 4.0 does not pass my audio through

by Frank B
Replies
2
Views
81

### No need to get frustrated... how about just...

No need to get frustrated... how about just trying the example from the audio lib?
Maybe it's a missing "sgtl5000_1.inputSelect()" line?
Just to rule issues like this out, you should use known to...
16. ## Thread: Watch Dog timer issue

by Frank B
Replies
9
Views
141

### Looks like the WDT "lib" is a fake: ...

Looks like the WDT "lib" is a fake:

#define wdt_reset()
#define wdt_enable(timeout)
#define wdt_disable()

No Idea why... an errormessage would be better instead of saying "yes, it...
17. ## Thread: Multiple Virtual Serial Ports

by Frank B
Replies
5
Views
135

### The Teensy has several real serial ports...

The Teensy has several real serial ports (hardware), in addition the virtual one which is for USB.
What kind of codec do you mean? For Audio?

by Frank B
Replies
22
Views
337

### I also don't see any real advantage of ID3V2.4...

I also don't see any real advantage of ID3V2.4
It adds another encoding (who needs that? UTF16 can handle everything), and unneeded stuff (unsync).

ID3 is also used for *.aac.
M4A is...

by Frank B
Replies
22
Views
337

### #include #define SDCARD_CS_PIN ...

#include <SD.h>
#define SDCARD_CS_PIN BUILTIN_SDCARD

SdFat sd;
SdFile dir;
File file;

by Frank B
Replies
22
Views
337

### Looks like "syncsafe integers" are used in...

Looks like "syncsafe integers" are used in ID3V2.4 only - not in ID3V2.3

https://id3.org/id3v2.3.0

Hm.

Easy fix:
replace the calls to id3_unsyncsafe() by __builtin_bswap32()

by Frank B
Replies
22
Views
337

### Looks like it's something with embedded pictures...

Looks like it's something with embedded pictures - or more exact, with "unsync".
Have to look closer....
22. ## Thread: XPlane interfacing coding challenge...

by Frank B
Replies
18
Views
185

### How many pins?

How many pins?
23. ## Thread: XPlane interfacing coding challenge...

by Frank B
Replies
18
Views
185

### What is this "dial switch" ? How is it...

What is this "dial switch" ?
How is it connected?
Or better something like a datasheet.

You just can't read three different digital states with one digital pin.

Also, it...

by Frank B
Replies
22
Views
337

### #include #define SDCARD_CS_PIN ...

#include <SD.h>
#define SDCARD_CS_PIN BUILTIN_SDCARD

SdFat sd;
SdFile dir;
File file;

#include "SPI.h"
25. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### You can also take a look here:...

You can also take a look here: https://github.com/FrankBoesing/Teensy-WavePlayer
It can play many files at the same time (tested with 14 with a very fast card), and has basic looping.
Recording is...
26. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### To be sure i'd make a more "real world" test, and...

To be sure i'd make a more "real world" test, and test exactly your usage-szenario.

read 8 files + write one.

by Frank B
Replies
22
Views
337

### Maybe the encoding is UTF16.. I'll take a look...

Maybe the encoding is UTF16..
I'll take a look tonight, or tomorrow.
28. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### Maybe @KurtE, @MJS513 or @Defragster can answer...

Maybe @KurtE, @MJS513 or @Defragster can answer that.

by Frank B
Replies
22
Views
337

### Btw, the Arduino-IDE uses UTF-8 as far i know. ...

Btw, the Arduino-IDE uses UTF-8 as far i know.

https://stackoverflow.com/questions/4059775/convert-iso-8859-1-strings-to-utf-8-in-c-c
30. ## Thread: Teensy 4.1 USB Host as MIDI device?

by Frank B
Replies
1
Views
120

### "Teensy 4.1 USB Host as MIDI device?...

"Teensy 4.1 USB Host as MIDI device?"

No. A host can't be a device.

You can connect x devices to one host (by using a hub)
You can't connect two hosts.
You can't connect two devices.
31. ## Thread: Teensyduino File System Integration, including MTP and MSC

by Frank B
Replies
1,116
Views
44,186

### @wwatson, oh my... I can feel with you.

@wwatson, oh my... I can feel with you.

by Frank B
Replies
22
Views
337

### You can replace the log* functions with a...

You can replace the log* functions with a Serial.printf() or Serial.println...
And for the first steps, to get it running, you can comment-out the switch.
ID3 supports different string encodings....

by Frank B
Replies
22
Views
337

### yup, looks like I wrote that for ID3v3 :)...

yup, looks like I wrote that for ID3v3 :)
However, it's still simple.
34. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### There is also an example "SdCardTest" which might...

There is also an example "SdCardTest" which might be useful. You can extend it to 8 files + record.

27276
35. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### Bottlenecks are: - random access (happens...

Bottlenecks are:
- random access (happens whenever you read data from an other file) re-adressing is slow.
- writing
If you write a specialized program that does only this, perhaps without the...
36. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### eh, no. Not even in a ideal world :) You have to...

eh, no. Not even in a ideal world :)
You have to add the time to switch between the files (re-adressing - that's SLOW!), the time the card needs to do it's internal wear-magic, the time to handle...
37. ## Thread: Feasibility? Looper 8 Tracks Mono with storage onto SD-card

by Frank B
Replies
13
Views
294

### You don't have to deal with wear - the card does...

You don't have to deal with wear - the card does this - it has a builtin cpu.
I don't think it's possible to read 8 channels and write 2 simultanously. Not without a really large buffer.
However,...

by Frank B
Replies
22
Views
337

### Not sure.. *g*... i think it works with v2 only....

Not sure.. *g*... i think it works with v2 only. Have not tested v1 (have no files with v1)

I think v1 is not needed anymore.. it's outdated for many many years now.

(Edit: The comment is...

by Frank B
Replies
22
Views
337

### Here's a snippet from a larger project I wrote: ...

Here's a snippet from a larger project I wrote:

// https://id3.org/id3v2.4.0-structure

typedef struct
{
char id[3]; //"ID3"
uint8_t version[2]; //04 00 Version 4
40. ## Thread: Teensy 4.1 SD card detection - why does it block my Serial1 with higher interrupt pri

by Frank B
Replies
17
Views
261

### @sicco - two options: - copy the existing...

@sicco -

two options:

- copy the existing isr code
- use interrupt chaining.

with both: keep care of the interrupt priorities.

And note that the core disables interrupts, sometimes....
41. ## Thread: Teensy 4.1 SD card detection - why does it block my Serial1 with higher interrupt pri

by Frank B
Replies
17
Views
261

### Why this tone? Just write your isr, if you feel...

Why this tone?
Just write your isr, if you feel you need it.

have fun,
Frank

period. :)
42. ## Thread: Teensy Laser Control

by Frank B
Replies
22
Views
522

### I2C is incredible slow compared to I2S. And if...

I2C is incredible slow compared to I2S. And if the adresses conflict, you have find a way around it...
43. ## Thread: Teensy 4.1 SD card detection - why does it block my Serial1 with higher interrupt pri

by Frank B
Replies
17
Views
261

### More or less, yes. But why would this be...

More or less, yes.
But why would this be important? What is the usecase?
Normally, an interrupt line is used for such things - if timing is important.

Edit: And remember that the serial...
44. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

### ...and how fast or slow the used bus is :) I...

...and how fast or slow the used bus is :)

I remember accessing the RTC registers is really incredible slow..

Thank you for the link, luni.
45. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

Probably better if you read the manuals about the cpu core, its memory interfaces, busses and other docs.
And visit the nxp forum.
Imagine a periphal connected via a slower bus - the cpu continues...
46. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

### No they work. As said, it has to do with the cpu...

No they work.
As said, it has to do with the cpu pipelines.
47. ## Thread: IC2 Returns False Values

by Frank B
Replies
5
Views
146

### What is a Teensy 4.2? Oh sorry, am reading on a...

What is a Teensy 4.2?
Oh sorry, am reading on a smartphone

I guess you meant the Teensy 3.2
48. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

### Yes. In this case (end of isr) it's even better....

Yes. In this case (end of isr) it's even better. ::memory tells gcc to move outstanding writes before the "dsb"
49. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

### Yes. And the "DSB" here makes sure, that the...

Yes. And the "DSB" here makes sure, that the write-pipeline gets written before the ISR is left.
50. ## Thread: Strange IRQ_CMP0 behaviour of Teensy 3.2, help needed to track down issue

by Frank B
Replies
18
Views
205

### the "asm volatile ()" ./ asm () is an...

the "asm volatile ()" ./ asm () is an interesting topic, too.
Often the "volatile" is just added without thinking... but it prevents optimization which can - in some cases - be useful. of course...
Results 1 to 50 of 500
Page 1 of 10 1