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

[Help] Assembly program for 8052 (ADC serial in)

Discussion in 'Microcontrollers' started by xela, Mar 16, 2007.

  1. xela

    xela New Member

    Joined:
    Mar 15, 2007
    Messages:
    3
    Likes:
    0
    I am going to use 8052 to recieve data of three 8-bit serial digital outputs from ADC.
    That means I want to store the serial digital data into the registers in 8052. I want to ask the program of convertion.
    All I know is to enable clip select(CS),a CLK signal to control the ADCs.
    (However I have 3 series of data to read in. One by one)
    May I request for some practical examples for this assembly program?

    Thank you

    microcontroller : Atmel 8052
    Serial output ADC: ADC0831

    http://www.electro-tech-online.com/custompdfs/2007/03/26633.pdf

    P.S.:why my reply doesn't show...?
     
    Last edited: Mar 22, 2007
  2. johnsmith123

    johnsmith123 Member

    Joined:
    Sep 24, 2005
    Messages:
    141
    Likes:
    2
    what are the components you are using?
    Do you have any datasheets?
     
  3. xela

    xela New Member

    Joined:
    Mar 15, 2007
    Messages:
    3
    Likes:
    0
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK

    Presumably yet another homework/classwork question? - and we can guess what part of the world it's from as it's using long out of date components!.

    Actually it's not from the usual place, but not too far away!.
     
  6. xela

    xela New Member

    Joined:
    Mar 15, 2007
    Messages:
    3
    Likes:
    0
    Ya, you are right. A part of a project. The use of components are decided by me, coz i've learnt to program 8051/52 only.

    In fact I have a program which has not been tested yet. Also it may able for one input only.

    here it is
     
  7. mcs51mc

    mcs51mc New Member

    Joined:
    Feb 7, 2006
    Messages:
    343
    Likes:
    2
    Location:
    Belgium
    I have working code for 2 TLC549 from TI and 80C31 from Philips :)

    Let's proceed step by step:
    1) Hardware
    You wrote that you have 3 8031 ADC's but I can find only one Chip Select in your code (P1.0). How do you expect the others to work?
    First define ALL the hardware you need. Assign a ┬ÁC pin for each 8031 pins you think you need to use. Don't forget pull-up pull-down resistors.
    Once you post a suggestion I (and others:)) will check it for you.

    2) Read and understand the datasheet
    Especially the timing part so that you understand how the 8031 is working. Do you need adressing, setup (SE, differential) the 8031?

    3) Flow chart
    Make a flow chart of all the actions the code need to do. Reading ADC's, display data(?), ... ...

    4) Start coding



    As you probably noticed, I won't give you a solution, I will help you toward a solution:)
     

Share This Page