Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20919

BASCOM-AVR : I2C Problem with ATMega 168pa : NEWTOPIC

$
0
0
Dear all, I try to drive a MIDAS-Display (ST7032 Controller) with a ATMega 168pa. I have also two port expander and some other I2C connected with the bus. After a long sequence of trying to initialize the display I got doubts whether the TWI is working. I also tested both expander and also no reaction. The pull up resistors are connected 3,3V -> 4k7. By reading the documentation from Atmel for ATMega168 I found this remark: [quote:a699865dd8]The PRTWI bit in ”Power Reduction Register - PRR” on page 40 must be written to zero to enable the 2-wire Serial Interface.[/quote:a699865dd8] PRTWI is bit 7 In m168pdef.dat I found PRR=$64. Is it comparable with &H64? Is it possible to change to &H24 ($24, in this case bit 7 would be 0)? Is it the reason why TWI can´t be accessed? best regards, Benedikt [b:a699865dd8][color=red:a699865dd8](BASCOM-AVR version : 2.0.7.6 , Latest : 2.0.7.7 )[/b:a699865dd8][/color:a699865dd8]

Viewing all articles
Browse latest Browse all 20919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>