阅读:2409回复:8
I2C-Bus Protocol With C/C++ Language
Dear Sir:
I am now using the I2C-Bus protocol.Do you have any examples written by C/C++ language? Would you please give me some advice? Thanks in advance! |
|
沙发#
发布于:2001-06-11 10:05
You can get it from Philips' website. Or go to some MCU websites such as http://www.c51bbs.com and get a C51 I2C sample - you can translate it to any language you want.
|
|
|
板凳#
发布于:2001-06-11 12:06
Dear rayyang2000:
Thank you for your Help! I will logon the website to get the data! Thanks again! |
|
地板#
发布于:2001-06-11 18:12
用的着这么费事吗?
去找一个ATMEL93C56,之类的芯片,时序不都有了吗? |
|
地下室#
发布于:2001-06-11 20:48
[QUOTE]原本由 jeosph 发表
[B]用的着这么费事吗? 去找一个ATMEL93C56,之类的芯片,时序不都有了吗? [/B][/QUOTE] 93Cxx不是I2C接口的 |
|
|
5楼#
发布于:2001-06-13 08:56
Dear rayyang2000:
Would you please give me some advice? I only use the 25Pin-9Pin cable to do this. Thaks a lot! |
|
6楼#
发布于:2001-06-13 09:24
[QUOTE]原本由 Youngar 发表
[B]Dear rayyang2000: Would you please give me some advice? I only use the 25Pin-9Pin cable to do this. Thaks a lot! [/B][/QUOTE] Why do you use 25pin-9pin? Do you want to use I2C bus of DDC? If yes, it's very simple for hardware but a little complicated for software. DDC has I2C bus. So you can connect DDC's I2C bus to E2P's. But you have to do more work for reading/writing video card's registers to access I2C. |
|
|
7楼#
发布于:2001-06-13 09:43
Dear Rayyang2000:
Thanks for your kind.The situation is: Our Device has a 9Pin connector.We have a DOS program to read/Edit the 24C08 (EEPROM)through Parallel Port.(25Pin)But there is no source code.I want to write a Win32 application with VC++6.0. If using the Parallel Port,How can I use the DDC? Thanks in advance! |
|
8楼#
发布于:2001-06-13 15:00
[QUOTE]原本由 Youngar 发表
[B]Dear Rayyang2000: Thanks for your kind.The situation is: Our Device has a 9Pin connector.We have a DOS program to read/Edit the 24C08 (EEPROM)through Parallel Port.(25Pin)But there is no source code.I want to write a Win32 application with VC++6.0. If using the Parallel Port,How can I use the DDC? Thanks in advance! [/B][/QUOTE] DDC is used for video adaptor and display monitor. It's not implemented on LPT. I don't know details about the way to programming LPT. But on this BBS, some threads are on this topic. You can search for them. I think you can write/read data to/from the LPT. Just AND or OR some bits to simulate the I2C timing. Another thing you should consider is the difference between Win2K and Win98. If you do this on Win98, you are lucky. If not, ....... Someone has told me that on Win2K there are some difficulties with accessing LPT. I don't know if it's true. Hope this can help you. |
|
|