mstechca
New Member
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.
elaine84 said:I am currently on my Final Year Project named the Ultra Sonic Range Finder(SRF08). The project required me to capture the height of a human being into the 8051 MicroController and display the height out on a 16X4 LCD screen. Problem is that I was not given an I2C-bus controller and therefore was asked to implement I2C on the 8051 in order to interface with the SRF08.
As my knowledge of Assembly Language is very poor, I need help of getting a program that can implement an I2C into the MicroController. Anyone could help me with this, I will be very grateful.
Thanx alot! Please help me....
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.