Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing External ADC to PIC

Status
Not open for further replies.

varuntejavarma

Newbie level 5
Joined
May 31, 2014
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
96
Hello,
I have to interface an external high resolution adc to PIC 18f4550 for a load cell measurement. I am a beginner in programming. I have read the datasheet and have tried to write a little program to interface ADC to pic. I know that i am not correct and missing some things in my program. I am learning by doing.So, i would be glad to know my mistakes and any suggestions. I have attached my program and link to my ADC datasheet. Please go through it and tell me what to do and how to proceed further. Any kind of help is appreciated.

**broken link removed**

So, my basic idea was to ( in writing to ADC part)
1.write a command and data byte to adc for sys config settings
2. write command and two bytes to adc for adc conf settings

I also read data during this process but send it to dummy as i dont need it

(in reading part):
1.write a command saying that i want to read data from data reg
2.send dummy data and recieve 3 bytes of data from ADC 8 bits at a time

As i said i am a newbie so, pls go easy on me

cheers,
vtv
View attachment main.pdf
 

have you had a look at Microchip's code samples?
**broken link removed**

there are several examples of I2C for PIC18
 

Hi!
First,I think you should go to learn some basic programming techniques.This will help you to know the basic grammar of C language.
Second,you should read the ADC part datasheet deeply,know how it works,and parse the timing exactly.
Final,you can write the code to adapt the timing, to generate the corresponding timing to operate hardware IC.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top