These are chat archives for esp8266/Arduino

21st
Jul 2015
Harrison Mclean
@h4rm0n1c
Jul 21 2015 04:28

I had a question about timers.

If I'm using PWM, can I still use Timer1? I need something that can allow me to write to SPI every 5ms or so, I tried Ticker and it wasn't very good for my specific application.

If not, how much work would it take to get Timer2 working? That way I can have both my accurately timed SPI transfers and PWM.

I'd try timer0, but that doesn't have a loop capability as far as I can tell.
Michael Miller
@Makuna
Jul 21 2015 06:13
In the ISR for timer0, just set the next period and it will start the timer again.
Servo uses timer0.
Me No Dev
@me-no-dev
Jul 21 2015 07:48
"the reference voltage is derived from VCC, which is assumed to be 3.3V."
Ivan Grokhotkov
@igrr
Jul 21 2015 07:48
documentation generator mostly ready, docs viewable both on github and standalone
Me No Dev
@me-no-dev
Jul 21 2015 07:48
this is not true
it has an internal reference
which is always 1V
tested with 3.0-4.0V range
PWM is on pins 0-16 not 0-15
Ivan Grokhotkov
@igrr
Jul 21 2015 07:53
regarding adc, any idea why espressif has this in their docs regarding PHY init byte 107?
// vdd33_const
// the voltage of PA_VDD
// x=0xff: it can measure VDD33,
// 18<=x<=36: use input voltage,  
// the value is voltage*10, 33 is 3.3V, 30 is 3.0V,
// x<18 or x>36: default voltage is 3.3V
regarding PWM — thanks, will fix the pic
Me No Dev
@me-no-dev
Jul 21 2015 08:11
it just shows how to calculate the voltage
the byte switches some path or calculation inside
i am 100% that the 1V is constant reference
and that is how they measure the voltage
if you depend on the input voltage (like AVR normally does)
and put resistor latter to drop to a readable value
with change of VCC the reading will be constant
in our case is not
I used it to keep track of lipo connected directly to ESP VCC
Ivan Grokhotkov
@igrr
Jul 21 2015 08:14
so the question is, how does changing its byte say, from 33 to 18 affect ADC readings? what is this "path or calculation"?
Me No Dev
@me-no-dev
Jul 21 2015 08:15
no clue really...
but they require you to keep the ADC open when reading VCC
so maybe switches to some internal resistor divider
like enablin pullup and pulldown at the same time
Me No Dev
@me-no-dev
Jul 21 2015 08:21
you can add DNS-SD and SSDP to the list of services (DNS-SD being part of mDNS)
hrsavla
@hrsavla
Jul 21 2015 16:02
Jjppjopop
Markus
@Links2004
Jul 21 2015 16:09
@igrr any planes for the merge? would like to go to the new "request" style but cant get my git clean until a last merge.
Ivan Grokhotkov
@igrr
Jul 21 2015 16:34
I'm desperately trying to release the damn updated package, so I'd like to avoid merging in SDK updates. I can merge into another branch if you like
Markus
@Links2004
Jul 21 2015 16:38
other branch make no difference to my branch, keep going on the packages. will keep it as it is for the moment.