This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ADC 0808 interfacing to 8051

Hello there,

I am using a AT89C52 microcontroller and a ADC0808 Analog to digital converter. Could anyone tell me where i can find the code for interfacing the two.

Also the code to generate 38khz frequency on any 4 pins of the microcontroller.

Thanks in advance.

Parents
  • Hello everybody !

    thanks for the prompt responses.

    I am from India doing my Masters in Computer Applications..
    There are 6 semesters in this masters program and in the 6th sem I have to submit a project..

    Where everybody goes in for a commercial management system as their project ( Library Mgt System, Billing system etc.) I decided to venture into robotics.

    I came across an event called micromouse and i decided to do it. Having no background in electronics I still went ahead and did the project. I have completed all the electronics required including the PCB artwork and the hardware interfacing of the ADC0808. All the code to control my robot is also complete using Keil C.

    I am using stepper motors and they work just fine.

    There is some part of Artificial Intelligence that i have embedded onto this robot.( Shortest path algo)

    My simulation program works well and now i need to implement it on the machine.

    I am using the ADC to measure the distance usign IR sensors. To be specific to measure the reflected intensity of IR.

    Now the thing that I am not finding information about is to generate a Clock frequency for the ADC ( about 500khz) and frequency for IR modulation to reduce the effect of ambient light. I need to modulate it at 38 khz.

    I want to generate the freq using the port 3 of the microcontroller(AT89C52).

    Also the procedure to read the ADC for its digital output.

    Prior to posting my first message on this forum I have gone through Mr. Bruno's article on interfacing the ADC, but I could not make it work.

    Any help would be great..as I have only 4-5 days..

    Thanking you in advance..

    Regards,
    Rohit

Reply
  • Hello everybody !

    thanks for the prompt responses.

    I am from India doing my Masters in Computer Applications..
    There are 6 semesters in this masters program and in the 6th sem I have to submit a project..

    Where everybody goes in for a commercial management system as their project ( Library Mgt System, Billing system etc.) I decided to venture into robotics.

    I came across an event called micromouse and i decided to do it. Having no background in electronics I still went ahead and did the project. I have completed all the electronics required including the PCB artwork and the hardware interfacing of the ADC0808. All the code to control my robot is also complete using Keil C.

    I am using stepper motors and they work just fine.

    There is some part of Artificial Intelligence that i have embedded onto this robot.( Shortest path algo)

    My simulation program works well and now i need to implement it on the machine.

    I am using the ADC to measure the distance usign IR sensors. To be specific to measure the reflected intensity of IR.

    Now the thing that I am not finding information about is to generate a Clock frequency for the ADC ( about 500khz) and frequency for IR modulation to reduce the effect of ambient light. I need to modulate it at 38 khz.

    I want to generate the freq using the port 3 of the microcontroller(AT89C52).

    Also the procedure to read the ADC for its digital output.

    Prior to posting my first message on this forum I have gone through Mr. Bruno's article on interfacing the ADC, but I could not make it work.

    Any help would be great..as I have only 4-5 days..

    Thanking you in advance..

    Regards,
    Rohit

Children