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

Search:

Type: Posts; User: Jp3141

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    362

    Yes. The input signal is the resistance. You can...

    Yes. The input signal is the resistance. You can power the sender from any voltage -- the 3.3 V supply on Teensy is convenient. In any automotive system, you need to protect against transients and...
  2. You don't really need an opamp. If you don't...

    You don't really need an opamp.

    If you don't need perfect accuracy, connect 2 resistors in series between the +3.3 V and -3.3 V line that you want to measure. Connect the junction to the ADC...
  3. for this part - "Also, the 1/15Hz = 66,666 us....

    for this part - "Also, the 1/15Hz = 66,666 us. (mark of the devil!) which is > 65,536." --could you have a timer for 1/30 Hz and then in the callback just skip every 2nd one ?
  4. Replies
    6
    Views
    151

    Try this -- connect one input to VDD (3.3 V), and...

    Try this -- connect one input to VDD (3.3 V), and the other to GND. Then run a small sketch that reads alternately between the two inputs -- see how slow you have to go to only (mostly) see codes...
  5. Replies
    50
    Views
    846

    The reference for the ADC is the VDD (3.3 V)...

    The reference for the ADC is the VDD (3.3 V) supply -- from a TLV75733P. This only has 1.5 % accuracy, about 200 uV p-p noise in the BW you are using, and probably a change of a few mV over the...
  6. Yes, that spike could be bad. Add 1k in series...

    Yes, that spike could be bad. Add 1k in series with the input, or just in series with the 10 uF.

    You don't need to use 1k & 220 Ω -- they make the cutoff frequency too high for audio (10 uF &...
  7. Be careful -- a very large DC offset on the input...

    Be careful -- a very large DC offset on the input (say 5 V) could damage the Teensy when it is initially plugged in because the initial step as the 10 uF is charged will be driven straight into the...
  8. Replies
    47
    Views
    1,586

    I looked at interrupt-driven ADC conversions some...

    I looked at interrupt-driven ADC conversions some more. Using this ISR:

    FASTRUN void ADC_loop(void) {
    digitalWriteFast(admarkpin, HIGH);
    adc->adc0->startSingleRead(A9); // start a single...
  9. Replies
    47
    Views
    1,586

    At 8 bits, quantization errors possibly make...

    At 8 bits, quantization errors possibly make STDEV analysis inaccurate -- you may have a DC input that falls well within an ADC conversion step, thus giving 0 STDEV (even with some noise on the...
  10. Replies
    47
    Views
    1,586

    @borgerson -- yes, it compiles; I don't think the...

    @borgerson -- yes, it compiles; I don't think the variable sizes are the problem. What seems to be happening is that at > 10 bits resolution, I can't run 1 ADC at 1 MHz - I need 500 kHz for 12 bits,...
  11. Replies
    9
    Views
    206

    Thanks all. It seems like ...

    Thanks all. It seems like

    NVIC_SET_PRIORITY(IRQ_PIT, 1);
    and
    myTimer.priority(1); // set high priority

    have the same effect of raising the priority.

    Furthe looking through my code, it...
  12. Replies
    47
    Views
    1,586

    @mborgerson, I can't get your 1st post to work on...

    @mborgerson, I can't get your 1st post to work on a T4.1 (with a PSRAM also) at anything other than 8 bits. Am I missing something simple ?

    I have tried changing these lines:

    ...
  13. Replies
    9
    Views
    206

    But how can I find what other interrupts are...

    But how can I find what other interrupts are using priority 0 and move them to (say) 8 ?
  14. Replies
    9
    Views
    206

    But how do I do that specifically ? I don't know...

    But how do I do that specifically ? I don't know the interrupt number.

    I tried NVIC_SET_PRIORITY(IRQ_PIT, 1);?

    and ...,0); -- that helps and reduces the jitter from 10's of us to about 1us. I...
  15. Replies
    9
    Views
    206

    IntervalTimer interrupt priority

    I have a simple demo on Teensy LC that generates an interval timer interrupt nominally each 10 ms and toggles a pin. However the interrupts (or pin toggling) don't come at precise intervals. Here is...
  16. Replies
    2
    Views
    186

    It probably won't damage anything -- the '5 V'...

    It probably won't damage anything -- the '5 V' will rise to the highest of the USB voltage and the external supply. In the worst case, the USB power supply will current limit or shutdown (in some...
  17. Where did digitalToggleFast() come from ? I can't...

    Where did digitalToggleFast() come from ? I can't even find it on Google. What other useful functions am I missing ?
  18. Given that it is driving a mechanical system, the...

    Given that it is driving a mechanical system, the requirement to have the phase change smoothly by 'x' ns every single cycle isn't real -- it just requires that the average does this.

    It still...
  19. There is only a single DAC output on the...

    There is only a single DAC output on the Teensy's. But your VOR probably doesn't really need a sine wave -- likely a square wave will do, and you can generate those from PWM signals -- to get your...
  20. Replies
    35
    Views
    814

    There has been some interest in this question. I...

    There has been some interest in this question. I setup a test with a Teensy_LC where I supplied an external DC signal, and monitored it with both the Teensy and an Agilent 34410A DVM using USB for...
  21. Replies
    5
    Views
    186

    Try load this file...

    Try load this file https://github.com/tloimu/adapt-ffb-joy/blob/master/downloads/adaptffbjoy-r54.hex by using the Teensy application (File..Open HEX File).
  22. Replies
    9
    Views
    673

    My favourite tool :D For Windows users -...

    My favourite tool :D

    For Windows users - here's a copy of AWK: https://sourceforge.net/projects/ezwinports/files/gawk-5.1.0-w32-bin.zip/download
  23. Replies
    9
    Views
    673

    I'm back on this again. I created a simple script...

    I'm back on this again. I created a simple script that I run manually to generate a #include file. The script is:


    awk 'BEGIN{print "Serial.println( F( \\"}{gsub("\"","\\\"");print "\"" $0...
  24. Replies
    4
    Views
    1,093

    Can someone please post an example of how to do...

    Can someone please post an example of how to do this ?

    I'm confused over the number of endpoints I need; where the unique number is for each interface (is it 'PRODUCT_ID') ? Is DEVICE_CLASS...
  25. Replies
    6
    Views
    380

    Thanks -- that works, but I agree it's quite...

    Thanks -- that works, but I agree it's quite twisted; I'll wait until I am really out of memory.
  26. Replies
    6
    Views
    380

    Thanks @JarkkoL -- that's closer to what I was...

    Thanks @JarkkoL -- that's closer to what I was aiming for, but I was hoping (for clarity) to have it all on one line without having to invent new names for all the intermediate variables like...
  27. Replies
    6
    Views
    380

    Flexible Array in Arduino ?

    I am trying to initialize an array as part of a structure variable, but the compiler options in place on Arduino seem to require that the array size is predefined. Is there a way around this ?...
  28. Replies
    2
    Views
    947

    If you are just interested in the average...

    If you are just interested in the average current, then most measurement systems will actually do this by default -- they don't (instantaneously) sample the signal and then digitize it. For instance,...
  29. Replies
    9
    Views
    673

    I do that too, but with many computers of...

    I do that too, but with many computers of different vintages and locations, it's not unique enough for me.

    I'd like something like (I know this won't work) where the #include basically loads the...
  30. Replies
    9
    Views
    673

    Self-print code for documentation ?

    I suspect this is not possible, but is there a way (in the Arduino environment) to have a program print its own source code for documentation purposes ? I'd like to be able to do this as part of the...
  31. what works really well is to run through the...

    what works really well is to run through the array, and with a probability p, change it from off to on. If you want 10 % of the LEDs on (on average), then p is 0.1 etc. This keeps the whole set of...
  32. Replies
    7
    Views
    2,988

    15 V might be a little too low for the TVS -- as...

    15 V might be a little too low for the TVS -- as the battery goes bad (but not failed), the voltage could approach 15 V -- together with the TVS tolerance, it could cause some current to flow and it...
  33. You can't connect the 'A0 COM' connections...

    You can't connect the 'A0 COM' connections together from the multiple rotary switches -- you won't be able to read the switches independently (or correctly). You can connect multiple Teensy analog...
  34. If you have problems with signal amplitude, you...

    If you have problems with signal amplitude, you could use this. It uses the analog comparator in the Teensy and can detect 200 mV 10 MHz signals.



    Put your signal on pin23, and connect the...
  35. Replies
    3
    Views
    2,652

    1) jitter: you can't easily remove this. If you...

    1) jitter: you can't easily remove this. If you 'just' remove the last bit, you'll still have errors when the result crosses the next-to-last. For instance, say the numbers were 1..1000, and you had...
  36. Replies
    3
    Views
    2,652

    You are asking too much. 1) The ADC can always...

    You are asking too much.

    1) The ADC can always have a jitter of +/- 1 count -- imagine the input voltage is just on the border between two conversion codes -- depending on noise etc, it might...
  37. Replies
    3
    Views
    1,528

    0.1 mV for a 100 mV signal requires 10 bit...

    0.1 mV for a 100 mV signal requires 10 bit resolution (log2(100 mV/0.1 mV)) -- the ADC can do that (it has 16 bits. but realistically only ~ 13 are 'good'). With a 1.2 V reference, the LSB is 0.14...
  38. Replies
    4
    Views
    1,556

    There is a sufficient amount of digital IO on T...

    There is a sufficient amount of digital IO on T 3.2 etc. This IO is 5 V tolerant -- i.e. it survives 5 V being applied, but can only output 3.3 V. The ROM uses 5 V, but the datasheet indicates that...
  39. See my code in thread...

    See my code in thread https://forum.pjrc.com/threads/30822-Teensy-3-1-and-Flextimer(s)-Counting-external-pulses-accurately -- checking for 24 h with 15 MHz on pin3 and 20 Hz on pin A2 shows no...
  40. I think I have this figured out. When the FTM...

    I think I have this figured out. When the FTM overflows and an input capture occurs nearly simultaneously, it is difficult to know which occurred first, and therefore if the pre-overflow or post...
  41. Thanks @robsoles. I see what you are doing, but...

    Thanks @robsoles. I see what you are doing, but that won't work for me -- I trigger a capture with the FTM Channel 0. I am leaning towards not generating an interrupt with a Channel 0 event, just...
  42. @TelepnoneBill -- I am trying to do nearly the...

    @TelepnoneBill -- I am trying to do nearly the same thing, but I am not confident about the CH0 part. In your code, you can't guarantee that the CH0 event detect in the loop occurred before or after...
  43. @robsoles -- I am also puzzled about the...

    @robsoles -- I am also puzzled about the FlexTimer. I am trying to build a 32-bit counter with it (10 MHz input on its clock, 1 Hz on channel 0). What I am stuck on is how to synchronize my overflow...
  44. Replies
    3
    Views
    1,785

    Be careful if you run this loop for long...

    Be careful if you run this loop for long durations -- because of roundoff error in the multiplication, the amplitude may not remain precisely constant. For some frequencies, it may grow to overflow...
  45. I re-read your original post. If you need two...

    I re-read your original post. If you need two signals, each from -5 V to +5 V (so a differential of +/- 10 V), you will need two opamps. There are many ways to do this; here's one:

    7252

    Use 2...
  46. Since the DAC uses the same 3.3 V, you can use...

    Since the DAC uses the same 3.3 V, you can use that for the reference also.

    Resistor tolerances affect how precise your common-mode voltage needs to be. You can basically have two types of errors...
  47. You can split R1 into two resistors in series,...

    You can split R1 into two resistors in series, each twice the original value. Connect one end to GND, the other end to 3.3 V, and the junction to the opamp's inverting input ('-').

    Basically this...
  48. Replies
    3
    Views
    1,158

    some ideas: Does this occur if the LEDs are...

    some ideas:

    Does this occur if the LEDs are already powered up and you just power the Teensy ?
    If you don't have a Teensy connected to the LEDs, do they flash ?
    To confirm that it's not your...
  49. Replies
    4
    Views
    2,273

    Thanks. With 16 word loops, does this still pump...

    Thanks. With 16 word loops, does this still pump data to the DAC at a uniform and constant rate, or does it go in bursts ?
  50. Replies
    4
    Views
    2,273

    Max DMA Buffer Size ?

    I am trying to build an arbitrary waveform generator by using DMA to drive the DAC diretly from a table in (flash) memory. I need at least 50,000 points. My code works with < 32767 points, but not...
Results 1 to 50 of 487
Page 1 of 10 1 2 3 4