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

Search:

Type: Posts; User: hpyle

Search: Search took 0.00 seconds.

  1. Replies
    98
    Views
    62,006

    @MickMad I expect you can produce MCLK from...

    @MickMad I expect you can produce MCLK from teensy and clock both devices from the same signal, without using an external clock at all. But don't take my word for it; the clocking parts of the...
  2. Replies
    98
    Views
    62,006

    @ben Very nice. In your first scope...

    @ben Very nice.

    In your first scope screenshot: notice that the data word is delayed one bit "behind" the frame. I2S data frames start one bit later than the frame-clock, and so they also finish...
  3. Replies
    98
    Views
    62,006

    I've just posted an update that fixes various...

    I've just posted an update that fixes various things, implements DMA for Receive, and adds a couple "play-through" examples (one with DMA, one without) that listen for audio on the input and play it...
  4. Replies
    98
    Views
    62,006

    I just checked in a change that makes the OML...

    I just checked in a change that makes the OML codec shield work. I think it may still be "wrong" (not deriving the clocks correctly) and I didn't regression-test the Mikro board, but it makes...
  5. Replies
    98
    Views
    62,006

    Right, the library doesn't work with Open Music...

    Right, the library doesn't work with Open Music Labs codec shield yet. I got one and hope to spend some time this weekend working on the code. It looks like nice hardware.

    I wonder what's up...
  6. Replies
    98
    Views
    62,006

    The i2c library that I'm using to control WM8731...

    The i2c library that I'm using to control WM8731 is here: https://github.com/hughpyle/machinesalem-arduino-libs/tree/master/WM8731
    The i2c interface is not used for audio data. The i2s interface...
  7. Replies
    98
    Views
    62,006

    Are you using the Mikro breakout board? If so,...

    Are you using the Mikro breakout board? If so, you should try run the sample sketch -- it should make sound right away.

    You're right that starting with the I2C communication is a good strategy. ...
  8. Replies
    98
    Views
    62,006

    Yes, close enough. Q15 represents a fraction...

    Yes, close enough. Q15 represents a fraction with one "sign" bit and 15 "fraction" bits; the values go from -1.0 (0x8000 or 32768) to nearly +1.0 (0x7FFF or +32767). Usually of course the exact...
  9. Replies
    98
    Views
    62,006

    I got it wrong in the examples' comments. You...

    I got it wrong in the examples' comments. You have SCK to pin 11 (MCLK), but it should be to the bit-clock, pin 9 (BCLK).

    Here's the full list to check:
    SCK -> Teensy 9 (I2S0_TX_BCLK)
    ...
  10. Replies
    98
    Views
    62,006

    I'll have to check my hardware when I get home...

    I'll have to check my hardware when I get home :-) Tomorrow some time.

    Meanwhile here's a copy of my additive-synthesizer code, if anyone's interested in hacking on it. It doesn't really work...
  11. Replies
    98
    Views
    62,006

    For the pins, try adding DACL to pin 4, for the...

    For the pins, try adding DACL to pin 4, for the word clock (duh, my examples don't tell you this).
    Are you using the DMA interface or straight I2S? Try the DMA-based example sketch. I think the...
  12. Replies
    98
    Views
    62,006

    Thanks. I saw your I2Sound library and picked up...

    Thanks. I saw your I2Sound library and picked up some good things from it! It's nice and clean.

    I'll try that directory restructure. Gotta learn how to use git properly :)

    Hugh
  13. Replies
    98
    Views
    62,006

    MickMad: I don't think anyone has done both...

    MickMad: I don't think anyone has done both transmit and receive yet.

    Dan: I've refactored my library to an interface that should work for both transmit and receive; and I've included your setup...
  14. Ooh. I like the look of that TI part.

    Ooh. I like the look of that TI part.
  15. This one is the smallest all-in-one 1A booster...

    This one is the smallest all-in-one 1A booster I've found -- I haven't measured whether it's really capable of 1A, but it works OK for me....
  16. Replies
    61
    Views
    46,725

    For what it's worth, you can *add* compiler...

    For what it's worth, you can *add* compiler options, by editing hardware/teensy/boards.txt & restarting Arduino, to add (e.g.)
    teensy3.build.cppoption2=-O3...
  17. PROGMEM doesn't do anything special on Teensy3. ...

    PROGMEM doesn't do anything special on Teensy3. But if you just define your constant data as "const", it'll have the same effect.

    I've had some success generating a big 'const' block using this...
  18. Replies
    11
    Views
    5,544

    It's cheap and small! Some things I've noticed:...

    It's cheap and small! Some things I've noticed:
    - The input jack is wired to the microphone input. The line inputs are not connected (they're not even broken out to pads on the board). So if you...
  19. Replies
    98
    Views
    62,006

    Are you using the Teensyduino 1.12 release? The...

    Are you using the Teensyduino 1.12 release? The latest I2S library code requires it (this morning I added the "DMAMEM" symbol to its DMA buffers, which means "memory optimized for DMA transfers").
  20. Replies
    64
    Views
    33,466

    Thanks Paul!

    Thanks Paul!
  21. Replies
    98
    Views
    62,006

    The library is updated for Teensyduino 1.12; ...

    The library is updated for Teensyduino 1.12; you'll still need to copy the modified mk20dx128.h into arduino/hardware/teensy/cores/teensy3.
  22. Replies
    98
    Views
    62,006

    Um, yes, sorry about that. There was really no...

    Um, yes, sorry about that. There was really no need for the dependency on arm_math.h, and it's not part of the standard 1.0.3 Arduino (instead it's part of CMSIS).
    Try check out from the github;...
  23. Replies
    98
    Views
    62,006

    That's great! I hope you find the library...

    That's great! I hope you find the library useful. If you're rolling your own, the main trick is to not set the "transmit enable" flag until everything else is set up ;-)
    You may find that my clock...
  24. I've done a VU-type display with code like...

    I've done a VU-type display with code like [below]. I think it has a decent amount of realism.

    The code is only approximate, may have off-by-one issues etc - don't rely on it verbatim.
    Some...
  25. Nice! If you're having problems with noisy...

    Nice!

    If you're having problems with noisy data from the accel readings, one technique I find works pretty reliably is a "moving-average" filter, like this

    long avg_value;
    loop{
    // add the...
  26. Do they spin fast enough to produce POV effect...

    Do they spin fast enough to produce POV effect that you could use with strobed patterns (or even lettering, you have enough pixels)? Fast strobing is easy and fun. Maybe you can refresh fast enough...
  27. Replies
    98
    Views
    62,006

    And... it works! Current code on github...

    And... it works! Current code on github.

    Paul, will you take a big patch to mk20dx128.h for all the register flags? My version is here.
  28. Replies
    98
    Views
    62,006

    That's great! I'd like to see code to drive the...

    That's great! I'd like to see code to drive the WM8805 -- I have no experience with it, but I do have a SRC4382 waiting for a project that needs S/PDIF (it may be possible to build a Teensy-powered...
  29. Replies
    98
    Views
    62,006

    Moderate success!! Codec-as-slave sounds very...

    Moderate success!! Codec-as-slave sounds very distorted. Codec-as-master sounds pure but fades out immediately. Nevertheless, it's doing *something* end-to-end and producing sound from the...
  30. Replies
    98
    Views
    62,006

    I2C to the Wolfson codec is working (using the...

    I2C to the Wolfson codec is working (using the Mikro proto board). I2S is **partially** working. The current version is using the FIFO directly -- DMA not working yet. Internally-generated bit...
  31. Replies
    13
    Views
    7,134

    I clipped off the Nunchuk connector from its...

    I clipped off the Nunchuk connector from its cable, and connected the four wires directly:
    - GREEN is SDA, to A4
    - YELLOW is SCK, to A5
    - RED power to 3.3v (mine tolerates 5v...
  32. Replies
    7
    Views
    5,596

    Alex - I don't know whether you had any luck...

    Alex - I don't know whether you had any luck having the audioCodecShield library talk to the codec control interface.

    Meanwhile, here's my own contribution. A couple major caveats: [a] only...
  33. Replies
    13
    Views
    7,134

    Yes, I have it working. Code here: ...

    Yes, I have it working. Code here: https://github.com/hughpyle/machinesalem-arduino-libs/tree/master/nunchuk

    I needed delayMicroseconds(10) between requestFrom(...) and reading the returned...
  34. Replies
    98
    Views
    62,006

    Beware the AN4369 code sample - it's for the K60...

    Beware the AN4369 code sample - it's for the K60 chip, and all the registers are different.


    I've put together most of the headers for Transmit, and some code that "should work", but doesn't. ...
  35. Replies
    98
    Views
    62,006

    Teensy3 I2S with DMA

    I'm wading through the datasheet, the AN4520 application note, the AN4369 application note and its code samples...

    Lots to learn, and it seems quite a lot of work to initialize.

    Does anyone...
  36. Replies
    13
    Views
    7,134

    Also, this code may be useful: ...

    Also, this code may be useful:

    http://machinesalem.com/arduino/libraries/nunchuk/
  37. Replies
    36
    Views
    44,180

    Very impressive!

    Very impressive!
  38. Replies
    64
    Views
    33,466

    No, I have the same problem; both 8-bit and...

    No, I have the same problem; both 8-bit and 16-bit fix_fft produce mush as far as I can tell.
  39. Replies
    64
    Views
    33,466

    Wow, it runs quick. For 1000 iterations, ...

    Wow, it runs quick. For 1000 iterations,
    fix_fft (uint16_t): 15.0 seconds
    arm_cfft_radix4_f32 (float): 40.0 seconds
    arm_cfft_radix4_q31 (int32_t): 5.2 seconds
    arm_cfft_radix4_q15 (int16_t): 2.3...
  40. FWIW, I've run Teensy2 from 4xNiMh, with one...

    FWIW, I've run Teensy2 from 4xNiMh, with one series diode in the power lead, and it hasn't blown up yet.
  41. Replies
    64
    Views
    33,466

    Thanks Paul, Pete - lovely. Maybe editing the...

    Thanks Paul, Pete - lovely.
    Maybe editing the linker script loads objects in the wrong sequence? It nearly-worked for me too, unresolved "sqrtf" with my test project.
    So I rebuilt from Paul's...
  42. Replies
    64
    Views
    33,466

    Aside: your example says M3. Are you using the...

    Aside: your example says M3. Are you using the M4 libraries, with

    #define ARM_MATH_CM4

    in your sketch? Should be faster than defining M3.
  43. Replies
    64
    Views
    33,466

    You should be able to just add ...

    You should be able to just add

    INPUT(c:/dev/teensy/lib/libarm_cortexM4l_math.a)

    into the linker script file (mk20dx128.ld). Adjusting the absolute path of course.
  44. Replies
    7
    Views
    5,239

    I've used the Adafruit LPD8806 library very...

    I've used the Adafruit LPD8806 library very successfully with Teensy 2.0 boards.
    I haven't tried that library with Teensy 3.0 board, but the FastSPI library is even easier to program, and works...
  45. Replies
    30
    Views
    30,551

    For an audio-sampling input, I had really nice...

    For an audio-sampling input, I had really nice results with the following config:
    - no smoothing capacitor, just direct from an opamp (schematic here:...
  46. Replies
    1
    Views
    3,144

    POV levitation-wand project

    My weekend project for a new-year party:

    - Teensy3
    - Transound TSB140 electret microphone and a simple opamp preamp, to the Teensy ADC. Listen to beats.
    - Strips of LPD8806 LEDs
    - Powered by a...
Results 1 to 46 of 46