We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Schultz claims compiler error in his 0-13-753-815-4 re tl1, th1 for setting up baud rate. He gives example: tl1 = ~( 1000/ 256) = 0xfd ) where the value should be 0xfc. However, he is calculating the value incorrectly. He should be doing: tl1 = (~1000)/xx. In other words, take the 2's complement first, then mod 256 to get the lower value. In his example, 1000/256 is 3 and the two's complement is 0xdd. However, the latter method gives FC, the correct value. (By the way, his follow-up book repeats the same anomaly.)