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