Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C code for i2c mcu to pc

Status
Not open for further replies.

ravindralr

Newbie level 4
Joined
Jul 20, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
bangalore
Activity points
1,344
Hi,

I want to write a C code to send the data onto the hyperterminal from mcu to pc through i2c.
The harware involves the mcu,i2c to rs232 adapter and a pc.
Pl if anybody can suggest me how to procced then it will hlp me alot.

thank u
ravi
 

why don't you just use the uart of the microcontroller?
 

Hi Ryan,

Actually i hv a problm in debugging the i2c.
the i2c pins and jtag pins are multiplexed in my dev kit.
so i should use any of the one at a time.
Thus i want to test it on the pc.
I should finally write a code for i2c mcu and an eeprom after doing this test.
Hope u got my point.
 

hi again! what mcu are you using?

in "the i2c pins and jtag pins are multiplexed" do you mean the i2c and jtag are in same pin? Isn't there a way to select just one of them to function? (in Zds, some pins perform multiple function and you select what you want by setting the alternate function) I'm not sure if yours work that way.

anyway, if you want to connect to your computer, i think, you have to access the uart of the mcu. you can print the data to hyperterminal from the i2c using uart. the i2c code that you will need depends on the device that you are interfacing via i2c. hope that helps.
 

I think the settings are sill dependent on the I2C manufacturer. better read first on the IC's I2C configurations, sometimes needed to send 2 or more commands just to configure/read the devices.
 

HI;
if there are any other IO PORT left,you can use sortware replace hardware I2C.
sorry ,my english is poor.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top