Searching \ for 'Detecting start and stop on I2C bus? [OT]' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'Detecting start and stop on I2C bus? [OT]'.

Truncated match.
PICList Thread
'Detecting start and stop on I2C bus? [OT]'
1999\03\09@064752 by paulb

flavicon
face
Tjaart van der Walt wrote:

> Hey, we live in a country where the health ministry staples
> condoms to AIDS prevention pampflets! You can't beat *that*.

 Depends - where do they place the staple? ;-)
--
 Cheers,
       Paul B.

1999\03\09@073557 by Quentin

flavicon
face
"Paul B. Webster VK2BZC" wrote:
>
> Tjaart van der Walt wrote:
>
> > Hey, we live in a country where the health ministry staples
> > condoms to AIDS prevention pampflets! You can't beat *that*.
>
>   Depends - where do they place the staple? ;-)
> --
This really happened. I am still shaking my head over it. Seems like our
health department decided in their wisdom to distribute free condoms on
AIDS day. With the condom came a pamphlet about AIDS awareness, stapled
nicely to the condom, through the condom. The TV news that night urged
everybody not to use the condoms and bring them back, etc., etc.
I hope somebody's head rolled in that department. The minister of that
department is very well known for other blurbs as well.

Tjaart, thanks. I don't know why I wanted to read all the bits looking
for the start or stop, where as I can just look for when both are high
as you said (seems like my brain came back now). Your way is good for
fast reading, but I am worried about all the cycles it will take to
'decode' the two registers to find out if it's a start or not. That is,
before the address bits arrive.

My Master PIC have enough time between a stop and the next start cycle
for me to do the following. I also allow enough time between after the
going low of SDA and going low of the SCL to double check:
SYNCH   BTFSS   PORTA,SCL       ;LOOK FOR BOTH HIGH
       GOTO    SYNCH
       BTFSS   PORTA,SDA
       GOTO    SYNCH

SYNCH1  BTFSS   PORTA,SCL       ;SCL LOW BEFORE SDA?
       GOTO    SYNCH
       BTFSC   PORTA,SDA
       GOTO    SYNCH1
       BTFSS   PORTA,SCL       ;SCL STILL HIGH?
       GOTO    SYNCH
       CALL    GET_ADDR

I haven't tested it yet. The delay between stop and start is long enough
to trap the 12C508. The master PIC is doing it's own routines then.

Quentin

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...