Search found 918 matches

by mnfisher
Fri May 31, 2024 9:01 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

Another step forward :-)

The RTC is acting as a slave device. Could maybe look at the output for this and see what/how it varies?
by mnfisher
Fri May 31, 2024 8:46 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

Another 'oddity' - when writing m->s there is an ~18us delay between bytes. On receiving s->m there is a much shorter 'gap' (~8us) and adding a delay after each byte is transmitted doesn't affect this as expected - adding a 1ms delay gives 2 bytes with first value (and a 8us delay between them) then...
by mnfisher
Fri May 31, 2024 8:09 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

Looking at your screenshot - after the 'receive' SDA stays low which holds the i2c bus as 'busy' - and prevents further transmission. If you look at the trace I posted - you can see that SDA goes high again after the 'read' It might be a slightly different board - could you try a pull-up resistor on...
by mnfisher
Fri May 31, 2024 7:35 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

It is very odd = what hardware are you testing on? As you can see from my screenshot it had counted up quite a few iterations when I took it? Can you 'disable' the 'Read' in the sender (master - will perhaps have to think again about the naming!) Iain - can you remember what you got returned by the ...
by mnfisher
Thu May 30, 2024 9:26 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

I've had one step forwards and one 'to the side' So - having ascertained that transmit works AOK (for me :-) ) I rewrote the code to use the I2C CAL component and transactions )notice how this makes the code for the master much simpler) I also just use the scope here (and as smartscope has decided t...
by mnfisher
Wed May 29, 2024 2:11 pm
Forum: Bug Reports
Topic: ESP32 timer interrupt problem [SOLVED]
Replies: 7
Views: 169

Re: ESP32 timer interrupt problem [SOLVED]

Cool - glad it's working for you...
by mnfisher
Wed May 29, 2024 2:10 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

It's odd that it just worked one time for you - repeated every second for me. Strange. Initialise is needed before using the i2c (once only), the transaction routines allow a simpler interface (it handles start and stop conditions. Transactions are also the only available interface on some MCUs but ...
by mnfisher
Tue May 28, 2024 10:28 pm
Forum: Bug Reports
Topic: ESP32 timer interrupt problem [SOLVED]
Replies: 7
Views: 169

Re: ESP32 timer interrupt problem [SOLVED]

It is an amazingly powerful chip - with a lot of features. It does take a slightly different 'mindset' to MCUs that run a single program though.. I did a very simple SQW example using a timer. Pulses are 2.00 or 2.01ms according to my scope. However the chip is doing nothing except looping on a dela...
by mnfisher
Tue May 28, 2024 5:19 pm
Forum: Bug Reports
Topic: ESP32 timer interrupt problem [SOLVED]
Replies: 7
Views: 169

Re: ESP32 timer interrupt problem

As the code stands - the wdt will cause a reboot repeatedly. Your main loop needs to have a delay in it to allow the (co-operative) multi-tasking to work (and there are at least 5 tasks running created by the RTOS) One option might be to create a separate task (with xTaskCreate) - (In pseudocode) .l...
by mnfisher
Mon May 27, 2024 10:02 pm
Forum: User Components
Topic: 2 Arduino I2C communication
Replies: 18
Views: 248

Re: 2 Arduino I2C communication

I got this working reliably at 100kHz and 400kHz. At 1MHz it worked a while before stopping (I was surprised it worked as well as it did though) I set the slave address (arbitrarily) as 0x54 - when transmitted this is shifted left one bit (with bit 0 set to 'read' data) - So here address displays in...