Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

TWI on ATMega16 vs ATMega128

2009-01-05 by englsprogeny

I have code running on my ATMega128. The software is TWI/I2C (talking
to a DS1307).   When I compile it for my ATMega16, it gets stuck in
the following file:

TWI.C

At the following location: 

WAIT_FOR_TWINT \
  for ( \
       toCounter = toValue; \
       ( toCounter != 0 ) && ( ( TWCR & _BV( TWINT ) ) == 0 ); \
  )


I am using GCC.

Why does it not get stuck here when running on the Mega128 but does
get stuck when running on my Mega16?

I know it gets stuck here because I am using the UART to trace code
[with Windows Terminal].

I have been playing with GCC for a year now.  Is CodeVision (or some
other compiler) easier to work with?

Thanks.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.