BS2 to 3.3v part I2C interface
Archiver
Posts: 46,084
I just got a BS2 board and like to interface it to 3.3 part I2C. It
seems that I have to do bit banging on 2 port pins for BS2.
I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
directly to BS2 board (3.3v part I have doesn't have 5v tolerant
inputs).
I can do the CMOS/TTL N-channel shifter but would like to avoid it if
there is a way to configure BS2 board directly. BTW, i have the BOE
board.Tks,jeff-
seems that I have to do bit banging on 2 port pins for BS2.
I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
directly to BS2 board (3.3v part I have doesn't have 5v tolerant
inputs).
I can do the CMOS/TTL N-channel shifter but would like to avoid it if
there is a way to configure BS2 board directly. BTW, i have the BOE
board.Tks,jeff-
Comments
time. GOTO the Parallax web site, select the Nuts & Volts section and
look for an article called "I2C Fun For Everyone." It contains a group
of low- and high-level I2C routines for non-BS2p Stamps.
I haven't tried this myself, but you may be able to use a simple
resistor interface when going between a 5-volt and 3.3-volt systems.
Stamp <>
[noparse][[/noparse]4.7k]
*
<>
|
|
[noparse][[/noparse]10k]
|
|
Vss
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=16TbBqULQLJGxHbdZpNCmY3_n2NIVe42IT2AZXijbM3LznruTDDFfhMrtvDjGHzGcWJQqol3FoSioIY]jeffsak@y...[/url
Sent: Sunday, November 16, 2003 10:16 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
I just got a BS2 board and like to interface it to 3.3 part I2C. It
seems that I have to do bit banging on 2 port pins for BS2.
I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
directly to BS2 board (3.3v part I have doesn't have 5v tolerant
inputs).
I can do the CMOS/TTL N-channel shifter but would like to avoid it if
there is a way to configure BS2 board directly. BTW, i have the BOE
board.Tks,jeff-
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
thank you very much. I'll give it a try. If I understand it right,
the 4.7K in-line resistor and 10K pulldown are in addition to the
4.7K pullups normally required for the I2C SCL and SDA lines. Is that
correct?
Jeff-
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
the
> time. GOTO the Parallax web site, select the Nuts & Volts section
and
> look for an article called "I2C Fun For Everyone." It contains a
group
> of low- and high-level I2C routines for non-BS2p Stamps.
>
> I haven't tried this myself, but you may be able to use a simple
> resistor interface when going between a 5-volt and 3.3-volt systems.
>
> Stamp <>
[noparse][[/noparse]4.7k]
*
<>
> |
> |
> [noparse][[/noparse]10k]
> |
> |
> Vss
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
> Sent: Sunday, November 16, 2003 10:16 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>
>
> I just got a BS2 board and like to interface it to 3.3 part I2C.
It
> seems that I have to do bit banging on 2 port pins for BS2.
>
> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
> inputs).
>
> I can do the CMOS/TTL N-channel shifter but would like to avoid it
if
> there is a way to configure BS2 board directly. BTW, i have the BOE
> board.Tks,jeff-
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
haven't tried this myself, but my guts tell me it will work.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=QbnxFvM2MX0DPOreOocefb2C0d2QaL4eDeZ5CNZelDy6sGGyTH4afVwK4eecSASRiBqnfdZhWodd]jeffsak@y...[/url
Sent: Tuesday, November 18, 2003 5:36 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
Jon,
thank you very much. I'll give it a try. If I understand it right,
the 4.7K in-line resistor and 10K pulldown are in addition to the
4.7K pullups normally required for the I2C SCL and SDA lines. Is that
correct?
Jeff-
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
the
> time. GOTO the Parallax web site, select the Nuts & Volts section
and
> look for an article called "I2C Fun For Everyone." It contains a
group
> of low- and high-level I2C routines for non-BS2p Stamps.
>
> I haven't tried this myself, but you may be able to use a simple
> resistor interface when going between a 5-volt and 3.3-volt systems.
>
> Stamp <>
[noparse][[/noparse]4.7k]
*
<>
> |
> |
> [noparse][[/noparse]10k]
> |
> |
> Vss
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
> Sent: Sunday, November 16, 2003 10:16 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>
>
> I just got a BS2 board and like to interface it to 3.3 part I2C.
It
> seems that I have to do bit banging on 2 port pins for BS2.
>
> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
> inputs).
>
> I can do the CMOS/TTL N-channel shifter but would like to avoid it
if
> there is a way to configure BS2 board directly. BTW, i have the BOE
> board.Tks,jeff-
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
When sda trys to ACK or to send back data in that circuit...
;--[noparse][[/noparse]pullup]---Vdd=5 volts
|
> Stamp <>-o---[noparse][[/noparse]4.7k]
*
<sda>
> |
> |
> [noparse][[/noparse]10k]
> |
> |
> Vss
...it can only pull the Stamp pin down to 2.5 volts. No good. That
is above the switching threshold of 1.3 volts. If the pullup is 22k
instead of 4.7k, then the Stamp input would be pulled down to 0.9
volts when sda goes low, and that would be low enough, but not great.
There is no such problem on the scl line, because it never has to
talk back to the Stamp.
A simpler solution might be the following.
;--[noparse][[/noparse]4.7k]---3.3 volts
|
Stamp <>-o---[noparse][[/noparse]220]
*
<sda>
The pullup=4.7kohm goes to the 3.3 volt supply instead of the 5 volt
supply. The Stamp pin in the I2C commands toggles between low output
and input, never a high output. That is true of both sda and scl.
The 0 to 3.3 volt levels would be fine for good noise immunity around
the Stamp's 1.3 volt threshold. The 220 ohm resistor is there just
to protect against a bad program that by mistake makes the Stamp pin
a high output, and having the 220 ohms there makes the sda
transitions from 0.15 volts to 3.3 volts, which is still okay.
-- Tracy
http://www.emesystems.com
>Yes, add the pull-ups on the Stamp-side of the 4.7k. Like I said, I
>haven't tried this myself, but my guts tell me it will work.
>
>-- Jon Williams
>-- Applications Engineer, Parallax
>-- Dallas Office
>
>
>
Original Message
>From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=bxIwU5D8yNw9o9ez7BVtUZzDEdJCjlYm9fezodFx8EL31Agfpjinvkq6jbfc2VBErEs-CdII_SQ]jeffsak@y...[/url
>Sent: Tuesday, November 18, 2003 5:36 AM
>To: basicstamps@yahoogroups.com
>Subject: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>
>
>Jon,
>thank you very much. I'll give it a try. If I understand it right,
>the 4.7K in-line resistor and 10K pulldown are in addition to the
>4.7K pullups normally required for the I2C SCL and SDA lines. Is that
>correct?
>Jeff-
>--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
>wrote:
>> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
>the
>> time. GOTO the Parallax web site, select the Nuts & Volts section
>and
>> look for an article called "I2C Fun For Everyone." It contains a
>group
>> of low- and high-level I2C routines for non-BS2p Stamps.
>>
>> I haven't tried this myself, but you may be able to use a simple
>> resistor interface when going between a 5-volt and 3.3-volt systems.
>>
>
> > Stamp <>
[noparse][[/noparse]4.7k]
*
<>
>> |
>> |
>> [noparse][[/noparse]10k]
>> |
>> |
>> Vss
> >
>> -- Jon Williams
>> -- Applications Engineer, Parallax
>> -- Dallas Office
>>
>>
>>
Original Message
>> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
>> Sent: Sunday, November 16, 2003 10:16 PM
>> To: basicstamps@yahoogroups.com
>> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>>
>>
>> I just got a BS2 board and like to interface it to 3.3 part I2C.
>It
>> seems that I have to do bit banging on 2 port pins for BS2.
>>
>> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
>> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
>> inputs).
>>
>> I can do the CMOS/TTL N-channel shifter but would like to avoid it
>if
>> there is a way to configure BS2 board directly. BTW, i have the BOE
> > board.Tks,jeff-
myself) and are the best solution for the BS2p and BS2pe. Myy I2C
routines for the BS2/BS2e/BS2sx use SHIFTOUT which will drive the SCL
and SDA lines to 5 volts, but the may be a non-issue with the 220-ohm
series resistor.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=uzx5LLpGeBAvUD12wkMXD_OozClzFbwwIRP8cHa-CKoFq3dqMDto8gytFMCNv3Hk7puYXnjsVJaDZwL9]tracy@e...[/url
Sent: Tuesday, November 18, 2003 11:32 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
Hi Jon & Jeff,
When sda trys to ACK or to send back data in that circuit...
;--[noparse][[/noparse]pullup]---Vdd=5 volts
|
> Stamp <>-o---[noparse][[/noparse]4.7k]
*
<sda>
> |
> |
> [noparse][[/noparse]10k]
> |
> |
> Vss
...it can only pull the Stamp pin down to 2.5 volts. No good. That
is above the switching threshold of 1.3 volts. If the pullup is 22k
instead of 4.7k, then the Stamp input would be pulled down to 0.9
volts when sda goes low, and that would be low enough, but not great.
There is no such problem on the scl line, because it never has to
talk back to the Stamp.
A simpler solution might be the following.
;--[noparse][[/noparse]4.7k]---3.3 volts
|
Stamp <>-o---[noparse][[/noparse]220]
*
<sda>
The pullup=4.7kohm goes to the 3.3 volt supply instead of the 5 volt
supply. The Stamp pin in the I2C commands toggles between low output
and input, never a high output. That is true of both sda and scl.
The 0 to 3.3 volt levels would be fine for good noise immunity around
the Stamp's 1.3 volt threshold. The 220 ohm resistor is there just
to protect against a bad program that by mistake makes the Stamp pin
a high output, and having the 220 ohms there makes the sda
transitions from 0.15 volts to 3.3 volts, which is still okay.
-- Tracy
http://www.emesystems.com
>Yes, add the pull-ups on the Stamp-side of the 4.7k. Like I said, I
>haven't tried this myself, but my guts tell me it will work.
>
>-- Jon Williams
>-- Applications Engineer, Parallax
>-- Dallas Office
>
>
>
Original Message
>From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=bNIFzTRWfkZ71Y_fMAvkZz_9EHACx9Gvvb3SvLIMnvMF-daxY_kJqezebaYHcbT3DEN0VsRFzdvT]jeffsak@y...[/url
>Sent: Tuesday, November 18, 2003 5:36 AM
>To: basicstamps@yahoogroups.com
>Subject: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>
>
>Jon,
>thank you very much. I'll give it a try. If I understand it right, the
>4.7K in-line resistor and 10K pulldown are in addition to the 4.7K
>pullups normally required for the I2C SCL and SDA lines. Is that
>correct?
>Jeff-
>--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
>wrote:
>> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
>the
>> time. GOTO the Parallax web site, select the Nuts & Volts section
>and
>> look for an article called "I2C Fun For Everyone." It contains a
>group
>> of low- and high-level I2C routines for non-BS2p Stamps.
>>
>> I haven't tried this myself, but you may be able to use a simple
>> resistor interface when going between a 5-volt and 3.3-volt systems.
>>
>
> > Stamp <>
[noparse][[/noparse]4.7k]
*
<>
>> |
>> |
>> [noparse][[/noparse]10k]
>> |
>> |
>> Vss
> >
>> -- Jon Williams
>> -- Applications Engineer, Parallax
>> -- Dallas Office
>>
>>
>>
Original Message
>> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
>> Sent: Sunday, November 16, 2003 10:16 PM
>> To: basicstamps@yahoogroups.com
>> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>>
>>
>> I just got a BS2 board and like to interface it to 3.3 part I2C.
>It
>> seems that I have to do bit banging on 2 port pins for BS2.
>>
>> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
>> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
>> inputs).
>>
>> I can do the CMOS/TTL N-channel shifter but would like to avoid it
>if
>> there is a way to configure BS2 board directly. BTW, i have the BOE
> > board.Tks,jeff-
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
drive the Stamp pin high. That might do odd things to the 3.3 volt
logic by forward biasing its protection diodes. A safer circuit
might use higher resistances and include a Schottky diode (SD103) to
shunt the current over to the 3.3 supply instead of through the
device. A 3.3 volt zener to ground could also serve that purpose.
;--[noparse][[/noparse]22k]---o-3.3 volts
| |
|-->]
'
| SD103
Stamp <>--[noparse][[/noparse]1k]--o
<sda>
|
or zener -\<-here to Vss
Or, put the Schottky diode in series with the signal to the Stamp...
;--[noparse][[/noparse]10k]--3.3 volts
|
|
Stamp <>--o---[noparse][[/noparse]<--o
<sda>
| SD103
|
`--[noparse][[/noparse]51k]---Vss
When the Stamp side goes low, the I2C device sees an insignificant
0.2 volt offset due to the diode. When the I2C device goes low, the
Stamp pin is pulled low by the 51k resistor. When the both sides are
high impedance, the stamp input is pulled up to at a comfortable 2.6
volts, twice the 1.3 volt switching threshold, to register as high.
No danger of current through the protection diodes on the device.
-- Tracy
http://www.emesystems.com
>Tracy is, of course, correct (like I said, I hadn't actually tried this
>myself) and are the best solution for the BS2p and BS2pe. Myy I2C
>routines for the BS2/BS2e/BS2sx use SHIFTOUT which will drive the SCL
>and SDA lines to 5 volts, but the may be a non-issue with the 220-ohm
>series resistor.
>
>-- Jon Williams
>-- Applications Engineer, Parallax
>-- Dallas Office
>
>
>
>
Original Message
>From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=W4517kB4s13wbul_2xPe5H7Ag0UHDi38dc4_jNzGhhRW1TTJukjW4W67X-1KLItKUclGNF8G1k8Ju-xK]tracy@e...[/url
>Sent: Tuesday, November 18, 2003 11:32 AM
>To: basicstamps@yahoogroups.com
>Subject: RE: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>
>
>Hi Jon & Jeff,
>
>When sda trys to ACK or to send back data in that circuit...
>
> ;--[noparse][[/noparse]pullup]---Vdd=5 volts
> |
>> Stamp <>-o---[noparse][[/noparse]4.7k]
*
<sda>
>> |
>> |
>> [noparse][[/noparse]10k]
>> |
>> |
>> Vss
>
>...it can only pull the Stamp pin down to 2.5 volts. No good. That
>is above the switching threshold of 1.3 volts. If the pullup is 22k
>instead of 4.7k, then the Stamp input would be pulled down to 0.9
>volts when sda goes low, and that would be low enough, but not great.
>There is no such problem on the scl line, because it never has to
>talk back to the Stamp.
>
>A simpler solution might be the following.
>
> ;--[noparse][[/noparse]4.7k]---3.3 volts
> |
> Stamp <>-o---[noparse][[/noparse]220]
*
<sda>
>
>The pullup=4.7kohm goes to the 3.3 volt supply instead of the 5 volt
>supply. The Stamp pin in the I2C commands toggles between low output
>and input, never a high output. That is true of both sda and scl.
>The 0 to 3.3 volt levels would be fine for good noise immunity around
>the Stamp's 1.3 volt threshold. The 220 ohm resistor is there just
>to protect against a bad program that by mistake makes the Stamp pin
>a high output, and having the 220 ohms there makes the sda
>transitions from 0.15 volts to 3.3 volts, which is still okay.
>
> -- Tracy
> http://www.emesystems.com
>
>
>
>
>>Yes, add the pull-ups on the Stamp-side of the 4.7k. Like I said, I
>>haven't tried this myself, but my guts tell me it will work.
>>
>>-- Jon Williams
>>-- Applications Engineer, Parallax
>>-- Dallas Office
>>
>>
>>
Original Message
>>From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=EhBS455puYIhndj_k3SSrfJIVNZ6IIc3X0GHXrvP86GzJrrllAs41gXbPqBKIN1gCvRKeOzzUpVG]jeffsak@y...[/url
>>Sent: Tuesday, November 18, 2003 5:36 AM
>>To: basicstamps@yahoogroups.com
>>Subject: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>>
>>
>>Jon,
>>thank you very much. I'll give it a try. If I understand it right, the
>>4.7K in-line resistor and 10K pulldown are in addition to the 4.7K
>>pullups normally required for the I2C SCL and SDA lines. Is that
> >correct?
>>Jeff-
>>--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
>>wrote:
>>> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
>>the
>>> time. GOTO the Parallax web site, select the Nuts & Volts section
>>and
>>> look for an article called "I2C Fun For Everyone." It contains a
>>group
>>> of low- and high-level I2C routines for non-BS2p Stamps.
>>>
>>> I haven't tried this myself, but you may be able to use a simple
>>> resistor interface when going between a 5-volt and 3.3-volt systems.
>>>
>>
>> > Stamp <>
[noparse][[/noparse]4.7k]
*
<>
>>> |
>>> |
>>> [noparse][[/noparse]10k]
>>> |
> >> |
>>> Vss
>> >
>>> -- Jon Williams
>>> -- Applications Engineer, Parallax
>>> -- Dallas Office
>>>
>>>
>>>
Original Message
>>> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
>>> Sent: Sunday, November 16, 2003 10:16 PM
>>> To: basicstamps@yahoogroups.com
>>> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>>>
>>>
>>> I just got a BS2 board and like to interface it to 3.3 part I2C.
>>It
>>> seems that I have to do bit banging on 2 port pins for BS2.
>>>
>>> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
>>> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
>>> inputs).
>>>
>>> I can do the CMOS/TTL N-channel shifter but would like to avoid it
>>if
>>> there is a way to configure BS2 board directly. BTW, i have the BOE
>> > board.Tks,jeff-
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject
>and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>
>
>This message has been scanned by WebShield. Please report SPAM to
>abuse@p....
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
hit on the solution.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FDTRFy5bP_P8OTNVUy7fiM2EeC_yUT_mgUeuAasMqnBcAV44lrZS7I_53Efm2kKy3GzDoGdk5wnOJlKc]tracy@e...[/url
Sent: Tuesday, November 18, 2003 12:50 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
Oh, right, with the earlier Stamps, you are using SHIFTOUTs that will
drive the Stamp pin high. That might do odd things to the 3.3 volt
logic by forward biasing its protection diodes. A safer circuit
might use higher resistances and include a Schottky diode (SD103) to
shunt the current over to the 3.3 supply instead of through the
device. A 3.3 volt zener to ground could also serve that purpose.
;--[noparse][[/noparse]22k]---o-3.3 volts
| |
|-->]
'
| SD103
Stamp <>--[noparse][[/noparse]1k]--o
<sda>
|
or zener -\<-here to Vss
Or, put the Schottky diode in series with the signal to the Stamp...
;--[noparse][[/noparse]10k]--3.3 volts
|
|
Stamp <>--o---[noparse][[/noparse]<--o
<sda>
| SD103
|
`--[noparse][[/noparse]51k]---Vss
When the Stamp side goes low, the I2C device sees an insignificant
0.2 volt offset due to the diode. When the I2C device goes low, the
Stamp pin is pulled low by the 51k resistor. When the both sides are
high impedance, the stamp input is pulled up to at a comfortable 2.6
volts, twice the 1.3 volt switching threshold, to register as high.
No danger of current through the protection diodes on the device.
-- Tracy
http://www.emesystems.com
>Tracy is, of course, correct (like I said, I hadn't actually tried this
>myself) and are the best solution for the BS2p and BS2pe. Myy I2C
>routines for the BS2/BS2e/BS2sx use SHIFTOUT which will drive the SCL
>and SDA lines to 5 volts, but the may be a non-issue with the 220-ohm
>series resistor.
>
>-- Jon Williams
>-- Applications Engineer, Parallax
>-- Dallas Office
>
>
>
>
Original Message
>From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FDTRFy5bP_P8OTNVUy7fiM2EeC_yUT_mgUeuAasMqnBcAV44lrZS7I_53Efm2kKy3GzDoGdk5wnOJlKc]tracy@e...[/url
>Sent: Tuesday, November 18, 2003 11:32 AM
>To: basicstamps@yahoogroups.com
>Subject: RE: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>
>
>Hi Jon & Jeff,
>
>When sda trys to ACK or to send back data in that circuit...
>
> ;--[noparse][[/noparse]pullup]---Vdd=5 volts
> |
>> Stamp <>-o---[noparse][[/noparse]4.7k]
*
<sda>
>> |
>> |
>> [noparse][[/noparse]10k]
>> |
>> |
>> Vss
>
>...it can only pull the Stamp pin down to 2.5 volts. No good. That
>is above the switching threshold of 1.3 volts. If the pullup is 22k
>instead of 4.7k, then the Stamp input would be pulled down to 0.9 volts
>when sda goes low, and that would be low enough, but not great. There
>is no such problem on the scl line, because it never has to talk back
>to the Stamp.
>
>A simpler solution might be the following.
>
> ;--[noparse][[/noparse]4.7k]---3.3 volts
> |
> Stamp <>-o---[noparse][[/noparse]220]
*
<sda>
>
>The pullup=4.7kohm goes to the 3.3 volt supply instead of the 5 volt
>supply. The Stamp pin in the I2C commands toggles between low output
>and input, never a high output. That is true of both sda and scl. The
>0 to 3.3 volt levels would be fine for good noise immunity around the
>Stamp's 1.3 volt threshold. The 220 ohm resistor is there just to
>protect against a bad program that by mistake makes the Stamp pin a
>high output, and having the 220 ohms there makes the sda transitions
>from 0.15 volts to 3.3 volts, which is still okay.
>
> -- Tracy
> http://www.emesystems.com
>
>
>
>
>>Yes, add the pull-ups on the Stamp-side of the 4.7k. Like I said, I
>>haven't tried this myself, but my guts tell me it will work.
>>
>>-- Jon Williams
>>-- Applications Engineer, Parallax
>>-- Dallas Office
>>
>>
>>
Original Message
>>From: vm813 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=hHRlsGjaGpT5LfVv27WE12Me0kDWLZ1XDoqBsi1_wLlKOhG1QMFPmONXqoG78tsSys8BhNurorfU]jeffsak@y...[/url
>>Sent: Tuesday, November 18, 2003 5:36 AM
>>To: basicstamps@yahoogroups.com
>>Subject: [noparse][[/noparse]basicstamps] Re: BS2 to 3.3v part I2C interface
>>
>>
>>Jon,
>>thank you very much. I'll give it a try. If I understand it right, the
>>4.7K in-line resistor and 10K pulldown are in addition to the 4.7K
>>pullups normally required for the I2C SCL and SDA lines. Is that
> >correct?
>>Jeff-
>>--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
>>wrote:
>>> It's not trouble to bit-bang I2C with the BS2 -- it gets done all
>>the
>>> time. GOTO the Parallax web site, select the Nuts & Volts section
>>and
>>> look for an article called "I2C Fun For Everyone." It contains a
>>group
>>> of low- and high-level I2C routines for non-BS2p Stamps.
>>>
>>> I haven't tried this myself, but you may be able to use a simple
>>> resistor interface when going between a 5-volt and 3.3-volt systems.
>>>
>>
>> > Stamp <>
[noparse][[/noparse]4.7k]
*
<>
>>> |
>>> |
>>> [noparse][[/noparse]10k]
>>> |
> >> |
>>> Vss
>> >
>>> -- Jon Williams
>>> -- Applications Engineer, Parallax
>>> -- Dallas Office
>>>
>>>
>>>
Original Message
>>> From: vm813 [noparse][[/noparse]mailto:jeffsak@y...]
>>> Sent: Sunday, November 16, 2003 10:16 PM
>>> To: basicstamps@yahoogroups.com
>>> Subject: [noparse][[/noparse]basicstamps] BS2 to 3.3v part I2C interface
>>>
>>>
>>> I just got a BS2 board and like to interface it to 3.3 part I2C.
>>It
>>> seems that I have to do bit banging on 2 port pins for BS2.
>>>
>>> I see that BS2 is a 5v system. Has anyone interfaced a 3.3v I2C bus
>>> directly to BS2 board (3.3v part I have doesn't have 5v tolerant
>>> inputs).
>>>
>>> I can do the CMOS/TTL N-channel shifter but would like to avoid it
>>if
>>> there is a way to configure BS2 board directly. BTW, i have the BOE
>> > board.Tks,jeff-
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject
>and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>
>
>This message has been scanned by WebShield. Please report SPAM to
>abuse@p....
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....