@KurtE
Sorry for the delay. I downloaded the latest and greatest and going to have to change the enabling of the compare function. Decided to add this to the code as a test:
analogWriteFrequency(14, 60;
...
@KurtE
Interesting thing I just found out during testing using on the CMP function.
Since ACMP is on pins 26 and 27 you have to change the resolution on the adc1 (ADC4) to match the what resolution you are using...
@KurtE
Just added the last of the basic ADC functions, setOffset, to the base class.
Started looking at using the ADC_test sketch for some of this. But lost on checking errors. Not sure this is correct or will...
@KurtE
Though I had a problem with the compare code the after an hour or so realized I forgot to make a change in to use ACMP4 for the results. So code seems to be working.
As for the branches I will stick to the...
@KurtE
Yep added some stuff - basically the equivalent Compare functions for ACMP3 and ACMP4. Only tested a small piece of it. Think there is only one more easy piece to put in and that for adc offsets. Ran out of...
@KurtE et.al.
Added the ADC compare piece of the puzzle. Only tested on case for comparing on one value. Still needs some work - since I think I messed upped what pins are on what adc in code. Need a break - been...
Just a quick status. Left it on for 4 hours last know. PC went to sleep. When I woke it up it was still running and spewing data. The processing sketch picked up as well.
@KurtE
Sorry for the delay but its probably not a bad idea. As we get more into the pins configs it will save from having to copy it in the libs all the time.
Glad you added xbara2 and xbara3. So far haven't had...
@KurtE, @manitou, ...
For xbara1 stuff you can check out how I did I set it up for the encoder library. Made it pretty general or maybe not: https://github.com/mjs513/Teensy-4.x-Quad-Encoder-Library.
As for...
Good Morning @KurtE - days are all beginning to merge into one.
Solved my issue to get the current bits for adiv and clk and incorporated into the function. I also just pushed it to GitHub.
Cheers.
@KurtE
Got the hack working, now you have more options than you can shake a stick for adc clock speed. Only thing I need to fix is:
//ADC1
//NOTE: Only works once - have to change ADIV and ADICLK to get current...
@KurtE
Working on the clock module now - not sure I am doing it right I will post when I get done. Trying to understand as I go then next up I think is the Compare which is a bit more complicated since the DAC out are...
@KurtE et.al.
Trying to understand a bit more about the ADC clocks. Understand about using the IPG clock (also more noisy) but a bit confused on the Async Clock (ADACK). According to RM the ADACK is a internal...
@jonr - @KurtE
To test my theory of the changing the ADC clock i first ran the sketch in @KurtE's new version of the library for a baseline:
8:2:2:2(000005b3 00000000)> 255 6 7 : 255 0 8 : 255 1 4 : 255 1 4...
Just received my MLX90640 110FOV from sparkfun. Hooked it up to a Teensy 4.0 and a Teensy 3.5. In both cases it showed temp data and using the processing sketch it showed the thermal image as expected. Not very fast...
@luni
Thank for testing and glad its working. I forget to post that I did play around with your test sketch and seemed to be working. Got side tracked on other diversions which is way too common lately.
I did make...
Sorry I missed this earlier. MotionCal only calibrates the magnetometer and I believe when you run the examples sketches using the motionsense library it does do a quick calibration for the gyro but the accelerometers...
@KurtE
Good morning again :)
Think you are right about repackaging the test stuff. Make it look more like how the ADC.lib is organized in terms of function names.
What I posted showed that all its doing is recalibrating the magnetometer when you power up. Which is just moving the sensor slightly on power up.
As for your other question on stability data of the BNO055 after...
@KurtE - Good Morning as well.
As for ADC DMA think @manitou was playing with that in the beta thread: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=195136&viewfull=1#post195136 if interested. ...
Just tried the restore_offset sketch on the Teensy 4.0.
On initial calibration when calibration is completed I see this:
Fully calibrated!
--------------------------------
Calibration Results:
...
@KurtE
Did a quick and dirty test with the following 2 functions added to the sketch:
void setShortConvTime(uint8_t adc_num){
uint32_t tmp32, mode;
tmp32 = ADC_CFG_ADSTS(0); //set sample time duration to 2...
Well can you give me a bit more information. What Teensy are you using? You know it might not be the calibration but the environment you are in. Also not sure what you mean by noisy and random? Is the "noisy-random"...
Take a look at the example sketch "restore_offsets.ino".
That example sketch stores the calibration data in the Teensy EEPROM if the calibration data is not already stored and if it is will reload it. Good place to...
@KurtE
Head is still in a fog but it looks like all you did was ADC_CFG_ADSTS(3) to ADC_CFG_ADSTS(0),i.e., sample time duration from 17 to 2 clocks? Understand that part but then when I read the ADC chapter, pg...
@KurtE
Think you need to leave in the while(….) for doing the calibration. As for the wait_for_cal function we can probably get rid of it of just put the same lines of code in for calibration as in the init function...
@KurtE
To be honest was wondering myself. Since you are testing ADCx_GC & ADC_GC_CAL to see if cal is completed in a while loop calibration is completed when it comes out of the loop. Would think then calibration...
@KurtE
Yeah that's probably better change in wait_for_cal - couldn't sleep so jump on line while Theraflu was working :) That function is only used once in the analogRead function:
if (calibrating) wait_for_cal();
...
@KurtE
Nice catch and thanks for correcting. Checked Analog Resolution function to make sure that didn't have the same problem, but that was set up a bit differently so its ok.
Think there is a minor error in the...
@KurtE
Yep it handles them but it setups up the same resolution and averaging for both channels (ADC1 and ADC2). At least I think that is how it is currently working. Changing it this way allows you to change them...
@KurtE - @tasha
Ok tried the other route and adds too much complexity to the situation. So I just added T4AnalogReadRes(pin, adc) as well as T4AnalogReadAveraging(pin, adc) .
@KurtE - @Paul
Was going through analog.c again and was thinking since this is a lite version in order support the second ADC would it be better just to update analog.c to support the second adc?
@KurtE
Thanks. Going to have to update a couple of other functions as well. AnanlogResolution and analogreadaveragering. Just as a note may have to use that other function on reinitialiaztion of changes. Have a...
As @tonton81 suggested not sure if you have your connections correct but another sure way to test is to run a I2C scanner. If it comes back with the I2C address of the device you know you have it hooked up correctly.
@tasha
Just to let you know the default settings on initialization is to do a 32 point average using 10bit ADC. You might reduce the time by setting analogReadAveraging. Allowable averages are 4, 8, 16 and 32 point...
Installed on Windows10x64 with no problems.
Ran a couple simple usb serial tests.
Test 1 dumped three floats to the sermon with no delays in loop and it kept up with no issue.
Test 2: Used SerialPlotter to...
The "imxrt.h" file is part of the teensy cores files which is installed when you install Teensyduino.
For me the path looks like "F:\arduino-1.8.10\hardware\teensy\avr\cores\teensy4". So essentially navigate to...
Recently have been getting back into robotics and started playing again with using LIDAR for obstacle avoidance and 3d Room Scanning. Experimented with using the Neato XV-11 and LidarLite v4LED but finally settled on...
@defragster - @PaulStoffregen
Ran the code in Post 2 as well with the test string "1234567890123456789012345678901234567890123456789 01234567890abc" 63 chars plus NewLine :: Total 64". Got the same results as...
I would tend to agree with @defragster. In going through the various commits for the Talkie library there doesn't seem be voice.end() command available even in the original commit of the library so I am not sure what...
@KurtE
Great work on getting it working. Would never of thought about making that change to the pin configurations - was looking a more complicated change.
Here save you the time:
Have to get some coffee and the on to the other BNO once I find it :)
EDIT: Ok found it - tested a few of the sketches and they seem to be working. One funny thing seem to have to...
@KurtE
I just incorporated my setclock changes to get 3Mhz along with using the 60Mhz clock instead of the 24 Mhz clock and retested with your changes.
BNO080 - ran the rawReadings, timestamp and rotationVector...
@KurtE
Re: SETHOLD for MCCRO: Did you look at Table 46-9 pg 2879.
If you remember I have a PR changing that section so we can get up to 3Mhz:https://github.com/PaulStoffregen/Wire/pull/17. Here it is for your...
@defragster - @KurtE
Thanks for the post - never saw that one. 8 more to go. Probably missing something somewhere but when I go through wireIMXRT.cpp I don't see anything associated with timeout that is not commented...
@KurtE
Just as a quick and dirty test I reverted the T4 wire library to prior to the BNO055 change with the "hack checked if MFSR&7.." and retested with Lidar Lite V3 getDistance sketch and it worked with no problem. ...
@KurtE - as you already know neither I am but I do agree with you - the delays are just addressing the symptons not the issues. Just guessing at what could actually be wrong. Wonder if it would work if we revert the...
With the delays added seems to put things in synch. So the question is if with delays would seem to say it needs more time to get the all the data? Did you try with a increased buffer size?
EDIT:
Did you notice...
Yep odd indeed. Checked ground and power, even had it running off a ext 5v source with same results. Added 4.7k pullups to 3.3v on SDA/SCL. Note - it runs on 5v but has a builtin 3.3v level shifter for SDA/SCL. At a...
Well - not sure which library you are using or sketch on the above but something strange is definitely going on.
On another front, similar to this lib, the Teensy 4 is having problems with Garmin's lidar Lite V3...
Short answer is yes it will work with the ILI9341_t3 that is loaded as with Teensyduino. It will also work with the ILI9341_t3n library if you also has @KurtE's SPIN library installed
@Kurte
Oops - forgot something. In the Sketch itself you may need to put a delay(50); in the imu.availiable (see post 19):
if (myIMU.dataAvailable() == true)
{
float quatI = myIMU.getQuatI();
float...
@KurtE
I downloaded directly from the Sparkfun GitHub for the repository. Start with sample sketch: Example 15-RawReadings.ino. That seemed to work for me right away after my changes. Just to make sure you have...
Yeah I just reordered the boards without USB and looked closely at the following screens and this time I checked off the box for 0.8mm. Guess we will see what happens in a few weeks.
@KurtE and @FRDM4236...
Strange that you got the right boards and my came in different config. I ordered from this link https://oshpark.com/shared_projects/vzG532jm. Unfortunately I missed changing the thickness...
@FRDM4236
Just wanted to let you know that I just received a set of FRDM4236 breakout boards without USB Host and a set of FRDM4236-V3 with USB boards. OSHPark didn't route out the cut holes in the middle of the...
@DerekR
If the PRJC Encoder Library is working I really don't see any reason to switch. It does have the advantage of being able to use any pair of digital pins while the Hardware Encoder library is limited to the...
I have a library based on NXP Quad Encoder SDK driver for the Encoder module but modified to support the Teensy 4.x infrastructure.
NOTE: you will need to incorporate the Update imxrt.h for encoder structure #402 to...
The ArduinoGL_t3 library (https://github.com/mjs513/ArduinoGL_t3/blob/master/README.md) is a port of the ArduinoGL library by fabio914: https://github.com/fabio914/arduinogl. The lib was modified to support...
Poking around Google I found that Cypress makes these type chips: https://www.cypress.com/documentation/datasheets/s25fl064l-64-mbit-8-mbyte-30-v-fl-l-spi-flash-memory. They look really interesting.
Yep - think the sledgehammer will be the way to go for me - to be honest think its cleaner (or easier for me to understand whats going on. That will be the project for when I get back from my errands.
@KurtE
That's strange - wonder why its showing them as additions when I do a diff: https://github.com/PaulStoffregen/ST7735_t3/pull/4/files? Probably me then
Besides using @KurtE's WS2812Serial modified library did you remember to update your imxrt.h file with the corrections to the DMAMU_SOURCE
I just ordered a couple of strips from Amazon for testing.
@JupiterMoll - @KurtE
Looks like available pins are any SerialX Tx pins (see WS2812Serial.cpp)
// Teensy 4.0: 1, 8, 14, 16, 20, 24
EDIT: From what I saw the WS2812 leds are 5v so to use with a T4 you might need...
@KurtE
Was looking at the diffs between my version and Paul's version since my ST7735 lib seems to be 7 commits behind the master (figure they should be close to be even). I did notice a couple of things with DMA...
@charlescarver
If you are using the PulsePosition library on the T4 you may want to take a look at the PulsePositionIMXRT.cpp file. There are several timing parameters that are hardcoded in the library. I extracted...
Yep - just finished an update. In addition to changing the logical test for really a DAC pin I also set it up to default to pin A0 for the Teensy 4 if no begin(pwmPin) is specified. Sorry it took so long to update...
If you look at the second post in that thread:
The only other thing is that it was only applicable to the T3.1 and probably will still work for the T3.2. No similar function exists for the T4
Will double check and update.
Just as a note I have the same display and tested it with both libraries. It both cases did not have a problem. In addition to checking that you have installed the latest Teensyduino...
@defragster and others
Just did a PR to update Talkie to single begin: https://github.com/PaulStoffregen/Talkie/pull/6
1. If voice.begin() will default to DAC if available and you can use the propshield in the...
I agree with @defragster. That SD socket is a lot better for soldering and testing. Having to remove the cover on the old one and put it back on was a challenge.
The cable is a lot better as well for soldering. ...
Been playing with servos for a couple of projects and I know that this might be a sin but it would be nice if a few of the PWM pins could be 5v tolerant - know they all won't be but a few would be nice.
@defragster - just woke up and the more I think about I think we are saying the same thing. Actually sleeping on it can do it with one begin statement. Can replace this
void Talkie::beginPWM(uint8_t pinPWM){...
Actually that piece of code was changed to:
if(_hasPShield) {
#if defined(__MKL26Z64__)
analogWrite(A12, nextPwm);
#elif defined(__MK20DX128__) || defined(__MK20DX256__)
analogWrite(A14, nextPwm);...
The Teensy encoder library does work with the T4 - had tested that a couple of times with the T4 in beta testing so unless something drastic changed....