E46 BMW Social Directory E46 FAQ 3-Series Discussion Forums BMW Photo Gallery BMW 3-Series Technical Information E46 Fanatics - The Ultimate BMW Resource BMW Vendors General E46 Forum The Tire Rack's Tire Wheel Forum Forced Induction Forum The Off-Topic The E46 BMW Showroom For Sale, For Trade or Wanting to Buy

Welcome to the E46Fanatics forums. E46Fanatics is the premiere website for BMW 3 series owners around the world with interactive forums, a geographical enthusiast directory, photo galleries, and technical information for BMW enthusiasts.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   E46Fanatics > Tuning & Tech > Driveline, Engine & DME Tuning

Driveline, Engine & DME Tuning
Talk about driveline improvements, NA tuning and DME tuning your E46 BMW here. This includes diffs, intakes, exhausts, chips, software and OBD tuning.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 12-09-2014, 07:57 PM   #1
Thaniel
Registered User
 
Join Date: Sep 2010
Location: Dublin, va
Posts: 94
My Ride: 99 323i, 93 357i
Sucess!! reading/Writing Full DME EEPROM without removal

Hello All. As the title says. Tonight we have sucessfully read, erased and rewrote (with a different .bin) the Full DME EEPROM without removing the EEPROM from the DME board (MS42, AM29F400 EEprom). We DID remove the DME from the car. And we did open the metal ECU box to connect a "chip clip to it". As you'll see here in a min. Oh and one more thing. A Full read takes about 32 seconds. Yah we timed it. Here's the story of our experience.

Details:

This is a project my son and I have been working on. Been picking at this project on and off for some months. Whenever we get inspired to look at it or happen to have the right products on hand. It started with us buying a few used DME's from E-bay and then trying to see if we could program them. Then we bought a chip programmer, a eeprom socket and a blank eeprom chip to see what we could do with it. Sadly we didn't order the adapter to adapt the eeprom socket to the programer. It's only wires so we decided we could just wire up our own adapter. My son, my programming buddy, wired it up but mistakenly put the chip in backwards. And the chip programmer applies 12V to remove the sector protection from the EEProm to allow writing to it. well the 12V fried our blank chip. no biggie it's like $3 but took another 4 weeks to get one.

Irritated and now wary of the 12V weilding programmer my son decided to make his own programmer from an Arduino Mega we had. I still bug him about why didn't he do that from the start instead of having me buy the programmer. With his programmer he states he'll only start with 5V to ensure he doen't fry the chip again.

Here's a pcture of his setup. Yah LOTS of wires.


The new blank chip arrives and he validates that his hardware and program can write to and read from the blank chip. I'm none too fond of working with such a fragile setup so I spend nearly an entire day of my thanksgiving vacation to solder up this from an ardunio mega, a SD card reader, Mega Prototype board and the original chip socket.

This worked well and we could read and write to the chip all day long. Our plan was to work on how to remove the sector protection from the CHIP. That would require the dreaded dangerous 12V. Thought best we should try reading the DME chip before adding in the 12V to the mix.

To read from the EEprom in the DME we ordered a "chip clip" or "test clip" Pomona 6109 to be exact. We designed our reader so the Chip socket adapter could be removed and a cable to the chip clip attached. I made our cable out of 2 old hard drive cables and a bit of prototype board from another project. Then we get this.



Close up of Chip clip


Getting interesting.... At least we were. BUT first thing we found was upon plugging in our ribon cable the power would drop out. Humm. We though perhaps other items on the DME were sucking power away. And we were only powering with a USB cable. Perhaps powering up the DME would help. So we did. It did not help. In fact plugging the programmer into the ribon cable would draw down the DME power and the programmer power. After some trouble shooting and measuring we found that the "byte" pin on the EEprom was tied to the 5V inside the DME. To read a AM29F400 EEprom it can be read in Byte mode or word mode. Byte mode requires fewer wires to be attached to the EEPROM. and the mode we chose. But that required the byte pin to be grounded. And the DME, for good sense, obviously is always in word mode. BMW apparently just wired that pin permantly to 5V. Grounding it shorted the power supply and obviously won't work. We removed our byte pin wire from ground and voila. No more shorting out the power. The other thing we noted was the CE pin was grounded. But this caused no problem.

Removing the byte pin from ground leaves the EEProm in WORD mode. Which requires more wires to be attached. And irritatingly the wires for the address pins had to be shifted over one space. Another evening of soldering and we were good for another try. This time...... Success. We were able to read the chip. Now on to writing it. The EEPROM used can have sector protection added into it. To keep specific sections from being written on. Our blank one didn't have this because. Well it was blank. But many people have shown that they can only do a "partial write" to the EEPROM through the kbus. We reasoned this was due to the sector protection. But in looking up the CPU pins to find if they would tolerate 12V for us to remove the sector protection we found. NO. They wouldn't. 12V not allowed on the pins we would have to put 12V on to over ride sector protection. Humm.... We have to believe that BMW would make a way to do a full write to the EEPROM without having to remove the EEPROM from the board. Program updates happen and removing the EEPROM is difficult and risky (for reliablity). And why I wasn't interested in doing it. Since the DME couldn't sustain the 12V we began to wonder if there really was any sector protection on the chip. Using commands from the EEPROM's spec sheet we "asked" the EEPROM what sectors were protected. It replyed with None. This was last night. Ah....we are getting somewhere.

Tonight after dinner we hooke it up again. Read the EEPROM one more time. Then ask the EEPROM to erase itself. It says sure. We read it again and get and entire bin of FF's. Whoo hoo. None of the sectors were protected. No need for 12V on any pins. We proceed to write a BIN from a different car to the chip and re read it. 100% match. Success.

Seems to me this would be easier than removing the EEPROM and might open up more "full bin" flashes to more DIY'ers. Thoughts?
Attached Thumbnails
Click image for larger version

Name:	4-Chip Clip Closeup.jpg
Views:	131
Size:	78.5 KB
ID:	583230   Click image for larger version

Name:	3-Programing EEPROM on DME.jpg
Views:	127
Size:	89.7 KB
ID:	583231   Click image for larger version

Name:	2-Test setup (bare chip).jpg
Views:	127
Size:	85.3 KB
ID:	583232   Click image for larger version

Name:	1-Test setup.jpg
Views:	129
Size:	87.2 KB
ID:	583233  

__________________
My LS1 V8 into E36 and then E46 Blog
www.LS1BMW.blogspot.com

Last edited by Thaniel; 12-09-2014 at 08:00 PM.
Thaniel is offline   Reply With Quote
Ads by Google

Guests, get your FREE E46Fanatics.com membership to remove this ad.
Old 12-10-2014, 01:12 AM   #2
daniel_f.
Registered User
 
Join Date: Jul 2011
Location: Germany
Posts: 833
My Ride: 330iCA
Awesome Good i havenīt thrown my clip away
__________________
kind regards
Daniel

daniel_f. is offline   Reply With Quote
Old 12-10-2014, 11:06 AM   #3
TRITONAL
Registered User
 
Join Date: Jun 2014
Location: WI
Posts: 138
My Ride: 330Ci, 325i
I see an Arduino...is you or your son an EE?

BTW, definitely mark up some wiring schematics & parts lists, as I see a TON of wires and no documentation to what goes where. Best programs would be MultiSim (if you can find one) or a free PCB software. Would definitely help us out if any of us were to try it out!
__________________
Quote:
Originally Posted by wildirish317 View Post
The E46s are the Knights of the chessboard. They can outmaneuver the other, more powerful pieces on the board. They aren't the King or Queen of the garage, but they are the first piece that you want to move.
TRITONAL is offline   Reply With Quote
Old 12-10-2014, 01:53 PM   #4
Thaniel
Registered User
 
Join Date: Sep 2010
Location: Dublin, va
Posts: 94
My Ride: 99 323i, 93 357i
Quote:
Originally Posted by daniel_f. View Post
Awesome Good i havenīt thrown my clip away
Thought you might find it interesting. If your current chip reader could do WORD mode then it would just be a matter of wiring up the clip the correct way and ensuring that 12V is off (from the programmer)

Quote:
Originally Posted by TRITONAL View Post
I see an Arduino...is you or your son an EE?
My Son is 15 And a freshman in highschool. Myself, I'm a Mechanical engineer.

Quote:
Originally Posted by TRITONAL View Post
BTW, definitely mark up some wiring schematics & parts lists, as I see a TON of wires and no documentation to what goes where. Best programs would be MultiSim (if you can find one) or a free PCB software. Would definitely help us out if any of us were to try it out!
Yah I use Eagle for schematics. I made a schematic one to wire up to help me keep track of wiring up my device. But not sure it is really all that clear or useful for others. I'll take a lok at it tonight.

There are lots of wires because every bit that is sent/recieved at a time has it's own wire.

I'll figure out some what to show/describe it as it's not much to talk about if others can't get anything from it. Thinking about my circuit this morning I realized if someone were just to use it for attaching to the test clip I could make the physical design layout much simpler (though the circuit would be the same). Perhaps could even have a custom circuit board made for an arduino shield. Dunno.

Thaniel
__________________
My LS1 V8 into E36 and then E46 Blog
www.LS1BMW.blogspot.com
Thaniel is offline   Reply With Quote
Old 12-10-2014, 02:07 PM   #5
TRITONAL
Registered User
 
Join Date: Jun 2014
Location: WI
Posts: 138
My Ride: 330Ci, 325i
Quote:
Originally Posted by Thaniel View Post
Perhaps could even have a custom circuit board made for an arduino shield. Dunno.
Now you're thinking haha, that might be a little TOO much on your end, just post up how you made the ribbon cables/wiring schematic and how you did it Great work!
__________________
Quote:
Originally Posted by wildirish317 View Post
The E46s are the Knights of the chessboard. They can outmaneuver the other, more powerful pieces on the board. They aren't the King or Queen of the garage, but they are the first piece that you want to move.
TRITONAL is offline   Reply With Quote
Old 12-10-2014, 05:35 PM   #6
Thaniel
Registered User
 
Join Date: Sep 2010
Location: Dublin, va
Posts: 94
My Ride: 99 323i, 93 357i
Quote:
Originally Posted by TRITONAL View Post
Now you're thinking haha, that might be a little TOO much on your end, just post up how you made the ribbon cables/wiring schematic and how you did it Great work!
Attached is a slightly cleaned up version of the Schematic.

Below is another way to look at it. More from the programming perspective.

We are using port manipulation. Here is the connections to the chip by port. You could use different ports. But this is what we did. The data is arranged in columns.

Port used on the Arduino, Pin that port is on, EEprom Pin name, EEprom Pin number

Port L data pins
PL0 49 DQ0 15
PL1 48 DQ1 17
PL2 47 DQ2 19
PL3 46 DQ3 21
PL4 45 DQ4 24
PL5 44 DQ5 26
PL6 43 DQ6 28
PL7 42 DQ7 30

Port F data pins
PF0 A0 DQ08 16
PF1 A1 DQ09 18
PF2 A2 DQ10 20
PF3 A3 DQ11 22
PF4 A4 DQ12 25
PF5 A5 DQ13 27
PF6 A6 DQ14 29
PF7 A7 DQ15 31

Port A address pins
PA0 22 A0
PA1 23 A1
PA2 24 A2
PA3 25 A3
PA4 26 A4
PA5 27 A5
PA6 28 A6
PA7 29 A7

Port C more address pins
PC0 37 A8
PC1 36 A9
PC2 35 A10
PC3 34 A11
PC4 33 A12
PC5 32 A13
PC6 31 A14
PC7 30 A15

Port D more address pins
PD0 21 A16
PD1 20 A17
PD2 19
Attached Files
File Type: pdf Arduino Mega Programmer v3b.pdf (15.1 KB, 20 views)
__________________
My LS1 V8 into E36 and then E46 Blog
www.LS1BMW.blogspot.com
Thaniel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Censor is OFF





All times are GMT -5. The time now is 05:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
(c) 1999 - 2011 performanceIX Inc - privacy policy - terms of use