BP4 Binary I2C Mode Configure Pullup Resistor Source

Hacking multi-tool. Get one for $30, including worldwide shipping.

BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby user141414 » Tue Nov 13, 2012 1:43 am

Good Evening,

I been working with the binary mode I2C C example written by James Stephenson and linked through the documentation on the site.

The circuit configuration is as follows:
24LC02 EEPROM configured with default address (0xA0) -- addresses all pulled low, WP pulled low -- running at 5V, on a breadboard, decoupling cap at the chip.
Using BP4 with firmware package 6.2 beta 1.

In normal mode I am able to turn on pull ups, configure pull ups, turn on power supply and read/write the EEPROM without any issues (awesome!!) in either hardware or software I2C mode.

In binary mode with the code from James, as well as when I manually send hex commands over the COM port, I am not receiving the expected data back. For example, the EEPROM contains DE AD BE EF FF FF FF FF FF FF FF FF.. FF FF FF and I receive 01 back for each location rather than the expected data.

I scoped the SDA and SCL in both modes and found that, in binary mode, even when I issue the command 0x4C to turn on pull-ups and the power supply, I am seeing the I2C lines sit at ground rather than pull up to the 5V power supply. In normal mode it looks fine and I can confirm that the I2C waveforms work out to exactly what I would expect.
Based on this, and based on the fact that I have to explicitly use option 'e' in normal mode, I suspect the BP4 with this firmware needs an additional command issued with binary implementation to configure the pullup resistors voltage source.

I searched for forum and did not see anyone running into this scenario so I am hoping that someone can confirm/deny this behaviour and possibly let me know if there is a command already implemented but not documented or if it should be working properly (maybe I am crazy?).

Thank you in advance!

-----------------
Dan
user141414
Newbie
Newbie
 
Posts: 3
Joined: Tue Nov 13, 2012 1:24 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby ian » Tue Nov 13, 2012 2:37 am

Hi Dan,

You are totally right, there is no command to enable the onboard pullups yet in the v4.

I will add it to the tracker, but it could be a few weeks before I can add it.
User avatar
ian
Crew
Crew
 
Posts: 10567
Joined: Mon Jul 06, 2009 6:14 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby user141414 » Tue Nov 13, 2012 12:38 pm

Hi Ian,

Thank you for the speedy reply!
Great! I would really appreciate the added functionality.

In the mean time, would you be able to confirm that the external source is the default setting and it would be reasonable to make a connection between Pin 9 (VEXTERN) and power supply on Pin 11 (SWV50) to manually enable the +5V pullup? I studied the schematic and it looks like it should be safe.. Q1 and Q2 will be off and diodes D1 and D2 should protect against current flow (not that there should be any if the transistors are off, of course).

Once you have a chance to add the functionality is there a place I can look for an update/beta to test?

Thanks again,
Dan
user141414
Newbie
Newbie
 
Posts: 3
Joined: Tue Nov 13, 2012 1:24 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby ian » Wed Dec 05, 2012 2:41 am

You should be fine doing it manually.

I'll post beta firmwares here in the forum, and usually announce it on the blog too.
User avatar
ian
Crew
Crew
 
Posts: 10567
Joined: Mon Jul 06, 2009 6:14 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby user141414 » Wed Dec 05, 2012 8:06 pm

Thank you for letting me know. I apologize for not following up - I did get the BP working in my application by providing an external pullup. Using the example code from James and expanded on it a bit, I have been able to read/write the EEPROM using Binary Mode without any problems.
I would like to post the update (if it is allowed) but it is a bit rough around the edges.. and only tested on small EEPROMs (24LC02 in this case).

- Dan
user141414
Newbie
Newbie
 
Posts: 3
Joined: Tue Nov 13, 2012 1:24 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby ian » Fri Dec 07, 2012 3:11 am

Hey Dan,

Glad you got it going. Please by all means post an update.
User avatar
ian
Crew
Crew
 
Posts: 10567
Joined: Mon Jul 06, 2009 6:14 am

Re: BP4 Binary I2C Mode Configure Pullup Resistor Source

Postby arakis » Fri Jan 11, 2013 9:18 am

user141414 wrote:Good Evening,

I been working with the binary mode I2C C example written by James Stephenson and linked through the documentation on the site.

The circuit configuration is as follows:
24LC02 EEPROM configured with default address (0xA0) -- addresses all pulled low, WP pulled low -- running at 5V, on a breadboard, decoupling cap at the chip.
Using BP4 with firmware package 6.2 beta 1.

In normal mode I am able to turn on pull ups, configure pull ups, turn on power supply and read/write the EEPROM without any issues (awesome!!) in either hardware or software I2C mode.

In binary mode with the code from James, as well as when I manually send hex commands over the COM port, I am not receiving the expected data back. For example, the EEPROM contains DE AD BE EF FF FF FF FF FF FF FF FF.. FF FF FF and I receive 01 back for each location rather than the expected data.

I scoped the SDA and SCL in both modes and found that, in binary mode, even when I issue the command 0x4C to turn on pull-ups and the power supply, I am seeing the I2C lines sit at ground rather than pull up to the 5V power supply. In normal mode it looks fine and I can confirm that the I2C waveforms work out to exactly what I would expect.
Based on this, and based on the fact that I have to explicitly use option 'e' in normal mode, I suspect the BP4 with this firmware needs an additional command issued with binary implementation to configure the pullup resistors voltage source.

I searched for forum and did not see anyone running into this scenario so I am hoping that someone can confirm/deny this behaviour and possibly let me know if there is a command already implemented but not documented or if it should be working properly (maybe I am crazy?).

Thank you in advance!

-----------------
Dan


Hi the issue has been resolved, you can now control the Pull up voltage from I2C in binary mode.. since rev2084
here's the wiki on how to to do it..

http://dangerousprototypes.com/docs/I2C ... v_y.3D3.3v

This is now also available in all other modes as well... the universal code for 3.3V is 0x51 for 5V 0x52, to turn them off 0x50.. it will not connect if there is a external voltage applied, or the communication protocol i not set to use HiZ... standard returns 0x01 if OK, and 0x00 if voltage is discovered on the pin or the pin mode is not HiZ
best regards FIlip.
arakis
Crew
Crew
 
Posts: 1044
Joined: Wed May 25, 2011 11:15 am
Location: Belgrade, Serbia


Return to Bus Pirate Support