Hi Vince, Many thanks for your answer, your right, there was my fault with expression. But I found there also, that shift is not same as rotation. So now I remaking code.
Best Regards Martin Vincent Trouilliez wrote: > >> Dears all, there is some fault in following procedure. Function returns >> value, but with same number. > >> data>>1; > > That might be your problem: "data>>" shifts data but does NOT put the > result back into data. > The compiler probably optimizes this statement out, as it has no effect in > practice. > > What you probably wanted to do was: > > data = data >> 1; > > or in short form: > > data >>= 1; > > > > HTH, > > -- > Vince > > > _______________________________________________ > AVR-chat mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/avr-chat > > -- View this message in context: http://www.nabble.com/read-data-between-DS1302-and-ATMEGA8-tp21761333p21811930.html Sent from the AVR - General mailing list archive at Nabble.com. _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
