atmega8 +24c512

Zaprogramowałem sobie pamięć 24c512 w programatorze. Podłączyłem właściwie do atmegi (atmega pracuje z zegarem wewnętrznym 1mhz) i probuje go odczytać. To fragment programu:

ldi r16,(1<<TWPS0) ;inicjalizacja out TWSR, r16 ldi r16,18 out TWBR, r16

ldi r16,(1<<TWEN)|(1<<TWSTA)|(1<<TWINT) ;start out TWCR,r16

czekaj_na_start: in r16,TWCR sbrs r16,TWINT rjmp czekaj_na_start

.... ....

Program zapętla się w oczekiwaniu na potwierdzenie sygnału start. Czy zapomniałem coś ustawić? Nie widzę błędu a program nie chce iść dalej. Jakieś sugestie?

Reply to
Stive
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.