We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I’m designing a micro system on an ADuC842 with I2C communications between ICs. I using Keil to design and debug my code but I’m having trouble interpreting the display from the I2C interface window. I wrote code for a slave device and used Keil I2C interface to communicate with it successfully but I can’t tell if my master code is working or not because the interface window confuses me. I would be very grateful if someone could help me out and explain how to verify that my master code is working, as in what does the window do when you successfully communicate with it? Thanks, Donagh
there are 1000's of examples of "special hardware interfaces" for the 1000s of '51 derivatives.
to expect Keil to simulate them all is unreasonable.
Keil produces and sell a compiler and provide a simulator as a service.
use JTAG debug or whatever in that line your chip has.
if you chip does not have JTAG or similar, switch to a SILabs chip (temporarily during development)
Erik
This was not a usfull reply
that Keil rarely (never?) simulate drivativge specific I/O
I2C is a standard IEEE communication protocol. Keil uVision 4 has an I2C simulation function. I was merely asking for advice on interpreting its response to my I2C master code (assembly).
Please don’t respond if you don’t have something useful to say
Is it??
I have written code to simulate a couple of I2C devices in the Keil debugger. It isn't too hard if you do know the device - if you don't, then you will not be able to write the microcontroller code anyway.
Hi Erik, This link is for you.
http://www.keil.com/support/man/docs/uv4/uv4_sm_i2c_simulation.htm
My question is; When you send data from a master I2C to this interface with your code should the data that you have sent appear in the communications window or do you have to interpret that it was sent from the interface window?
I know of, at least, two different implementations of hardware I²C and since the link you provide does not ask which implementation, there is no way in hades it can work for all derivatives
Yep that is a link to I2C simulation from Keil Tools by ARM. What do you mean too implementations? Master and slave? You really like the word derive don’t you.
Anyway... The reason I posted on the Kiel Tools by ARM forum was to ask someone about this I2C simulator and mainly the communications window. I want to know when my code is set up as a master should I expect to see my messages appearing in this window or will it remain blank as I transmit to the simulator. It has remained blank for all master code comms but for the slave code comms the communication window fills with messages, generated by the simulator, with relevant ACK symbol (.). {Symbol for NACK = !}
Fyi: comms=communications
From closer examination it does seem to be working and my code is receiving the ACK responses from the simulator that allow it to progress.
One more question has come up from this test that I really need your help with; Is it possible for my code to be getting the ACK signal through some 2nd order reaction from the simulator.
lol only joking! Why would I ask you retards anything else
What do you mean too implementations? Master and slave?
if you read my post you would see "different implementations of hardware I²C" so, of course, I am not talking about master and slave.
if the Keil simulator can simulate a F1xx It definitely can not simulate a f3xx.
I have no idea if the AD implementation follow the "668" implementation, which I'd guess is what Keil support.
even the chips that follow the "668" implementation have subtle differences.
You really like the word derive don’t you. from what do you derive that? :)
I do not use 'derive' a lot but I do, since it makes a whole lot of difference, often ask "wahat derivative"
I wishing you a merry Christmas