Search results

  1. D

    Basic SPI issue (glitches on CS)

    Yes, I just read the fine print in the OP. That sounds right. For me, the instrument of choice for something like this, is an oscilloscope.
  2. D

    Basic SPI issue (glitches on CS)

    Could you please provide a circuit diagram for your setup? Also, a picture. Pending that, two ways to generate glitches between lines are cross-talk and "ground bounce". There are others, but those are two of the most popular. But, let's see a schematic and a picture and see if we can...
  3. D

    ADC library, settings sampling window and conversion time in real time units

    That is pretty much the same information. It is missing the same details, and it does not come to a bottom line. What is ADCK, before we select one of the free running clocks? What do the settings slow, fast, very fast, etc, correspond to? For the T4, what are the values of RADIN for...
  4. D

    ADC library, settings sampling window and conversion time in real time units

    Hi, For this question, I am interested in the ADC settings in the ADC library, for both the T3 and T4. The ADC library provides settings for the sampling window in units of ADCK. Conversion time is specified there only as "SLOW" to "FAST" and "VERY FAST". The documentation says ADCK depends...
  5. D

    SPI Instrumentation Project, new controller

    Hi, The SPI instrumentation project is getting a new controller, using the Teensy 4.1 As you can see, I am going to keyed connectors and separate connectors for the CCD devices and the SPI only devices. There is also a very low noise 3.3V 500mA LDO to supply quiet power for the...
  6. D

    Long contiguous SPI transfers (T4x)

    Okay, here it is, the corrected sketch. The open question; What should the mode setting be in 3-wire mode, and in daisy-chain mode? Any advice? Thank you
  7. D

    Long contiguous SPI transfers (T4x)

    Hi Paul, yes that is the chip. Attached is the schematic and a functioning sketch, and a simple python script that talks to it and logs the data to a file. The code is very preliminary, just simple and direct for testing. The readout from one board looks okay, the voltages around the board...
  8. D

    Long contiguous SPI transfers (T4x)

    Here is my starting point for code, it compiles and runs. The question is, how to unpack the 18 bit words? IMXRT_LPSPI_t *lpspi = &IMXRT_LPSPI4_S; uint16_t spi_nbits = 8; static inline uint16_t get_framesz( ) { return (lpspi->TCR & 0x00000fff) + 1; } static inline void set_framesz(...
  9. D

    NXP CMSIS FFT on Teensy4?

    Incorrect. The last two bits in this case are not noise.
  10. D

    Long contiguous SPI transfers (T4x)

    I am not sure what that means. Let's say the TCR is set for a 36 bit transfer. What does 8 bit transfer have to do with this?
  11. D

    NXP CMSIS FFT on Teensy4?

    Actually, the raw data is from an 18 bit ADC.
  12. D

    Teensy 4.0 and CMSIS + SDK

    Wonderful, what do I need to install and/or include to have the functions available? Thank you
  13. D

    Long contiguous SPI transfers (T4x)

    Like this: static inline void retrieve36( uint32_t *rcvd ) { uint32_t u32a; uint32_t u32b; lpspi->TDR = 0xFFFFFFFF; // output 32 bit data lpspi->TDR = 0xF; // output 4 bits while (lpspi->RSR & LPSPI_RSR_RXEMPTY) {} // wait while RSR fifo is...
  14. D

    Long contiguous SPI transfers (T4x)

    Or may be I need to write out the entire 18 or 36 bits, and then start reading?
  15. D

    Long contiguous SPI transfers (T4x)

    Actrually trhat is a goof, i need to do it like this, (writing too many bits will start another transfer) IMXRT_LPSPI_t *lpspi = &IMXRT_LPSPI4_S; uint16_t spi_nbits = 8; static inline uint16_t get_framesz( ) { return (lpspi->TCR & 0x00000fff) + 1; } static inline void set_framesz(...
  16. D

    Long contiguous SPI transfers (T4x)

    Thank you. So the first bits are in the lower bits of the word? In other words, for a 36 bit transfer (two 18 bit datum), I read 32 bits and then 4 bits. But the code is going to look like reading a 32 bit register twice. The bits I need are the 18 high bits from the first 32 bit word...
  17. D

    NXP CMSIS FFT on Teensy4?

    Thank you. I will try find it in the T4 core
  18. D

    Teensy 4.0 and CMSIS + SDK

    The above link is a "404 Not Found" Any updates on this topic? I am not so much interested in an image built outside of the arduino ide, but rather an FFT that is optimized for the MCU. The crossover processors are purportedly designed for hardware specific optimized signal processing...
  19. D

    NXP CMSIS FFT on Teensy4?

    Hi, Are there instructions and examples, or some form of documentation specifically on how to use the NXP CMSIS, and in particular the FFT, on the Teensy 4 with the Aduino IDE? The use case is data is read from an external 18 bit ADC, using a timer, and processed 1k to 8 k samples at a...
  20. D

    Long contiguous SPI transfers (T4x)

    No help?
  21. D

    Long contiguous SPI transfers (T4x)

    Hi, I am contemplating using an ADC with a "daisy chain" capability. There are now quite a few of these; as examples. see the ADS 8881 for 18 bits and the ADS 8861 for 16 bits. How this works: To form the daisy chain, the clocks and convert pins are all (each) driven together, the SDO of...
  22. D

    Teensy 3.2 End Of Life

    @PaulStoffregen First, aside, Paul have you tried that ADC we talked about somet time ago? That one has a mux and can share one opamp for all of the channels. I will post or send you the design files if anyone is interested, with the proviso that it is work in progress, I wanted to make...
  23. D

    Timing measurements for Teensy 4 (and Arduino R4)

    A new repos, or rather an old repo with new content is posted to github. https://github.com/drmcnelson/Arduino_Timing There you will find some measurements for timing for digital write, read, toggle, SPI transfers, interrupt latency and so forth. These are useful when you are writing...
  24. D

    Send data from Teensy to Python

    Two comments, one is a correction to my previous. If you can serialize your exchanges, then that is a third approach. Bottom line, it is about getting the data from he driver before the internal buffer in the driver runs out of room. Re the code, again, take a look at the multiprocessing API...
  25. D

    Send data from Teensy to Python

    I regularly send about 4000 values, in either binary using write or formatted using print. You can see my code for one example of this at: https://github.com/drmcnelson/Linear-CCD-with-LTSpice-KiCAD-Firmware-and-Python-Library There is a somewhat newer version at this next link, though at...
  26. D

    5v to 3.3 quality and fast step down part

    I know the spec is thru hole, but SMT is really not that hard. Reflow ovens are on ebay for even $200, get some nice solder paste and tweezers and a magnifier (wearable is nice), and stick with doable size parts, at first. It really is worthwhile to learn the craft. As Paul says, the good...
  27. D

    5v to 3.3 quality and fast step down part

    Similar idea, the 74LVC1T45 are nice. You have voltage on each side, and a direction pin. I run VD to the interface connector so the other end can tell me what power it is using.
  28. D

    Some comments on circuits using the Analog Input

    @MarkT, yes I appreciate the challenge. That is why there are researchers working on the kT/C noise challenge. Maybe some major breakthrough in dieliectrics will give us a smaller 10pf some day, or some other way to store charge linear in V will appear. The mcu in the Teensy3.2 has a 10pf...
  29. D

    Some comments on circuits using the Analog Input

    SPICE models for the Teensy4 ADC Input @MarkT - this addresses the points you raised, I hope. The last figure I think might explain why that sampling cap is only 2pf, besides that it is only 12 bits. The Teensy3.2 had 10pf for 16 bit mode, and 2kohm in series. @PaulStoffregen - thoughts...
  30. D

    Some comments on circuits using the Analog Input

    @MarkT - i see the confusion, it is not about a slow or fast changing signal, it is about the sampling window of the SAR. You could say the switch makes it a fast changing signal, so-to-speak. Notice that the spice model has a DC level on the divider. That is about as slow changing as it...
  31. D

    Some comments on circuits using the Analog Input

    @MarkT, could you show how that works? To check, you said 100nf from input to ground, right? Like this??? It seems like 100nf means you now have a time constant of about 1msec. That would mean you now need order 10 milliseconds before the input will reach the right voltage. In other...
  32. D

    Some comments on circuits using the Analog Input

    @Paul hi, hopefully this is helpful. I wasn't sure which to which forum it should be posted. Suggestions?
  33. D

    Some comments on circuits using the Analog Input

    There are a lot of posts on this and many other forums that go something like "Why am I getting incorrect readings or weird behaviors from the analog input?" And there are lots of responses that go something like, just use this code. If that code answer amounts to lengthen the "acquisition"...
  34. D

    Read Thermistor Temp. Data from Teensy?

    The problem, not mentioned in that tutorial, is that the analog input is a SAR type ADC. I recall the sampling capacitor for the Teensy 4. is something like 30 or 40 pf. They almost always are in that range because of the famous kT/C noise. (See this post on using a SAR adc with spice...
  35. D

    Multiple Analog Inputs

    How are you interfacing the microphones to the analog input pins?
  36. D

    Announcing... "The SPI Instrumentation Project"

    Hi, I would like to announce a new project. The goal could be described as "open science", or at least the part that is about being able to make physical measurements and build experiments when you are not necessarily at an elite institute or holding a large grant to equip your lab. It is...
  37. D

    Future Teensy features & pinout

    Yes, and therefore, even more so, it is important to decide what this platform is for, or if perhaps there should be more than one platform.
  38. D

    S11639-01 SPI Board and Teensy 4 controller

    I just updated the description on git-hub to fill in some details and explain how to use the boards - i.e., jumpers and interconnects, etc.
  39. D

    S11639-01 SPI Board and Teensy 4 controller

    The Hamamatus SPI board is up and running! The design files include the sensor board and a mating carrier for a Teensy 4.0 Here is a link to the repo. https://github.com/drmcnelson/S11639-01-Linear-CCD-PCB-and-Code This is a self contained sensor board in the sense that it has its own high...
  40. D

    TCD1304 with teensy 3.2

    @Qar sorry for the delayed response. If you want something that is reproducible you need a transistor follower, or better still an opamp follower, and you need an RC (resistor in series with capacitor to ground) - because (A) you are driving an SAR type ADC in the microcontroller, and (B)...
  41. D

    TCD1304 with teensy 3.2

    @Huyd It sounds like you are asking for help debugging. That is okay, I think. But you need to post your code and circuit. With apologies to the moderator, I think you could start a new thread, you are not really asking about the original post from this thread but rather how to get your...
  42. D

    T4 interrupt latency and etc

    P/S I plan to put this up on my git-hub, just havent gotten around to it. Need to find some time to generate the readme. Again the idea is "time your arduino", I tried to stay with the API as far as possible and not go to bid fiddlin'. The fast isr is the exception.
  43. D

    T4 interrupt latency and etc

    @kd5rxt-mark I attached a complete code a few messages back. But here is the current code, which now includes the API described two messages back. This is the api I plan to use in my own work. Please see the attachment. Start the sketch and then in the serial monitor, type "fast...
  44. D

    T4 interrupt latency and etc

    @PaulStoffregen Thanks for the book tip, it looks good, I ordered it. I see it has some information on ice. So that is really helpful.
  45. D

    T4 interrupt latency and etc

    @PaulStoffregen Hi Paul, two things perhaps of interest. First, here is my API for the direct attach. I think it would be nice to have something like this available in the general API. If so, the directDetach could simplified. volatile uint32_t *directgpio; volatile uint32_t directmask = 0...
  46. D

    T4 interrupt latency and etc

    @PaulStoffregen Yes, it was the attachInterrupt() that I was concerned about. In interrupt.c, at line 89 it invokes NVIC_ENABLE_IRQ(IRQ_GPIO6789); Does that mean that interrupts become enabled again while I am still in my ISR? I thought about reattaching the same pin of course, and then...
  47. D

    T4 interrupt latency and etc

    @PaulStoffregen Hi Paul, it works! Thank you. I have one question though, how do we restore the generic interrupt handler? Trying to load it with attachInterruptVector() gives an undefined reference. Another strategy, actually the one I might favor would be to save the current address...
  48. D

    T4 interrupt latency and etc

    Okay, with that ado, and pending comments, I'll give it a try, on labrat hardware, and see what happens.
  49. D

    T4 interrupt latency and etc

    @PaulStoffregen P/S - further thought on the previous. I think i need to restore the previous interrupt handler when I am done, so that external triggers will be recognized again. That would mean doing something like this before i leave the isr, yes? attachInterruptVector(IRQ_GPIO6789...
  50. D

    T4 interrupt latency and etc

    @PaulStoffregen Hi Paul So looking at interrupt.c, it seems like irq_anyport() is the generic handler, and the source of the interrupt is cleared in the line gpio[ISR_INDEX] = status (the usual "write the bit to clear the bit" kind of thing), and the line attachInterruptVector(IRQ_GPIO6789...
Back
Top