Hi Everybody, I'm experimenting with Infineon's XC161CJ-controller on an Infineon SK-XC16x starter kit. Most of my routines work now, except the I2C-routines. Sending of data works OK, but the errors occur when I want to receive data. Has anybody on this forum written I2C-routines for this controller? And if so, are you willing to share them? Thanks in advance. :) Kind Regards, Dennis Ebben
Hi Rolf, may be that is this experience I meaned with the extra dummy access we had taken as I mentioned. I will ask my end costumer, if it is possible to that you may contact him by e-mail or that I can transfer the I²C routines. He is a very good minded and helpfull men, but because some reasons I want not to give his contact address directly. But I think it would be very usefully that you can change some experinece - may be your information is new for him. I would only ask to be so kind to hold me in copy if I can make the contact, because the support is my job. So all information I can get , are usefull to me. Stefan
If you want direct contact with me, you can email me at: mybuddy(at)sverige.nu. (I check this email address only occasionally). /Rolf
Hi Rolf, I have mailed you a low level driver I got from Infineon directly. This was helpfull to my end costumer and may it helps you too. Please have look at your e-mail. Stefan
Hi Rolf and Stefan, Last week, I haven't been able to read this forum anymore, so I saw your threads today and think it's very interesting. Thanks for the information you've shared. I wrote code for Infineon's C161RI/PI two years ago and that code works OK. At that time, I also had problems with my read-routine at that time, because I didn't notice that a dummy read was necessary to re-activate the bus (after sending the slave address to the bus). A few weeks ago, I've found an Application Note (AP1631), called: "Migration from C161/C164 Microconrollers to the XC161/XC164" (version 1.0, April 2000) Paragraph 3.9 describes the IIC-bus. It describes the registers that have to be renamed and also other actions that have to be token, because of the things that are new in the XC161. I used this Application Note to write my XC161 I2C-routines and the send-routines worked immediately. But something goes wrong in the read-routines, as I mentioned before. The dummy read is in the read-routine, so that isn't the problem. Stefan, do you want to share the code you received from Infineon with me? That probably would be very helpfull to me, because I think it's a little thing that causes my not-working read-routine. You can reach me at: info@frankort.com If you would like to, I'm also wanting to share my routines. What DAvE concerns: I also used DAvE two years ago and the first thing I noticed, was that the I2C-routines weren't usefull. They were just macro's to set a register value and not more than that. That was the reason I decided to write my own routines with a little help from information I've found on Hitex' site (they have very interesting documentation about the C167V1-family of Infineon). Kind regards, Dennis Ebben
Hi Dennis, there is no problem to mail the driver to you. Second I 've forgotten to mentioned: since approximately march or april there was a new manual available for XC161 and one of the most experienced guides from Infineon told me the I²C should be more covered there. It is downloadable at infineons web page , if you have not done yet. Let me know whether this was helpfull to you. (At all the code was usefull) Stefan Please have a look at your mail in 10 - 20 minutes it comes as an zip-file.
Hi Stefan, I studied the code you sent me and found the solution. The order in which I toggled bits from several registers wasn't right. For Example: In the old C161 I set the INT-bit after the dummy-read. That seemed to work OK. But in this controller it has to be set before the dummy read. Same for some other bits/registers. So, your code was very helpfull to me!!! I solved the problem in the routines I had written. Thanks again! :) Kind regards, Dennis Ebben
Hi Dennis, it is very good for me to hear I was able to help you with this code. I had only one additional reserve in background in case of problems with reading back. My costumer was lucky too with this code as I told. It is a little bit pitty that Rolf did not answer. As you know I send him the code too. OK- but important is, that you had solved the problem, so I am quite happy. Stefan
Dear Dennis & Stefan, sorry about the response delay, but I had to focus on some other matters. I have given the code a short glimps, and I think it will be helpful for me when I continue working with the IIC-Code. I got the routine I was working with at the time up and running before I recived your email Stefan, but I am grateful for your assistance,maybe I'll come back to you later regarding this... Best regards, Rolf
Hi Stefan and everybody, sorry for not english language, i have problems with it :-( Hallo, Stefan, ich beschäftige mich momentan ebenfalls mit dem I2C-Modul beim XC161-Controller und habe die gleichen Probleme die in diesem Forum vor einem Monat diskutiert wurden. Es funktioniert zwar, aber mit komischen Effekten. Bisher habe ich weder Application Notes noch funktionsfähige C- bzw. Assembler-Routinen gefunden. Ich habe in Forum gelesen, dass Du einige hattest. Ich wäre Dir sehr dankbar sein, wenn Du mir diese an igoreq@web.de zukommen lassen könntest, weil ich nirgendwo im Internet Hilfe zu diesem Thema finden kann. Vielen Dank im voraus. PS Ich habe keine Deine E-Mail Adresse, deswegen deswegen muß ich diesen Berich im Forum veröffentlichen.
Hallo Igor, ich sende Dir den Low-Level-Treiber zu. Bis jetzt hat er geholfen. DAvE generiert die Routinen uebrigens falsch. Stefan Hi Igor, I send you the low level driver. Up to now it was allways helpfull. By the way DAvE generates wrong routines. Stefan
Dear Mr.Stefan, I have the same problem as here discussed.I use XC161 controller to communicate with EEPROM with IIC.The writing routine runs well and reading routine doesn't.May I share you read routine too?That is for me very helpful. Thank you very much! zhen pei
Dear Zhen Pei, this is the low level routine from Infineon, but no problem to send it to you. Please leave your e-mail address here. I will send it to you. Stefan
Hello Stefan, I am working with the I2C module of the XC161. Could it be possible to publish the low level routines somewhere on the WEB ? Thanks for your help David
Hi David, unfortunately not. But it is no problem to mail it, if you leave your e-mail here. Stefan
Hello Stefan, You can send the I2C routines to this address : davidbrev(at)yahoo.se Thank a lot for your help. David
Hi David, have it done! Check your account. Stefan