This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

testapplication for bit-banged i2c

Hi.

I have built a bit-banged i2c on the 89c668 and want to test this in uVision2. The hardware i2c port is also in use and can be tested with the standard peripheriral. I would like to have something comparable like this for the bit-banged one. I use the port 0_3 for SCL, and the port 0_2 for SDA. Do you, or anyone, have some example code or running testapps?

thanks, ***.

  • Do you, or anyone, have some example code or running testapps?

    If you mean do we have a simulation script that simulates I2C using regulat I/O ports, the answer is no. This would be a GREAT simulation function for someone to write. If you get one going, please let us know.

    Jon

  • Jon,

    We discussed the possibilities of a tool for bit-banged serial communications here. Perhaps a window like the i2c peripheral could be possible where the user can select which I/O ports are needed and...the wanted protocol. Some software developers may need USB, SPI or other testtools. This can be a benefit for the future Keil uVision buyers....! We want to look into it, however this is not our core business as you will understand. So, can we build our own peripheral window? Or, any suggestions how to get on? Perhaps it is wise to collect the various ideas of software developers.

    ***.

  • So, can we build our own peripheral window?

    Yep. If you have an engineer who is familiar with VC++ and MS Visual Studio, it is pretty easy to do.

    The uVision2 Debugger has an API called AGSI which allows anyone to create DLLs that "plug-into" the simulation system. Since you use VC++ to create the DLL, you can do anything that you could do in a DLL. You could even create an I2C window that watches the signals on P1.0 and P1.1 for yoru simulated I2C.

    There is an application note which describes how to do this. There is also an example VC++ project you can download.

    http://www.keil.com/appnotes/docs/apnt_154.asp

    Jon

  • Since I do not have the time, or active knowledge, to build this application I have asked some people, who are currently without a project at our company, to look into it. I think there's a good chance it will be built. I will keep you updated.

    bi, ***.