Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Help with bit banged spi

2013-11-28 by David Kelly

On Nov 26, 2013, at 8:23 PM, dspic@cat12.com wrote:

> On Mon, 25 Nov 2013 22:02:36 -0800 (PST), Philippe Habib
> <phabib@well.com> wrote:
> 
>> 			if(SPIOutBuf[j] & 0x80)
>> 			   P4 |= 1;
>> 			else
>> 			   P4 &= 0;
> 
> Perhaps prefer
> 			   P4 &= 0xFE;

I prefer to write it:  P4 &= ~1; or P4 &= ~(1<<0); to better indicate the bit position I am clearing.

--
David Kelly N4HHE, dkelly@HiWAAY.net
============================================================
Whom computers would destroy, they must first drive mad.



[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.