How to implement an I2C into 8051 using Assembly Language?

Status
Not open for further replies.
Re: How to implement an I2C into 8051 using Assembly Languag


You don't need to know assembly if you know the 8051 instruction set, because the 8051 uC's like the atmel's AT89C2051 will only recognize the bytes as if they resembled part of 8051 instructions, one right after the other.

Atmel has some documentation on the 8051 instruction set (in PDF format) as well as several other websites.

As for the LCD, the first thing that should appear in your program are commands which initialize the LCD. Look for the HD47780 instruction set as well. Many character-based LCD's use the HD47780 chip for its operations. If you want to acquaint yourself with programming the LCD, then you should go for a circuit that shows an LCD connected directly to the parallel port. I think Beyondlogic.org has one, along with some code.

Once the LCD is initialized, you then take the output of the ultrasonic range finder and convert it into digital format if it is an analog output. Now you need to somehow convert it into numerical digits that will go on the LCD.

So another thing you need to find is the ASCII table.

Because we cannot think of and do the entire project for users, I can't help you much further until I see that you tried something out.
 
I am able to initialise the communication between microcontroller with the LCD Display. The problem is from the I2C receving part... I couldn't find out how to read data from the Ultrasonic Range Finder after I write in the slave address, command register and return ranging in cm. Is it after i send in the slave address for read, it will automatically return me ranging from the first echo high & low byte and so on?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…