1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

How to implement an I2C into 8051 using Assembly Language?

Discussion in '8051/8951' started by elaine84, Jul 13, 2005.

  1. mstechca

    mstechca New Member

    Joined:
    Mar 28, 2003
    Messages:
    1,595
    Likes:
    1
    Location:
    Why do you care?
    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.
     
  2. elaine84

    elaine84 New Member

    Joined:
    Jul 12, 2005
    Messages:
    14
    Likes:
    0
    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?
     

Share This Page