logo elektroda
logo elektroda
X
logo elektroda

ESP8266 160MHz high-speed waveform generation 10-30MHz per pin

Jacek Rutkowski 1035 16
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17402903
    Jacek Rutkowski
    Level 28  
    Hello,
    Is it possible to use the ESP8266160MHz under Arduino to use it only to generate a fast waveform (10-30MHZ) on a single pin without WiFi support etc. i.e. make for example a simple loop to generate a waveform on a single pin?
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 17402958
    Anonymous
    Level 1  
  • #3 17888600
    Jacek Rutkowski
    Level 28  
    Unfortunately, I abandoned the idea of using ESP due to the slow performance of the I/O pins and the topic was temporarily put on hold.
  • #4 17889379
    khoam
    Level 42  
    drobok wrote:
    You won't pull that much on any esp.
    .
    This is not true. In ESP32 you can max out 40MHz on a single GPIO - Link .
  • ADVERTISEMENT
  • #5 17890028
    Slawek K.
    Level 35  
    It is probably possible to swipe a pin, but it is certainly not possible to generate a meaningful whole waveform at this frequency. More likely just a rectangle.

    Regards
  • #6 17890039
    khoam
    Level 42  
    Slawek K. wrote:
    Rather just a rectangle.
    .
    With 50% fill and stable. Lower frequencies than 40 MHz with fill determined by PCNT configuration.
  • #7 17890533
    Jacek Rutkowski
    Level 28  
    khoam wrote:
    Slawek K. wrote:
    Rather just a rectangle.
    .
    With 50% fill and stable. Lower frequencies than 40 MHz with fill determined by the PCNT configuration.

    Hello,
    I need 30-70% and the possibility to set 1, 2, 5, 10, 20, 30MHz.
    Is there a chance to generate via ESP a 20 or 30MHz clock with exact number of pulses e.g. 8,16 or 512k?
    I.e. I want to get a clock for the ADC AD9280 and sample memory, which when the SRAM is full will be sent to the PC over USB or over WiFi and so on. Such a simple oscilloscope attachment I wanted to make....
  • #8 17890730
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #9 17891019
    LChucki
    Level 31  
    I don't know why it seemed to me that the topic was closed and I corresponded with the author on PW. There I found out that
    Jacek Rutkowski wrote:
    Such a simple oscilloscope attachment I wanted to make...


    Also, what I wrote to him
    Quote:

    A 30MS/s oscilloscope can be done on the STM32F303. It has 4 8MS/s converters, they can work with an offset which gives 32MHz. When you reduce the resolution to 6-bit they have faster sampling, increase to 10 or 12 slower. There are nucleo boards with these uCs priced at £51.

    Another option LPC4370, 80MS/s uC a bit difficult to solder but a starter board costs about 100zl as I remember.
    .
    I would add that the idea of ESP + external parallel ADC or most uCs is bad. You need an interface that synchronously reads data from the ADC. It used to be that at 30MHz without a CPLD/FPGA and/or FIFO for 100£ you "wouldn't go under", now uyC for 20..30£ have the appropriate interfaces.
    Let me tell you right away, this is no fun for a beginner! At 30MHz, you can't do it without e.g. Altium for about 40'000zl (if you have the knowledge and practice, ok, you can do it in Eagle, but then you're not a beginner). That's why I suggest to start with a uC which has a built-in fast ADC. All that remains is to "just" write the programme. By now everyone probably feels that without DMA you can't do it. Not only without DMA! This DMA must have RAM all to itself! Not some carousels in most STM32s. Naturally, there is e.g. the STM32F407, which has two RAM banks and there you can read data from an external ADC and push it into RAM.
  • #10 17891149
    Jacek Rutkowski
    Level 28  
    I was also sure I had closed the topic but I don't know how it got unlocked....
    I'm not an advanced programmer/designer and if it won't work on 30MHz then I'll settle for 10MHz and a handful of TTLs or CMOS for parallel RAM.
  • #11 17891156
    LChucki
    Level 31  
    Jacek Rutkowski wrote:
    I'm not an advanced programmer/designer and if it doesn't work on 30MHz then I'll settle for 10MHz and a handful of TTLs or CMOSs for parallel RAM.

    Use a CPLD. One for 10£ will do, such as the EPM3064. You won't have to cut paths and it is a very but very good simulator.


    PS
    Did you check the FIFO prices? Probably not :-) .

    Added after 14 [minutes]:

    Jacek Rutkowski wrote:
    I was also sure I had locked the topic but I don't know how it got unlocked....

    A moderator can do it, I believe @khoam's request.
  • #12 17891213
    Jacek Rutkowski
    Level 28  
    I am not very much on the subject.
    How do you program such a CLPD? Do you draw the logic from the gates or describe it somehow?
    Can you drop some available memory models with FIFO?
    A double layer board design and order from a Chinese I can manage. If programming these dice isn't difficult I'd be happy to play around too.
  • #13 17891238
    LChucki
    Level 31  
    Jacek Rutkowski wrote:
    How is such a CLPD programmed? Do you draw the logic from the gates or describe it somehow?
    .
    You can do that and it comes out quite well. You draw a schematic from pre-made 74xx circuits and gates, flip-flops etc. Then simulate. When the simulation is ok, you upload it (BitBlaster I think it's called, price about 60PLN, or, if you have LPT, some resistors) and it must work.

    Jacek Rutkowski wrote:
    Can you drop some available memory models with FIFO?
    .
    No, the last FIFO I bought was 8kB costing about 100£, cheaper to give an FPGA.

    Jacek Rutkowski wrote:
    If programming these dice is not difficult I will also be happy to play.

    It's not like you're writing a program. Try it with "drawing", it's so Arduino. What you want you can do quietly. If you want something more fancy then AHDL/VHDL etc (such C and using registers). VHDL it looks like a program in Pascal? There used to be an Eric's programmer, a "program" in that style only that the chips programmatically don't execute the program (unless you implement a CPU there).

    Xirinx a bit cheaper than Altera (Intel), I prefer Altera.
    Where to look for tutorials? I don't know, when I was learning this there was no YT :-) .
    There's a book in BTC and some course in recent EdW, but I've been reading through the crappy stuff and don't know if it can be recommended, especially as a beginner I'm not - GAL and CUPL :-)
  • ADVERTISEMENT
  • #14 17891693
    Jacek Rutkowski
    Level 28  
    LChucki wrote:
    You draw a schematic from pre-made 74xx circuits and gates, flip-flops etc. Later simulation. When simulation ok, you upload (BitBlaster I think it's called, price about 60PLN, or, if you have LPT, some resistors) and it must work.
    .
    USB Blaster I found for $2.54 with free delivery. EPM3064 in QFP44 for $1.5.
    Cool prices I wonder how the programming will go....
  • #15 17891776
    LChucki
    Level 31  
    Jacek Rutkowski wrote:
    USB Blaster I found for $2.54 with free delivery. EPM3064 in QFP44 for $1.5.
    Prices cool I wonder how the programming will go...
    .
    Don't buy anything for now. Install the IDE and work on the simulator, if it is ok then invest. The CPLD simulator is the equivalent of the uC debugger.
  • #16 17892057
    Jacek Rutkowski
    Level 28  
    Which IDE to install on WIN7 for the EPM3064?
  • #17 17998006
    gkalfail
    Level 12  
    Jacek Rutkowski wrote:
    What IDE to install on WIN7 for EPM3064?
    .

    From what I understand you can only use software from the chip manufacturer i.e. Intel/Altera (Altera has been acquired by Intel), this would be "Quartus Prime". There is a free version and a paid version. The free one is usually OK for smaller chips. You also have to be careful about the version because not all support all families. Here is an overview ("lite/web" is the free version, you are interested in the "Max" family):

    http://fpgasoftware.intel.com/devices/

    Greetings!

Topic summary

The discussion addresses the feasibility of generating high-frequency waveforms (10-30 MHz) on a single pin using an ESP8266 running at 160 MHz under Arduino, without WiFi functionality. It is generally concluded that the ESP8266's I/O pins are too slow for meaningful waveform generation at these frequencies. Alternatives such as STM32F1 microcontrollers with MCO (Microcontroller Clock Output) or ESP32, which can achieve up to 40 MHz on a single GPIO pin with 50% duty cycle, are suggested. However, generating precise frequencies with adjustable duty cycles and exact pulse counts (e.g., for driving an AD9280 ADC) is challenging on ESP devices due to hardware limitations and lack of DMA support. For reliable high-frequency waveform generation and synchronous ADC interfacing at 20-30 MHz, the use of CPLDs or FPGAs is recommended. CPLDs like the EPM3064 offer affordable and programmable logic solutions, programmable via schematic capture or hardware description languages (AHDL/VHDL) using Intel/Altera Quartus Prime software. FIFO memory modules are expensive, making FPGA solutions more cost-effective for buffering. Beginners are advised to simulate designs before hardware investment. Overall, ESP8266 is unsuitable for the intended high-speed waveform generation, and more specialized hardware with dedicated peripherals and DMA is necessary for such applications.
Summary generated by the language model.
ADVERTISEMENT