avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] HELP! mega128 USART receive restarts execution


From: Rick Mann
Subject: Re: [avr-chat] HELP! mega128 USART receive restarts execution
Date: Sun, 12 Feb 2006 09:35:45 -0800


On Feb 12, 2006, at 7:10 AM, Larry Barello wrote:

You don't want to use '!' to negate a bit mask; That isn't doing what you
think it is.  You want to use '~'

I must disagree with you here. '!' results in a non-zero byte becoming 0. '~' (bitwise complement) results in all the 0 bits becoming 1 and all the 1 bits becoming 0. If I used '~', then I'd end up with all the bits in the result set ('1').

But thanks; I thought that might've been it more than once, despite having used the technique in many successful projects. (I do it to help me remember all the other bits' settings, and to make it easier to change things).

--
Rick


Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]