Problem Read DS1307 AVR
Quote from yavari on January 20, 2025, 7:40 amHello
I have problem with read ds1307 using atmel studio avr(using Ardunio is ok).
when I load hex file to simulate on atmega 16, microcontroller wait for read data in ds1307 (while (!(TWCR & (1<<TWINT)));)
and program not exit from while(), the code is correct, because i test with proteus and work correctly
but on simulide 1.0.0, 1.1.0 not work ( while (!(TWCR & (1<<TWINT))) )
TWCR = (1<<TWSTA)|(1<<TWEN)|(1<<TWINT);/* Enable TWI, generate start condition and clear interrupt flag */while (!(TWCR & (1<<TWINT))); /* Wait until TWI finish its current job (start condition) */example code: https://www.electronicwings.com/avr-atmega/real-time-clock-rtc-ds1307-interfacing-with-atmega16-32thanks.
Hello
I have problem with read ds1307 using atmel studio avr(using Ardunio is ok).
when I load hex file to simulate on atmega 16, microcontroller wait for read data in ds1307 (while (!(TWCR & (1<<TWINT)));)
and program not exit from while(), the code is correct, because i test with proteus and work correctly
but on simulide 1.0.0, 1.1.0 not work ( while (!(TWCR & (1<<TWINT))) )