@mjs513 - Hope you are doing well.
As for new branch/master/DMA.. hard to say, I started new branch as there are at least the two of us, and did not want to break everything yet.
I am trying to decide for...
@mjs513 - I see that you added some stuff...
Note: I just pushed up a new branch DMA_SUPPORT -
Where I am trying get some of the examples to be able to build and then hopefully work like the ringBufferDMA test...
@mjs513 - Still totally distracted :D Hopefully later today I will maybe have the opportunity to concentrate a little.
I probably should start off hacking something up, but I find myself wanting to generalize...
Again hard to say what all you need or don't need. Or what your plans are.
I personally just use the Arduino setup, which is fine for the things I wish to do.
Understanding the board. I assume you found the...
@mjs513 - will take a look..
Here is a sublimetext mucked with table for XBar1...
Wonder this would be valid/reasonable addition for imxrt.h? And if so do I need to do XBAR2...
// XBAR1 Inputs and Outputs...
@mjs513, @PaulStoffregen @manitou, ...
Thought I would see how hard it is to do ADC using DMA at some specific sampling rate, Example for trying to guess if an power is running to a well pump, so with T3.6 I setup...
Hi @mjs513 - Yep more coffee (Feel free to PR it)! You probably know more about all of this than I do!
@jonr - DMA does not look too hard to add here... Again @manitou has example app, which I will try out soon
@mjs513 @manitou... Yep I did clone that project down to my disk as well and I am curious about how one sets up to do DMA from the ADC at a specific input rate.
That is with my always never completed well monitor...
@mjs513 - Me too, but when I did not find it in RM, decided to look.
Just pushed up a quick and dirty ReadMe.md file which is a copy of pedvide's Readme with a warning at top that this is a WIP and who knows what...
Others can maybe give you more exact answers to this...
But void* just means it is a pointer to something... So often times with functions like this, I will then cast it to something like uint8_t* to process.
...
@mjs513...
I have been playing around with a semi stripped down version of ADC, which for now I put up on github... I am not sure if it will stay or not...
But if you want a laugh...
...
@someteen (@PaulSoffregen) -
As has been mentioned several times before, I have absolutely no idea how they or who might try to encode the 9 logical bits of data if it is begin sent back and forth over USB...
...
I believe the AVRC5S is simply another level of protection. For EMI and ESD... I have not used them yet on my own boards... http://www.1688eric.com/upload/pdf/2012-9-11/AVRC5S05Q050100R.pdf
My guess if the circuit...
Hi and welcome @Fikri - Might help to know which Teensy... For now I will assume T3.x, TLC, or T4... (ie. not T2), and also which servos. i.e. some libraries only support Protocol 1, so if your servos use protocol...
I just updated my Early 2013(or 14) MacBook Pro to Catalina.
Then downloaded your package. I tried running, and it did not want to run... So Ctrl+click and run and then it appeared to work fine after. I...
@mjs513 - Thanks, I thought I remembered seeing something during beta..
Wondering with our hacking if we should repackage the test stuff to be more like: ADC Light?
That is to convert the stuff into an object...
@mjs513 Good Morning,
Good question? Especially if the goal might be to get this functionality into core?
Or should we aim to be semi-aligned with the ADC library? The only place that I have played much with...
Since it does the same thing on an Arduino Uno, if you have not already done so, you might try asking about this up on the Adafruit forum...
You might also mention things like, what version of Arduino you are using...
Have you looked at the keypad library?
Not sure which is best example, but examples->keypad->EventKeypad is one...
WHich takes care of rows and columns...
More information up on google searches, like:...
Not sure what you have tried or looked at?
Have you looked at the PJRC pages like:
https://www.pjrc.com/teensy/td_joystick.html
as part of this, have you looked at the example sketches like:...
@mjs513 - Yep I just copied the 8 bit setup to a special 8 bit setup..
As I noticed that already the 8 bit mode did not turn on the ADLSMP bit, like 10 and 12 do...
void T4AnalogReadRes(unsigned int bits, uint8_t...
@jonr - we have a T4 that is small and inexpensive. But Paul asked what pins we might want in a T3.6 form factor as per post #1
Edit: I meant to mention, that I am not in full disagreement, just that thread is...
@mjs513 I hacked up my version of code to add in a mode to set the resolution to 0x88 and if so it is 8 fast...
Quick and dirty T4 Analog Read stuff
8:2(000007a3 00000000)> 3 127 6 : 10 127 7 : 1 126 3 : 1 127 4...
@mjs513 - Quick update: If you look at my previous post, with the updated test sketch that sets both the resolution and averaging.
And you look at the output line: 8:2(000007a3 00000000)> 0 127 7 : 10 127 6 : 1 127...
@mjs513 - Will probably leave init and the wait for calibrating alone (if it aint broken... )
In Your previous post, this line just feels wrong:
mode = ADC_CFG_MODE(1) | ADC_CFG_ADSTS(0) | ~ADC_CFG_ADLSMP |...
@Paul - any updates?
Some things I am very curious about, is how compatible will the T4.? be with the T3.6 layout?
Example can I drop in one of these instead of a T4 and use the USB host pins? That is will the...
My guess is that it by default in high powered mode, as I don't see anywhere in the code base that sets: DAC_C0_LPEN
You did not give any reference on how you are using it? Are you using external library....
But...
@meo - Maybe on buffer1 but for sure in your original program, the global variable i. That is your code has(d):
void setFlagandReadBuf() {
i = 0; //to be repeated that we measured for...
@mjs513 - I think it, is either a hold over from T3.x analog code or, we ran into some issue, added code to init and...
That is I think we can either get rid of the line: if (calibrating) wait_for_cal();
AND the...
@mjs513 - Yep, my problem is, when is calibrating ever not 0?
The only places I see it ever set, is in the init function:
...
//ADC1
ADC1_CFG = mode | ADC_HC_AIEN | ADC_CFG_ADHSC;
ADC1_GC = avg |...
@mjs513, @PaulStoffregen - I updated my changes that I pushed to include the above.
Good catch on the init function looking at the wrong one.
I did update the wait_for_cal, sort of like you mentioned, except, I...
@mjs513 I went ahead and hacked in the function I mentioned...
Also put in loop calls to set the averaging... Although I just used the default one so far..
usbHost - Something new and shiny to play with?
My quick look through the functions, analogResolution and analogReadAveraging, I thought they were both already handling both ADC1 and ADC2
Example analogReadRes:
void analogReadRes(unsigned int bits)
{
uint32_t...
@tasha @mjs513 - I hacked up a version of AnalogRead that allowed me to choose a channel 1 or 2 to do conversion.
Also did a version where I broke it into two parts. First starts conversion, second checks or waits...
Works for me...
I modified your code slightly as to remove the overhead of calling main:
#define MCLK 9
byte pulse = 0;
void setup() {
pinMode(MCLK, OUTPUT);
}
Still playing with it...
With my own board, which I hopefully fixed some of the issues I was having running the Servos. Like wrong resistors, maybe cold solder...
And what may be a bad AX servo, I plugged in an...
@tsaha - As I have mentioned I do most things in digital, so others maybe can help more.
It would be great if the library ADC was ported over to the T4. But it looks like the owner (pedvide) of it, has not been up...
@wwatson - Wondering how much different is this than the RA8875 boards? i.e. wondering if it makes sense to add support for this board into the RA8875 library code that we forked from Sumotoy?
As you mentioned...
@Paul - great to see the USB stuff being updated! Trying to decide if there are enough people beating up on this and wait...
For now I may simple install fresh copy of Arduino 1.8.10 into new directory and do an...
Thanks @KG5NII - understand.
Compatibility is an interesting thing.
Yes - we did play around with the buttons, as to make them to be compatible with the more current Adafruit GFX code, which originally the...
Quick update, I am running your sketch, and I am seeing CR and LF...
That is: Some output:
this loop(): 11 µs
dmaRXisr: dest=0x20000D3C
prev loop(): 67391 µs...
I will try to take a quick look.
I did pull out an Adafruit Ultimate GPS unit out of my displays and sensors box...
I wired it up to T4 to Serial2. Did a quick and dirty sketch:
void setup()
{
while(!Serial...
I know there have been a few different conversations about this in different threads, but as I testing out some stuff on T4 again, and ran into the issues, I thought I would mention it again, and see how much if any...
Good luck.
When you mention switching to different library and causing more trouble than it is worth... Would be interesting to know what the issue may be.
That is in theory the code base should be compatible...
Works for me...
However make you are editing the version of the library being used...
That is when I edited it, I changed it in my <documents>/Arduino/libraries/wire directory as I have a private version (github...
Quick update: I thought I would try some of it out with the recent T4 board I assembled...
Found out I screwed up on the board and when I did a copy and paste of a couple of resistors, I forget to edit the values so...
As I mentioned ILI9341_t3 does not support Opaque text drawing when you set a font, such as: tft.setFont(Arial_24_Bold);
However as I mentioned: ili9341_t3n does...
https://github.com/KurtE/ILI9341_t3n
Which...
@PaulStoffregen - That will be great!
@Gadget999 - In the mean time, you might be able to play around to see if you can avoid the issue...
And again I don't know if it would work for you or not. At different...
As for the Circuit - I have not used that form of circuit with a teensy.
I either use the built-in teensy half duplex support or I use a driver chip(or chips)... Both are supported by my older bioloidSerial...
Yep - as @neurofun mentioned you have the option to either output transparent or opaque depending on if you set the background color or not...
Also as you have not shown complete code, we can only guess that you are...
@defragster - wonder if I need to learn more about how VS... works and try to build a version that is totally stand alone and does not require run time support?
Hi @xoxu - I am not sure if there is any easy answer to your set of questions. But I will do my $.02 worth of stuff.
I have used several boards over the years to control typically up to about 20 servos. 3 DOF...
For what it is worth, this built and run on T4...
PROGMEM const char buffer = {0};
void setup()
{
while(!Serial && millis() < 5000);
uint32_t sum = 0;
for (uint32_t buffer_index = 0; buffer_index <...
Some of the others might be able to give better answer, but having a voice.end() makes sense.
Until then you can probably get the pin back by doing something like:
pinMode(A14, INPUT);
I have not looked...
Screen update speed - Is more likely to be bounded by SPI speed than the processor speed. So probably no real difference. RA8875 Speed - a lot depends on what you are needing it to do. If you do several primitives...
What I wonder from your posting #8, why it does not support Teensy?
Could it be that it does not like the other HID protocol defined for the Serial emulation?
I don't remember how hard it is to try to configure...
I could be wrong, but I believe that when the teensy is setup to emulate a keyboard it is setup to be boot protocol...
That is:
#ifdef KEYBOARD_INTERFACE
// interface descriptor, USB spec 9.6.5, page...
I don't see anywhere where you are enabling the interrupt? That is the IMR register and probably maybe need to setup ICR1 and/or ICR2 depending on which pin...
Also when I mention not putting code into constructor, but instead into setup (sort of paraphrased), I am not implying you need to as @luni mentioned (which is fine),
but instead maybe reorganize the code...
Again take this with a grain of salt...
But you might show a picture of your setup, to make sure there is nothing obvious going on.
Examples: like the T3.6 plugged into breadboard but the pins were not soldered...
Warning: I am mostly a digital guy... But wondering how you have all of it hooked up?
That is is your setup to look at the analog value setup to use the Analog Ground? Or is your sample device (battery) setup to go...
Sorry, I have not played much with this part of the code, but the first things I would try is to send KEY_DELETE directly...
Does that send? If so then the issue is you are truncating the value to a byte whereas the...
Maybe, but maybe it does and is overwritten by next line of text...
Maybe try something like this to print instead...
for (int i = 0; i < SAMPLES / 2; i++)
{
if ((dest >= ' ') && (dest <= '~'))...
Quick notes, suggestions...
In cases like this, it might actually help us to give suggestions, when you are a bit more exact information. Like what is not working? How do you know? ISR not called? your motor did...
Thanks, I think the biggest thing was that the (My) fix for BNO55 took sledgehammer approach for clearing the FIFO queue if you ever entered the endTransmission, or requestFrom functions, which KILLED the ability to do...
Thanks @mjs513... Already did the edit, plus remove my added digitalWriteFast calls and ran it on BNO080 and looks like it is working. I pushed the changes up to github.
Looks like the starts/restarts are not as...
Sounds like, I should/will incorporate your speed changes and run them again on mine.
We probably should also try the other BNO... and see if it still works as well.
Kurt
EDIT: Forgot to mention - Yes I had...
Still trying to get better handle on it.
But I did push up a WIP branch (https://github.com/KurtE/Wire/tree/T4_BNO80_issues)
Modified Test app works some of the time:
/*
Using the BNO080 IMU
By: Nathan...
I think there could be multiple parts to the clock stretching.
First in I2C registers MCFGR1, the PINCFG field which we don't set. But if you look at PINCFG(0) it says: Bi-directional open drain for master and...
@mjs513 - Still shooting blanks...
But I also notice that there are delays associated with Starts.
Example here is the send of reset (first thing done by BNO980)
Now look at same thing from T4: Notice long...
@mjs513 - I am thinking that the delays may sort of at times limp around some issues in the Wire library. In particular when it does two
requestFrom requests in a rwo, where it still has control of the buss ...
Next update: I hooked up To 3.5 using QWIIC with their breakout cable - unchanged Sparkfun code. And see:
And again some dump of the start of the LA info:
Time ,Packet ID,Address,Data,Read/Write,ACK/NAK...
@mjs513, @defragster, @Paul...
I sort of backed off, the changes (back to Sparkfun current release to get ideas of what maybe is going on
Thoughts so far, or better yet wondering, what maybe differences in T3.x...
@mjs513 ...
At times I get responses, if I cold startup, other times, like download program again it looks like it hangs>
BNO080 Read Example
sendPacket complete
Softreset complete
Raw MEMS readings enabled...
FYI - I emailed Nathan about it and got a response...
If I get a chance I will try to grab one of my older Lynxmotion Rover or Tri... Which I think still has a roboclaw in it and see if I can get a quick and...
@someteen - again repeating that it is pure RS232 or the like does not help. As we have mentioned for the thousands of times...
All we can do is to give suggestions on how you might figure out how THEY do it... ...
@mjs513 and @ckmiauto - Thought I would take a look as I now have one plugged into my T4 (with T3.6 foot print via FRDM), with QWIIC connector.
And the Wire Scanner program is finding it, so it looks like maybe I did...
Try looking at the thread: https://forum.pjrc.com/threads/58442-Non-Blocking-WS2812-LED-Library-and-Teensy-4-0
I have 3 updated libraries (with PRs) to support WS2812Serial library which required a fix in the main...
Sorry, I have positively no idea.
I am glad that an RS232 standard is clear to you. The issue is that is an RS232 standard not necessarily a standard CDC_ACM standard..
I assume you read the information in the...