Search found 356 matches

by shaoziyang
Thu Apr 08, 2021 8:35 am
Forum: ESP32 boards
Topic: Is it possible to disable ADC?
Replies: 3
Views: 193

Re: Is it possible to disable ADC?

Finally I found a way to disable ADC by set registry 0x3FF4880C.

Code: Select all

def disableADC():
    mem32[0x3FF4880C] &= 0xFFF3FFFF
    mem32[0x3FF4880C] |= 0x00020000
by shaoziyang
Thu Apr 08, 2021 8:02 am
Forum: ESP32 boards
Topic: Is it possible to disable ADC?
Replies: 3
Views: 193

Re: Is it possible to disable ADC?

There is no deinit() method in ESP32's ADC now.
by shaoziyang
Thu Apr 08, 2021 4:47 am
Forum: ESP32 boards
Topic: Is it possible to disable ADC?
Replies: 3
Views: 193

Is it possible to disable ADC?

Is it possible to disable ADC function after use ADC to reduce power in sleep mode?
by shaoziyang
Wed Mar 03, 2021 2:16 am
Forum: General Discussion and Questions
Topic: ESP32 urandom.getrandbits(64) value error
Replies: 2
Views: 153

Re: ESP32 urandom.getrandbits(64) value error

Yes, max value for getrandbits() is 32.
by shaoziyang
Sat Feb 20, 2021 1:08 am
Forum: Raspberry Pi microcontroller boards
Topic: mandelbrot calculation and strange behavior in PICO
Replies: 6
Views: 514

Re: mandelbrot calculation and strange behavior in PICO

I have try to add gc.collect() before calculation, it will decrease the increase time slightly.

It appears to be caused by the print function, this problem only appear on PICO.
by shaoziyang
Fri Feb 19, 2021 2:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico Micropython overclocked twice (250MHz) works fine
Replies: 9
Views: 974

Re: Pico Micropython overclocked twice (250MHz) works fine

Yes, it really works, the calculation time of PI is reduced by almost half. import gc from utime import ticks_ms, ticks_diff def pi(places=100): # 3 + 3*(1/24) + 3*(1/24)*(9/80) + 3*(1/24)*(9/80)*(25/168) # The numerators 1, 9, 25, ... are given by (2x + 1) ^ 2 # The denominators 24, 80, 168 are giv...
by shaoziyang
Fri Feb 19, 2021 12:57 pm
Forum: Raspberry Pi microcontroller boards
Topic: mandelbrot calculation and strange behavior in PICO
Replies: 6
Views: 514

Re: mandelbrot calculation and strange behavior in PICO

calc time: 3526 ms
calc time: 3573 ms
calc time: 3627 ms
calc time: 3666 ms
calc time: 3719 ms
calc time: 3758 ms
calc time: 3812 ms
calc time: 3852 ms
by shaoziyang
Wed Feb 17, 2021 7:53 am
Forum: Raspberry Pi microcontroller boards
Topic: mandelbrot calculation and strange behavior in PICO
Replies: 6
Views: 514

Re: mandelbrot calculation and strange behavior in PICO

It works in PICO, but I have found a strange behavior in PICO, the calculation time increases each time, tens to hundreds of milliseconds each time. There is no such phenomenon on other hardware (such as pyboard, esp32, microbit).

Is this a bug in PICO firmware?
by shaoziyang
Wed Feb 17, 2021 7:49 am
Forum: Raspberry Pi microcontroller boards
Topic: mandelbrot calculation and strange behavior in PICO
Replies: 6
Views: 514

mandelbrot calculation and strange behavior in PICO

I have modify [*]examples/mandel.py[*] for performance testing. from time import ticks_ms, ticks_diff MAX_ITER = 60 MANDEL_CHAR = ( ' ', '.', '`', ',', ':', ';', '|', 'o', '<', '>', '(', ')', '{', '}', '+', '~', '=', '-', '#', '@' ) def run(func, param = None): t1 = ticks_ms() if param == None: func...