Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By urbanze
#67116 hello again guys! i make some test's with pwm.. i need to know (for write in tutorial), max frequency on pwm in esp8266.

i try to use TIMER1 in arduino ide, this timer1 and 0 is hardware timer? i know OS_TIMER is software, but timer1 and timer0 function's is for hardware timer if not, how can i use hardware timer? After my test's, max pwm is about 250kHz. I need something about 1-10MHz.
User avatar
By rudy
#67117 You will need to use new added hardware.

Assume that you have an oscillator frequency of 160MHz. If you have a 8 bit pwm then 160000000/256=625000Hz. That is assuming that the clock is used directly without any prescaling or division.
User avatar
By urbanze
#67124
rudy wrote:You will need to use new added hardware.

Assume that you have an oscillator frequency of 160MHz. If you have a 8 bit pwm then 160000000/256=625000Hz. That is assuming that the clock is used directly without any prescaling or division.


i used port register manipulation and timer1 with interrupt, just this. it's IMPOSSIBLE to make max 250kHz. arduino with timer can 4-8Mhz, and esp?!