manitou
Senior Member+
The one which is installed by Teensyduino - is it by pedvide ?
i think so. https://github.com/pedvide/ADC
The one which is installed by Teensyduino - is it by pedvide ?
Thanks!
Personally I think it is amazing how quickly you are able to turn around things here. My guess is already you have more things working than what was working with the Arduino Due many months after it was released.
Tryed upload blink.ino, changed port, disinstalled driver, no matter what I'm trying to do, it keep asking this (and serial port don't open).
The serial port is present on Port menu.
I think you want to set the baseline in the ISR (baselline-if is only executed once), otherwise time will pass from when setup() runs til the first interruptManitou - As noted it suits my expectation and purpose to validate the clock math is correct - the RTC 1 second isr() varies at most 10 microseconds according to elapsedMicros. The reported ppm is what I'm puzzled by the sketch you linked starts with ppm of '147660 to 800050' depending on the startup time: "2 2 1.742675 147660" or "2 2 1.111080 800050". With an elapsedMicros for updates I moved the 'set base time'=='normalization' into setup() to simplify the isr() - but haven't understood it well enough to pinpoint the anomaly I think I see.
You can easily make it compile by adding something like:if you're referring to pedvide's ADC lib, there is heavy lifting to be done there!
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
#define ADC_TEENSY_3_1
B]EDIT: RESOLVED[/B]
you need VREF_SC |= VREF_SC_VREFEN | VREF_SC_MODE_LV(1);
(attn: Paul teensy 3.1 also has that register, but it seems to be set 0xE1 in analog.c )
I confirmed this fix and am able to measure power supply voltage with 1.29 beta3 on 1.6.8 and new boards.txt on OS X 10.11.5
I still can't get A14-A22 to read the pin voltages. Assuming it is something on my end I am simplifying the code.
void setup() {
for (int i=0; i<=39; i++) {
pinMode(i, INPUT_PULLDOWN);
}
}
void loop() {
for (int i=14; i<=23; i++) {
Serial.print(analogRead(i));
Serial.print(" ");
}
Serial.print(" ");
Serial.print(analogRead(A10));
Serial.print(" ");
Serial.print(analogRead(A11));
Serial.print(" ");
for (int i=31; i<=39; i++) {
Serial.print(analogRead(i));
Serial.print(" ");
}
Serial.print(analogRead(A21));
Serial.print(" ");
Serial.print(analogRead(A22));
Serial.println();
delay(75);
}
for (pin = 0; pin < TOTAL_ANALOG_PINS; pin++) {
analogValue = analogRead(pin);
if (analogValue != previousAnalogValues[pin]) {
Firmata.sendAnalog(pin, analogValue);
previousAnalogValues[pin] = analogValue;
}
}
if ( eMs > 1000) {
eMs = 0;
qBlink();
}
Even worse at 216 Mhz - pitch is OFF - half speed?
I am no expert here, but have played some with SPI (more indirectly through other libraries, such as ILI9341...), but I think maybe a first step might be to create an SPI1 object in the SPI library.Question: what would I need to do to use the PTE* pins with SPI to read the microSD with the SD library ?
As noted in an earlier post (#243), I was able to do a low-level sector-read of the microSD using 4-bit SDIO on the PTE* pins, and one should be able to do SPI IO as well. (I did both on the mbed K64). PTE* are SPI1 (MUX(2))
mbed speak: SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // MOSI, MISO, SCK, CS
Not really, the serial remain stuck but appears correctly in arduino or terminal and, most interesting, remain stuck between restarts!
Me Too!As we add more buses, etc. to the microprocessors, I really wish we could go back in time, and add the i2c/spi/etc. object to the to constructor for various things that do i2c, spi, etc. Right now, it is hard to use existing libraries with the 2nd (or 3rd) i2c bus, and now the 2nd spi bus. It would be nice if we could just change the constructor and automatically get t3_i2c support for instance, rather than having parallel libraries.
uint8_t SPIS::transfer(uint8_t c) {
if (spi_index_ == 0)
return SPI.transfer(c);
else
return SPI1.transfer(c);
}
Any chance you could retry this with a fresh copy of Arduino 1.6.9 and Teensyduino 1.29-beta3 ? And check the messages Arduino prints, you make sure it's using the audio lib from that copy, rather than one in a location like Documents/Arduino/libraries? ...
"I:\arduino169\hardware\teensy/../tools//teensy_post_compile" "-file=Part_1_03_Playing_Music.ino" "-path=C:\Users\Tim\AppData\Local\Temp\build58fb5964f0a8959cc6e8246fad077b60.tmp" "-tools=I:\arduino169\hardware\teensy/../tools/" "-board=TEENSY35"
Using library Audio at version 1.03 in folder: I:\arduino169\hardware\teensy\avr\libraries\Audio
Using library SPI at version 1.0 in folder: I:\arduino169\hardware\teensy\avr\libraries\SPI
Using library SD at version 1.0.8 in folder: I:\arduino169\hardware\teensy\avr\libraries\SD
Using library SerialFlash at version 0.4 in folder: I:\arduino169\hardware\teensy\avr\libraries\SerialFlash
Using library Wire at version 1.0 in folder: I:\arduino169\hardware\teensy\avr\libraries\Wire
Sketch uses 36,392 bytes (3%) of program storage space. Maximum is 1,048,576 bytes.
Global variables use 9,800 bytes (3%) of dynamic memory, leaving 252,344 bytes for local variables. Maximum is 262,144 bytes.
#elif F_CPU == 216000000
#define MCLK_MULT 1
#define MCLK_DIV 19
#define MCLK_SRC 0
#elif F_CPU == 240000000
#define MCLK_MULT 1
#define MCLK_DIV 21
SAME MACHINE :: Using Franks numbers edited (only) into "Output_i2s.cpp" ( do QUAD and SPDIF needs edited too? )