2007-04-24 01:01 AM
2007-04-23 03:11 PM
Hi,
The datasheet for 72325 states that: QUOTE The user must read the MS Byte first, then the LS Byte value is buffered automatically. This buffered value remains unchanged until the 16-bit read sequence is completed, even if the user reads the MS Byte several times. END QUOTE Does that mean that if I write code like this: unsigned int TimerValue; ... TimerValue=TACR; the compiler will automatically do as quoted from the datasheet? I did have a look at the assembly but could not make out much Thanks,2007-04-23 09:08 PM
2007-04-24 12:13 AM
... when you use the COSMIC compiler, everything is o.k.
But: As it is not prescribed (in ANSI-C), other compilers may apply the reverse sequence to read or write a 16-bit integer. Regards WoRo2007-04-24 12:41 AM
... when you use the COSMIC compiler, everything is o.k.
But: As it is not prescribed (in ANSI-C), other compilers may apply the reverse sequence to read or write a 16-bit integer. Regards WoRo2007-04-24 01:01 AM
Hi,
Thank you for your replies. I guess in cases like this the chip's nature must take priority over ANSI C. The registers in question are not just simple ROM/RAM locations but rather special ones and their hardware implementation apparently has impact on the way these registers are read/written.