flok
Reaction score
5

Latest activity Postings About

    • flok
      Hello, From what I understood from the code (AudioStream.* etc), the Paul's audio library reads from the ADC which is built-in. How feasible is to for example create a subclass for AudioStream which reads sample-for-sample (non-DMA) from an...
    • flok
      flok reacted to joepasquariello's post in the thread SPI1 & CS on 0 (pin 2) with Like Like.
      Just a suggestion, but it's easy to find working libraries for common ADCs and DACs. For example, if you google "github Arduino MCP3202", you'll find the one below, which looks very simple and probably works...
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      So: SPI1.transfer(command >> 7); // always 1 byte highByte = SPI1.transfer(command << 1); byte lowByte = SPI1.transfer(0x00); Works! That, and replacing the ADC by an other. Thanks everybody!
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      I tried a few variations :-) uint16_t readMCP3202(uint8_t channel) { byte command = channel == 0 ? 0b11010000 : 0b11110000; SPI1.beginTransaction(SPISettings(900'000, MSBFIRST, SPI_MODE0)); digitalWrite(CS_PIN, LOW)...
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      No that's now that I mean: the output of the program is the same: CH0: 288 | CH1: 1 CH0: 0 | CH1: 0 CH0: 288 | CH1: 0 CH0: 257 | CH1: 0 CH0: 1 | CH1: 0 CH0: 0 | CH1: 257 CH0: 0 | CH1: 1 CH0: 0 | CH1: 0 CH0: 257 | CH1: 0 CH0: 1 | CH1: 0 CH0: 0 |...
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      Oh indeed, unfortunately that makes no difference. Also: I'm toggling the CS pin by hand using digitalWrite. I'm in putting a 1 Hz sine wave, but am constantly getting the same value.
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      I tried pin 0 as well, didn't work.
    • flok
      flok replied to the thread SPI1 & CS on 0 (pin 2).
      Just to be sure I removed the 0_RX1_CRX2_CS1 pin and soldered CS from the MCP3202 to pin 37 of the T4.1 - no success. So: * MISO: 1 * MOSI: 26 * SCK: 27 * CS: 37 900 kHz clock, MSB first, spi_mode0 #include <SPI.h> const int CS_PIN = 37...
    • flok
      Hi, Question: am I right that I can't use 0_RX1_CRX2_CS1 for chipselect for the 2nd SPI bus? (SPI1 in Arduino) If that is true, can I just connect solder a wire from pin 2 to pin 29? (= 37_CS) or do I really need to disconnect the CS from...
    • flok
      Ha, one other bug: the dac produces 2.048 V, not 3.3 V as I expected. It can do 4.048 but only if given 5 V VCC - that is easy to fix with some resistor changes.
    • flok
      Works! After I: 1. enable power on the opamp 2. read from the DAC and not from the ADC pins 🙃
      • 1793650116385.png
    • flok
      With that patched, the MCP4822 becomes around 34 degrees celsius (93 fahrenheit).
    • flok
      Oh one bug a friend found: I did not connect the !LDAC pin on the MCP4822. If I understand https://docs.rs-online.com/20ed/0900766b81422d08.pdf correctly: in the current schematic, it will be always disabled, let's see if I can patch that.
    • flok
      @Paul will do! still waiting for a batch to arrive from $somecountry :-) I pulled the ones I used from an other device, maybe that damaged them. @Mcu32 the whole setup is meant to be used for "eurorack modulair synthesizers", so output does not...
    • flok
      Ah the input is incorrect. At least.
    • flok
      Well, soldered the pcb, plugged in the teensy 4.1 etc. Smoke test: some ics (opamp at least) became very hot very quickly so I think I made a mistake somewhere :-/ If someone is willing to take a look at the schematics, please let me know. I'm a...
      • 1793430161651.png
    • flok
      Thanks! Will also look at the git repo. So inspiring!
    • flok
      It definitely makes sense to protect the Teensy pins, and an opamp gives you the opportunity to shift the levels if needed. I’m not familiar with Eurorack stuff so not sure what might be needed…
    • flok
      A resistor between the external signal and Teensy (or whatever other circuitry) is the main thing you need. Diodes to clamp the voltage also help, but they're far more effective if a resistor limits the amount of current. The input pins have...
    • flok
      Does it make sense to put an opamp voltage follower in front of the output-pins?
    • flok
      Oh indeed! Didn't think of that! I've still got quite a few of those from experiments with MIDI. Cool.
    • flok
      In cases where a user might do something stupid, I’d tend to go for an opto isolator. You should be able to find a fast enough one with several channels in surface mount, I’d’ve thought.
    • flok
      Hi, Couldn't find a kit or ready made eurorack-to-teensy thing, so I'm now developing one myself. The first attempt only has a DAC and an ADC that accept -5...+5 Volt - the pcb arrived today! I'm writing my efforts down on...
    • flok
      Hi, I created a piece of plastic with a potentiometer and a Teensy 4.0 in it. The idea was that with the knob I could adjust the soundvolume of my Linux-system. I thought I could do so with keyboard-events. Had I researched better (but yeah) I...
      • 1789742115342.png
      • 1789742235780.png
    • flok
      flok replied to the thread don't understand interrupt timing.
      It is from a really cheap gps (a few euro, not more) so 0,5 us might not bad. I also have an ublox timing gps, as soon as I dare it (the ublox was really expensive and I'm afraid I destroy it), I'll connect it instead and retest. For that I...
    • flok
      flok replied to the thread don't understand interrupt timing.
      Without Ethernet, without asm("dsb") it looks like: Slightly different.
      • 1787577746077.png
      • 1787590065574.png
    • flok
      flok reacted to h4yn0nnym0u5e's post in the thread don't understand interrupt timing with Like Like.
      The trouble with either of these methods is that many Teensy libraries disable interrupts completely for an unknown length of time. Usually pretty short, but it wrecks all attempts to measure a signal’s period by hooking it to a GPIO interrupt...
    • flok
      Hello, I've connected a PPS (pulse per second, by using a GPS) source to a Teensy 4.1. Then I measure the number of cycles (via ARM_DWT_CYCCNT) between each interrupt. I do that both in the interrupt handler and in "loop()". The one in the...
      • 1787548033690.png
      • 1787548301272.png
  • Loading…
  • Loading…
Back
Top