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

Status
Not open for further replies.

xela

New Member
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

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

P.S.:why my reply doesn't show...?
 
Last edited:
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!.
 
Nigel Goodwin said:
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!.

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
 
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
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…