Search found 54 matches

by human890209
Thu Sep 06, 2018 2:51 am
Forum: ESP32 Arduino
Topic: Help! How to setup a multi-master I2C?
Replies: 0
Views: 4557

Help! How to setup a multi-master I2C?

Hi, I tested my I2C code on ESP32, some wired things happen. And I checked the TwoWire library and got confused with the sendStop argument. I guess the sendStop can only be set to TRUE or the message won't be received or sent. I noticed ESP32 I2C used a queue system. I used Arduino boards and ESP826...
by human890209
Tue Sep 04, 2018 9:59 am
Forum: ESP32 Arduino
Topic: How to cancel the Interrupts Stack?
Replies: 6
Views: 9398

Re: How to cancel the Interrupts Stack?

Hi, thanks.@ESP_Angus I know that. It's cool to have more hardware serials on ESP32, but I use the Hardware Serial to communicate with other Device, cause that should be Normal. I use software serials to communicate with my programmed boards, for example, ESP32 to ESP32. I don't use I2C or SPI to co...
by human890209
Mon Sep 03, 2018 1:42 pm
Forum: ESP32 Arduino
Topic: How to cancel the Interrupts Stack?
Replies: 6
Views: 9398

Re: How to cancel the Interrupts Stack?

Hi, @ESP_Angus Thanks for your reply. I get the code from this page: https://techtutorialsx.com/2017/09/30/esp32-arduino-external-interrupts/ Thanks for your advice that these lines could be canceled in the ISR, portENTER_CRITICAL_ISR(&mux); portEXIT_CRITICAL_ISR(&mux); I'm trying to do SoftwareSeri...
by human890209
Mon Sep 03, 2018 8:29 am
Forum: ESP32 Arduino
Topic: How to cancel the Interrupts Stack?
Replies: 6
Views: 9398

How to cancel the Interrupts Stack?

Hi, My code is similar to this: const byte interruptPin = 25; volatile int interruptCounter = 0; int numberOfInterrupts = 0; [b]portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;[/b] void [b]IRAM_ATTR [/b]handleInterrupt() { [b]portENTER_CRITICAL_ISR(&mux);[/b] interruptCounter++; [b]portEXIT_CRITICAL...
by human890209
Fri Aug 24, 2018 12:39 am
Forum: ESP32 Arduino
Topic: What's the advantage of SigmaDelta?
Replies: 9
Views: 15858

Re: What's the advantage of SigmaDelta?

Thanks, JoaoLopesF
SigmaDelta is faster than DAC.
And have you compared SigmaDelta with LEDC? If just for PWM usage, is SigmaDelta still got an advantage over LEDC?
by human890209
Sat Aug 18, 2018 2:28 am
Forum: ESP32 Arduino
Topic: Why each instance of my class consume 20byte of memory at least?
Replies: 9
Views: 12027

Re: Why each instance of my class consume 20byte of memory at least?

Hi, And I made more tests. The results show that the margins of the new instance are not increasing, they only change in a pattern such as (6 6 12 6 6 12). So if calculate the average of 100 instances' memory consumes, the number doesn't change. So big memory won't cause lower efficiency. My earlier...
by human890209
Sat Aug 18, 2018 2:25 am
Forum: ESP32 Arduino
Topic: Why each instance of my class consume 20byte of memory at least?
Replies: 9
Views: 12027

Re: Why each instance of my class consume 20byte of memory at least?

In theory you should be able to do the same thing with classes. Allocate a block big enough to hold e.g. 1500 * sizeof(myClassType) and then break it up into 1500 pointers. Or dynamically calculating the pointer when needed based on index. You can have an init and deinit routine that works the same...
by human890209
Sat Aug 18, 2018 2:12 am
Forum: ESP32 Arduino
Topic: What's the advantage of SigmaDelta?
Replies: 9
Views: 15858

Re: What's the advantage of SigmaDelta?

Hi, Archibald Thanks for your reply. But I'm getting confused now. I'm comparing LECC and Sigma-delta and create this topic to ask. And JoaoLopesF mentioned he used Sigma-Delta to perform a sinusoidal waveform. Do you use DAC to created the sinusoidal waveform? This is not an advantage of SigmaDelta...
by human890209
Fri Aug 17, 2018 12:57 am
Forum: ESP32 Arduino
Topic: What's the advantage of SigmaDelta?
Replies: 9
Views: 15858

Re: What's the advantage of SigmaDelta?

Hi, Thanks, kolban. I saw the Real DAC in ESP32's GitHub readme, it's cool which Arduino doesn't have. I will test it some other day. Cause I'm an Arduino user. My first thought is if my sketches could run in this So Advanced MCU/Board :D And ESP32 shocked me with analogWrite(). :shock: Thanks, Joao...
by human890209
Fri Aug 17, 2018 12:43 am
Forum: ESP32 Arduino
Topic: Why each instance of my class consume 20byte of memory at least?
Replies: 9
Views: 12027

Re: Why each instance of my class consume 20byte of memory at least?

HI, Thanks for your reply. Thanks, fly135 I start to get the logic behind the memory management. I'm a newbie to C++. :D Thanks, kolban I use Class cause I got functions in it and I got Inheritance(I use the list to hold the base class's pointer). I don't know if I could replace class with struct.I ...