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

Search:

Type: Posts; User: gfvalvo

Page 1 of 6 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    0
    Views
    4

    DMA SPI on T3.2

    Hi all. I decided to try driving an APA102 LED strip using DMA-based SPI on a T3.2. Iím using the standard SPI library that comes with Teensyduino. My code loads up the DMA buffer, calls...
  2. Here's an application where I synced the FTM to...

    Here's an application where I synced the FTM to an external signal - https://forum.pjrc.com/threads/55148-AC-Mains-Cycle-Phase-Control?highlight=phase
    It's a different application, but maybe you can...
  3. Replies
    2
    Views
    75

    Thanks Paul.

    Thanks Paul.
  4. Replies
    2
    Views
    75

    Can You "malloc()" DMAMEM?

    So, the DMAMEM directive is available to specify at compile-time time that a variable is to be stored in the lower RAM block. I'm wondering if there's a way to do the same thing with a dynamic...
  5. Replies
    12
    Views
    358

    OK, I just re-read your original post. I see...

    OK, I just re-read your original post. I see you're actually supplying a pointer to a HardwareSerial object. It was a little confusing since you named it "stream". I misread that as the class Stream....
  6. Replies
    12
    Views
    358

    That's fine, but the code to do that register...

    That's fine, but the code to do that register manipulation doesn't belong in your XXX class. Since the class deals with a Stream pointer, it should only do things that Stream knows about. The...
  7. Replies
    12
    Views
    358

    Trouble is, your starting philosophy is wrong....

    Trouble is, your starting philosophy is wrong. The purpose of the Stream class is to handle the I/O without regard to the underlying hardware (could be USB, HardwareSerial, SoftwareSerial, etc). The...
  8. Replies
    2
    Views
    119

    Since FTM0 has 8 channels, you could implement...

    Since FTM0 has 8 channels, you could implement similar capability on that (FreqCount uses the LPTMR). See the processor's Datasheet.

    EDIT:
    Sorry, that's wrong. The FreqCount technique clocks the...
  9. Replies
    16
    Views
    478

    Maybe try bypassing the analogWrite() function...

    Maybe try bypassing the analogWrite() function and instead manipulate the FTM directly? First, in your setup() function, configure the FTM for the appropriate frequency / resolution. Then configure...
  10. Replies
    36
    Views
    5,034

    So, I've been playing around with a T3.2 (only...

    So, I've been playing around with a T3.2 (only Teensy I have on hand right now). I still think @ jofre's problem statement is not completely defined. First, if the experiment can really produce even...
  11. Idea for FTM Application - Is a Race Condition Possible?

    Hi All.

    As I was thinking about a solution to a question posted in another thread, I wondered if it would be possible to extend the input capture capability of a T3.2/5/6’s FTM to 32-bit values...
  12. Replies
    36
    Views
    5,034

    I recommend using an FTM and asked several...

    I recommend using an FTM and asked several pertinent questions in @jofre's nearly identical thread on the same topic. So far, no reply to my questions.
  13. Might be time to put a scope on the SDA and SCL...

    Might be time to put a scope on the SDA and SCL lines.
  14. Thread: Photon Counter

    by gfvalvo
    Replies
    4
    Views
    182

    Don't know if will work, but I'd look into using...

    Don't know if will work, but I'd look into using the input capture capability of a T3.6 Flexible Timer Module (FTM).

    First though, your "Requirements Document" needs to be fleshed out quite a bit:...
  15. Replies
    0
    Views
    53

    T3.2 Power Fuse Rating

    Hi all, got a quick question. The schematic for T3.2 shows a fuse between the Micro-USB connector and the VIN / VUSB pins (as well as the voltage regulator):
    16614
    There are times, especially...
  16. Thread: String issue..

    by gfvalvo
    Replies
    12
    Views
    316

    I'm confused about why you would do this in the...

    I'm confused about why you would do this in the first place. What is the expected result of attempting to change a literal constant?
  17. You could have your Term class inherit from...

    You could have your Term class inherit from Stream and implement the special functions as required:

    #include "Arduino.h"

    class Term: public Stream {
    public:
    Term(Stream *p) :...
  18. It might be good if you told us what the traces...

    It might be good if you told us what the traces in the scope shot are along with the horizontal scale. Also, perhaps provide a schematic or block diagram. And, a clear drawing of what you want the...
  19. For that frequency, it looks like FreqCount...

    For that frequency, it looks like FreqCount is recommended. There's a link on the page to github where you can view the code. It uses counter / timer hardware resources on the chip. Which resource...
  20. Thread: Audio Sampling

    by gfvalvo
    Replies
    20
    Views
    802

    All of the Audio Library classes use the...

    All of the Audio Library classes use the audio_block_t type to get their input data samples from preceding blocks and send their processed data samples to subsequent blocks. The trick is what they do...
  21. Thread: Audio Sampling

    by gfvalvo
    Replies
    20
    Views
    802

    I stand corrected. I should have been more...

    I stand corrected. I should have been more specific by saying that simply adding the external SPI RAM chip would not allow you to increase the size of the 'granularMemory[]' array in the 'Granular...
  22. Thread: Audio Sampling

    by gfvalvo
    Replies
    20
    Views
    802

    I should have quantified "much easier". I meant...

    I should have quantified "much easier". I meant "much easier" in the sense that what you proposed to do is impossible. The processor on the T3.2 (like most stand-alone microcontrollers) does not have...
  23. Thread: Audio Sampling

    by gfvalvo
    Replies
    20
    Views
    802

    That's only because of the size defined for the...

    That's only because of the size defined for the 'granularMemory' array. You can make it larger.



    MUCH easier just to use a T3.5 or T3.6 with 256K RAM. Should be able to get >0.5 seconds with no...
  24. Replies
    5
    Views
    210

    The multiplexing is on a per-pin basis. There...

    The multiplexing is on a per-pin basis. There should be absolutely not problem using Pin 21 for PWM and Pin 27 for GPIO. If you're "seeing strange PWM behavior", it's due to some other reason.
  25. Replies
    11
    Views
    435

    No, the "extra clocks" required are a result of...

    No, the "extra clocks" required are a result of the APA102 protocol and are a totally separate issue. See: https://cpldcpu.wordpress.com/2014/11/30/understanding-the-apa102-superled/

    The issue is...
  26. Replies
    11
    Views
    435

    Iíve had pretty good success running APA102s...

    Iíve had pretty good success running APA102s (FastLED library) along with PJRC Audio Library -- including a fair amount of FFT number crunching. But, Iíve only gone up to about 120 or so LEDs. I...
  27. Yes, I realized that runt first pulses were a...

    Yes, I realized that runt first pulses were a possibility, but did not test it enough to observe any. I just did today. The trouble with resetting the counter is that it will screw up all other PWM...
  28. Here’s a slightly different technique that also...

    Here’s a slightly different technique that also works. It keeps the FTM enabled the whole time and just shuts down the output channel after the requisite number of pulses have been sent. Doing it...
  29. This worked for me on a T3.2: #include...

    This worked for me on a T3.2:

    #include "Arduino.h"

    uint8_t saveClockSource;
    volatile bool pwmRunning = false;
    volatile uint8_t numPulses = 1;
    volatile uint8_t pulseCount;

    void setup() {
  30. Try clearing the TOF flag BEFORE enabling FTM...

    Try clearing the TOF flag BEFORE enabling FTM interrupts in setup().
  31. "Equals Comparisons" are fine for integer-type...

    "Equals Comparisons" are fine for integer-type variables.
  32. Why are you calling attachInterrupt() on every...

    Why are you calling attachInterrupt() on every pass through loop?

    ‘comparatorState’ variable does not need to be ‘volatile’ or global, it can be local to ‘doOnClock()’. It also doesn’t need to be...
  33. Replies
    6
    Views
    326

    I wasn't able to quickly find a complete BC127...

    I wasn't able to quickly find a complete BC127 datasheet online. Perhaps you could attach one? So, as just a guess, I'd propose that the device is either set up for the wrong data format (PCM vs I2s)...
  34. Replies
    1
    Views
    125

    What you're trying to do seems quite convoluted...

    What you're trying to do seems quite convoluted and I can't imagine a reason for doing it. But, at least this compiles:

    #include <Arduino.h>

    struct dataStruct {
    uint8_t data;
    };

    class B...
  35. Replies
    3
    Views
    134

    Thanks for the info Paul.

    Thanks for the info Paul.
  36. Replies
    3
    Views
    134

    Which Boards Support FTM vs TPM?

    Hi. From my reading of the datasheets for the processors on T3.2 and T-LC, it seems to me that only the former supports the extended FTM functionality and the latter just supports the original TPM...
  37. Replies
    13
    Views
    541

    I'd look into using one of the LC's TPMs. You'd...

    I'd look into using one of the LC's TPMs. You'd need to use a combination of input capture and output match modes, switching between them at every interrupt as necessary.

    Use an output match...
  38. Did you try adding debug prints to see if the...

    Did you try adding debug prints to see if the actually gets the request?
  39. Why not just use the level shifter and remove all...

    Why not just use the level shifter and remove all doubt? Here: https://www.adafruit.com/product/757
  40. Replies
    7
    Views
    319

    So, as a learning exercise, I decided to see if I...

    So, as a learning exercise, I decided to see if I could make it work using only the hardware without firmware involvement. Turns out, itís possible. See code below. The firmwareís only jobs are...
  41. Replies
    14
    Views
    2,772

    But it makes a great voice changer. Sounds just...

    But it makes a great voice changer. Sounds just like those mob people interviewed on TV who don't want to use their real voice or show their face :eek:
  42. Array indices start at zero. An array with 24...

    Array indices start at zero. An array with 24 elements does not have an element #24.
  43. Replies
    4
    Views
    172

    Did you look at the whole error message in the...

    Did you look at the whole error message in the bottom window of the Arduino IDE? Did it perhaps include something like this:
  44. Replies
    7
    Views
    319

    Thanks for the suggestion, Paul. I do see at...

    Thanks for the suggestion, Paul.

    I do see at least one advantage to doing it your way - I could use the FTM counter value captured at every zero crossing to determine the half-cycle period of the...
  45. Replies
    7
    Views
    319

    Hi Paul, thanks for the reply. Yes, Iím sure T3.x...

    Hi Paul, thanks for the reply. Yes, Iím sure T3.x is more than capable of doing this in software. Iím pursuing the hardware technique as somewhat of a learning exercise.

    Do you know if FTM can be...
  46. Replies
    7
    Views
    319

    AC Mains Cycle Phase Control

    Hi. Iím wondering if itís possible to do 60 Hz AC mains phase control (i.e. incandescent light dimming) using the T3.x FlexTimer Module (FTM) without direct software intervention at the per-cycle...
  47. Replies
    26
    Views
    1,064

    Hi Paul: I reported here...

    Hi Paul:

    I reported here that the WM8804 works with the Audio Library's I2S objects to provide bidirectional SPDIF <--> I2S conversion.
  48. Replies
    9
    Views
    444

    Took a quick look at the code, I see no evidence...

    Took a quick look at the code, I see no evidence of that.
  49. Replies
    9
    Views
    444

    The Granular effect is only a pass-through unless...

    The Granular effect is only a pass-through unless you've entered Freeze or PitchShift mode. Until then, the setSpeed() method (seemingly) does nothing. Did you activate one of these two modes?
  50. Replies
    5
    Views
    188

    I second the recommendation of first examining...

    I second the recommendation of first examining the Teensyduino core files, even if they donít do exactly what you want. Awhile ago I needed to use several PITs for a POV project. I needed different...
Results 1 to 50 of 289
Page 1 of 6 1 2 3 4