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

Search:

Type: Posts; User: Pedvide

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. It's fixed now in github.

    It's fixed now in github.
  2. Replies
    3
    Views
    188

    The latest version on github works with Teensy...

    The latest version on github works with Teensy 4.1.
  3. It depends on the Teensy that you have and the...

    It depends on the Teensy that you have and the speed you set up, but usually a measurement takes at minimum 1 us, so probably it's doable to read 10 sensors in 1 ms. It will depend on what kind of...
  4. The results are capped to the resolution, so if...

    The results are capped to the resolution, so if you are using 8 bits then the max is 255 and that's what you should see. There's no overflow or anything like that.
  5. However the minimum conversion time of a T4 is...

    However the minimum conversion time of a T4 is probably around 0.8 us, so you can maybe hope to get closer to 1000ksps, but not much more
  6. You can look into using DMA to copy each...

    You can look into using DMA to copy each conversion into a buffer and when it's full switch to a different pin. I think the library has DMA examples, but none with linking pins.
  7. Well, it's not really a ADC feature it seems. You...

    Well, it's not really a ADC feature it seems. You can use the library to start a software or hardware conversion and then you can set the board in wait mode. That I don't know how to do, but it's...
  8. I'm not sure what exactly you want to do, you...

    I'm not sure what exactly you want to do, you quote quite a few things...

    The ADC library supports using the async clock source (ADACK), so it should ran in low power modes without problems. You...
  9. ADC *adcX = new ADC(); ADC *adcY = new ADC (); ...

    ADC *adcX = new ADC();
    ADC *adcY = new ADC ();

    This is wrong, you should only create one ADC object. Please see the examples.
    The ADC object controls both adc modules ADC0 and ADC1.
  10. Replies
    12
    Views
    471

    In the ADc I abstracted most of the differences...

    In the ADc I abstracted most of the differences to two files: a settings file with what each board can do and a hardware access layer to handle the different atomic access styles.
    In the code I have...
  11. I think in Teensy 4 it's actually possible using...

    I think in Teensy 4 it's actually possible using one of the timers, but I haven't implemented it.
  12. So given that message you found, what else do you...

    So given that message you found, what else do you need to know?
  13. The maximum is 3.3 V, it doesn't matter if you...

    The maximum is 3.3 V, it doesn't matter if you use the differential or single-ended mode, the limit is the same.
  14. Replies
    4
    Views
    318

    I don't remember it exactly, but I think that...

    I don't remember it exactly, but I think that information is in the electrical specs sheet. For the Teensy 4 the asynch clock can run at 10 or 20 MHz.
  15. Replies
    27
    Views
    1,059

    Hello Deane, The example conversionSpeed runs...

    Hello Deane,

    The example conversionSpeed runs over all possible configurations of the board and prints out the conversion speed for both the single-shot analogRead and the continuous mode. You...
  16. Replies
    13
    Views
    2,018

    If you are already using the ADC library you can...

    If you are already using the ADC library you can get the voltage of the temperature sensor with

    int temp_volt = adc->analogRead(ADC_INTERNAL_SOURCE::TEMP_SENSOR);
    You can convert it to the...
  17. Teensy 4 support is official! I have updated the...

    Teensy 4 support is official! I have updated the first page and the code is available on the github repo as usual.
  18. Replies
    201
    Views
    8,547

    (Note: PGA is the programmable gain amplifier, it...

    (Note: PGA is the programmable gain amplifier, it has nothing to do with frequency).
    Indeed for the older Teensys I implemented some functions using the PDB, I'm open to add a the generic method you...
  19. Replies
    201
    Views
    8,547

    Hello @KurtE and @mjs513. The teensy4 branch...

    Hello @KurtE and @mjs513.

    The teensy4 branch for the ADc library is pretty much ready to merge into master (I'll do it tomorrow). The library works for all Teensys since 3.0, using a similar...
  20. With the help of KurtE and mjs513, this library...

    With the help of KurtE and mjs513, this library will be updated for Teensy 4 in a few days. I'll make an announcement and update the first post.
  21. You can use the PDB to trigger ADC conversions at...

    You can use the PDB to trigger ADC conversions at a fixed rate with the ADC library.
    Then you can use the DMAChannel library (it's part of the core library) to transfer the ADC readings into a...
  22. PumpkinEater, please post your complete code....

    PumpkinEater, please post your complete code. What are you connecting to the ADC pin? the DAC output?
  23. Yes and no. You need to invert the statements...

    Yes and no.
    You need to invert the statements in #2. When you call adc->setReference(ADC_REFERENCE::REF_3V3,ADC_0); it will stop the VREF, which is shared with the DAC. You can then call...
  24. Well, I guess that's something that ADC library...

    Well, I guess that's something that ADC library should allow. I think the idea of sampling several pins periodically is interesting so maybe I can try to implement it. Probably I'd implement it so...
  25. I think that should work, but you need to switch...

    I think that should work, but you need to switch on the VREF (I don't know if it's on by default) with
    VREF::start()

    VREF is included by the ADC library. You can stop it with
    VREF::stop()
  26. Yes, if you have the Audio library use the ADC0...

    Yes, if you have the Audio library use the ADC0 then you can use the ADC library to measure with the ADC1. However there's only one PDB module, so only one of the libraries can use that at a given...
  27. Your spreadsheet isn't right, have a look at...

    Your spreadsheet isn't right, have a look at mine: https://docs.google.com/spreadsheets/d/1OSILeHUIY9x1FphI3T3Iv0ci9CLovjsvGqLs5a-BUlw/edit?usp=sharing

    I've actually discovered a bug in the...
  28. Replies
    3
    Views
    1,130

    Continuous mode means that the ADC is measuring...

    Continuous mode means that the ADC is measuring all the time; that is, it doesn't stop when it gets a result and keeps updating it. Based in your description it's not really what you want.
    If you...
  29. Those errors indicate that the latest version on...

    Those errors indicate that the latest version on Teensyduino is not installed. I can't help you because I have no idea about that platform, sorry.
  30. Thread: Arduino or C

    by Pedvide
    Replies
    8
    Views
    2,091

    digitalWriteFast(LED_BUILTIN, HIGH); shows how...

    digitalWriteFast(LED_BUILTIN, HIGH); shows how you can have easy to use and understand zero-cost abstractions. They are zero-cost in two senses: no inefficient ASM code and no mental burden on the...
  31. VREF_SC_MODE_LV_HIGHPOWERBUF was added "recently"...

    VREF_SC_MODE_LV_HIGHPOWERBUF was added "recently" to kinetis.h (not sure when). So I guess he had a moderately old version of Teensyduino.
    The comment on RingBuffer only says that I needed to...
  32. Replies
    3
    Views
    2,398

    The standard way is using...

    The standard way is using value*3.3/adc->getMaxValue(ADC_0); where value is int value=myADC->analogRead(ADC_INTERNAL_SOURCE::TEMP_SENSOR); but as you can see there are a few options.
  33. You should probably substitute...

    You should probably substitute ADC_Module::channel2sc1aADC0 by ADC::channel2sc1aADC0. But I don't know why you want to use that example. Have you looked at the ADC library examples?
  34. Replies
    6
    Views
    2,112

    Yes, depending on the conversion rate that you...

    Yes, depending on the conversion rate that you want you should lower the sampling and the conversion speeds, especially the sampling one as your converted voltage is lower than your input voltage...
  35. The fastest the ADC can work on a Teensy 3.2 at...

    The fastest the ADC can work on a Teensy 3.2 at 96 MHz is about 1 us. If you use the T3.6 at a higher clock rate you might get a faster rate, however the accuracy of the results won't be guaranteed.
  36. Replies
    11
    Views
    11,861

    aaaxon, The ADC library is fully stable with...

    aaaxon, The ADC library is fully stable with Teensy 3.5 and 3.6. Of course there may be bugs, like in all software. Thankfully many people use it and report them.

    You're right that nobody can...
  37. Replies
    11
    Views
    11,861

    I've never used AREF, but I can tell you that, as...

    I've never used AREF, but I can tell you that, as far as I know, it's an input only pin. You need to provide enough current at your desired voltage though, I'm not sure how many mA are needed....
  38. Replies
    11
    Views
    11,861

    If you see an error in the ADC library, please...

    If you see an error in the ADC library, please post it here: https://github.com/pedvide/ADC/issues
  39. I agree with Paul, to get 12 real bits you should...

    I agree with Paul, to get 12 real bits you should probably convert at 16 bits, hardware average and a low impedance. It can be done, but it also depends on the speed that you want to get the...
  40. I'm looking into these issues, but I have a lot...

    I'm looking into these issues, but I have a lot of work. I hope I can do something on the weekend.
    Please note that Teensy 3.6 only has one differential pair!
    Also I see that you're casting the...
  41. The errors are in ADC_Module.h, but more...

    The errors are in ADC_Module.h, but more importantly is that that's a bug in the library for the Teensy 3.6!
    Please, go to https://github.com/pedvide/ADC/tree/dev and use that version of the...
  42. Arctic_Eddie, A similar image for the ADC0/1 for...

    Arctic_Eddie,
    A similar image for the ADC0/1 for Teensy 3.1/3.2 is in page 1.
  43. keraba, I can't reproduce the behavior that...

    keraba,
    I can't reproduce the behavior that you're seeing. Using your code I get expected values when I connect A2 to GND or 3.3V. Check this yourself with the latest version of the library (I don't...
  44. The correct names are updated in the github...

    The correct names are updated in the github repository!

    keraba,
    You're only changing the sampling speed, not the conversion speed. The sampling part of a measurement takes a few ADC clock cycles,...
  45. There's something strange with the link, open...

    There's something strange with the link, open doxygen/html/index.html directly, that should work.
    I'm preparing a update that will break some things, so I wanna test it before committing it to...
  46. You can't do that, unfortunately. I'm actually...

    You can't do that, unfortunately.
    I'm actually working on a "AudioInputAnalog1" object that can be used exactly the same way. However in the future having a AudioInputAnalog object that simply gets...
  47. Replies
    6
    Views
    8,963

    The maximum ADC clock speed for Teensy 3.5 is a...

    The maximum ADC clock speed for Teensy 3.5 is a bit faster than for the rest, 24 vs. 18 MHz (not for 16 bits precision, for which it's 12 MHz for all boards).
    In the ADC library, this means that the...
  48. golden2620, I suggest you use a independent...

    golden2620,

    I suggest you use a independent source for the source. You are using interrupts to generate the source and to read it; this can fail when other higher priority interrupts happen. Also...
  49. MaximeD, I'll rewrite RingBuffer and...

    MaximeD,

    I'll rewrite RingBuffer and DMARingBuffer soon. They never really worked well.
    The new design will be:
    RingBuffer: Purely software circular buffer, baed on interrupts
    DMARingBuffer:...
  50. Replies
    17
    Views
    3,914

    If your values are less than 1.2V high then maybe...

    If your values are less than 1.2V high then maybe you could use the internal reference, that should be more isolated.
    Or even an external reference that is isolated from the USB power somehow.
Results 1 to 50 of 293
Page 1 of 6 1 2 3 4