I would say its just about the same.Originally Posted by mjs513
Since I was on line, gave the change a try, it worked.
same set up, his test sketch except with the change to startup, getting between 2545 and 2575 ticks.
So almost the same speed?
Kurt, buffer problem...Kurt, SERIAL_7E1 and SERIAL_7O2 do not work.
Serial1.print("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
Serial1.print("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
Serial1.print("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
Serial1.print("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
Hello world
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
Yes, I thought that.. there is nothing to cache, DMAMEMORY is accessed one time. It will be the same for most, if not all DMA operations I think.I would say its just about the same.
Mike can you put a servo with your IR receiver? Do you see odd behavior? For Demo I was going to tie buttons to Servo pos ++ and --, but IR reception is compromised getting 0xF's instead of normal button code. Is there a timer conflict on the select pins or system wide?
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
//#include <PWMServo.h>
#include <Servo.h>
//PWMServo myservo;
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup()
{
Serial.begin(9600);
// In case the interrupt driver crashes on setup, give a clue
// to the user what's going on.
Serial.println("Enabling IRin");
irrecv.enableIRIn(); // Start the receiver
Serial.println("Enabled IRin");
myservo.attach(9, 544, 2000); // attaches the servo on pin 9 to the servo object
myservo.write(0);
Serial.printf("Angle Read %d\r\n", myservo.read());
delay(5000);
}
void loop() {
for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
delay(100);
for(pos = 180; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
delay(1000);
}
Clock is on pin 14. Hm.. Does someone know if it is possible to use pin14 for spi-clck? I have not looked at the pin-configurations so far.Tried SD-Library with audioshield: Does not work, or I'm doing something wrong.. I'll try to find the problem. Maybe SPI.
Setting it up now - will update this post when done. Have bad cold my mind is in a fog - may take a little while
Yeah had servo on 3.3v . Probably pulled too much power. Anyway:Just remember Servo VCC is 5V - I started Servo with pin #8 and moved to #2 for control - LedControl LED's are now 3/4/5. I see #22 and #23 are also open if it is a timer conflict. Even just SWEEP example with IR powered shows flicker on yellow Rcv LED.
crystal drift (ppm)
24MHz 32KHz
T4beta1 -3.2 -4.7 1052
T4beta1-2 -4.1 -4.3
T4beta2 1 -6 1062
T4beta2-2 -11 10 1062
T4-1 -11 -3 1062
T4-2 -10 -5
T4.0-1 -23 -0.5
T4.0-2 -26 -2.5
T4.1 -7 -2
T4.1-1 -11 -5.5
T4.1-2 -12 -3
T4.1-3 -10 1
EVK -14 -54 1052
EVKB -6 -52
NXP1062 -9 9
T4mm -45 -6 sparkfun T4 micromod
Frank: Yep - no argument here. Typically I power them from separate 5v, if I have a bunch of them. For one its never been on issue when I am on my desktop.servos can need a lot of power.. more than usb allows. be careful
Setting it up now - will update this post when done. Have bad cold my mind is in a fog - may take a little while
UPDATE:
Ok, just tested it and yeah, am seeing strange things. The servo movement seems a little more jerkier than before and the IR reading are mostly FF's or random numbers unlike in individual tests. Same effect if you are using Servo or PWMServo libraries. For ref here is the sketch:
SPI CLOCK 4000000 CCR freq 4.0 MHz
tx 1024 samples 1990 us 4.1 mbs scope clock 3.97 mhz
SPI CLOCK 8000000 CCR freq 7.5 MHz
tx 1024 samples 1080 us 7.6 mbs scope 7.57 mhz
SPI CLOCK 16000000 CCR freq 15.1 MHz
tx 1024 samples 570 us 14.4 mbs scope 14.9mhz
SPI CLOCK 30000000 CCR freq 25.1 MHz
tx 1024 samples 370 us 22.1 mbs ? scope 25 mhz Vpp 2.74 v
SPI CLOCK 40000000 CCR freq 37.7 MHz
tx 1024 samples 260 us 31.5 mbs scope 37.9 Vpp 2v
servos can need a lot of power.. more than usb allows. be careful
Tim: Glad you found the problem. My ground line runs are as long as yours I don't think. Don't use the T3.2 for debug any more unless I am testing something specific. Everything goes to serial. My GND connections are typically all close to the GND pin of the T4. Maybe an a couple inches.PROBLEM: GND ISSUE. That Servo is pulling Gnd across breadboard. Move GND wire from open BBoard area to GND pin row - or touch USB plug and all is well. Even on the end of the wire from GND row to (-)RAIL and it show noise.
With better GND the IR receive is not throwing 0xF's like it was before!
My setup it two long BBoard together with T_4 and T_3.1 ( debug ) and T_3.6 on same hub from PC (now 5V 2.5A POWERED)- so common GND to each Teensy and from each to BBD rails. Also pulled GND from T4 end pin to far (-)Rail - common to T_3.6 - No flicker there and the Servo is moving 10° on pressing the IR Remote control buttons.
Nice work Frank. Looked at it a while ago, you have more patience than I doFrank B
SD: Have cardinfo() working. Will create a pullrequest tomorrow. Too late now, and I want to clean it up first, when I'm more awake
Only difference I expect is drift in crystals
When I looked that the Tools/Port menu it did not show any Teensy stuff in it, Nor the port associated with the Teensy.
All I did was to close down the Arduino IDE and the Teensy App, and restarted it, and it then showed the Teensy 4 (in I believe the waiting to program state). I then compiled and downloaded sketch and it worked just fine.
KurtE said:Hi @defragster, - Works for me...
Note: you mentioned String.cpp... Maybe typo or wrong file? I copied the wstring.cpp that is in the cores directory. I simply copied it from the teensy3 directory to the teensy4 directory.
Yes - I believe you are right!
When I updated the above sketch to:
...
But compiles fine if I copy stream.cpp from Teensy3 to Teensy4...
Can create PR if desired. Not sure to continue it in my Core SPI fixes or it's own?
Update - Created PR #324
I've seen something like this a few times, usually after many hours of use (Linux, 64 bit). I believe there may be a bug lingering in teensy_ports, or perhaps in the Arduino IDE discovery manager code I added to talk to teensy_ports. Restarting Arduino always seems to fix it.
Since going where never gone before - which ones do you have? I will pick some upI had a Vol Pot and Mic I put on too and it is working.
Since going where never gone before - which ones do you have? I will pick some up