Group: Members+
Posts: 46
Member No.: 36,124
Joined: November 17, 2011
hi friends,
i am getting 3 analog signals at the inputs of ADC0808 and i am displaying it on LCD. they are voltage current and temperature signals. the problem is that when i vary one of the analog input it also effects the data from other inputs. that is if i vary voltage it resutls in the variation of voltage data, current data and temprature data on tha Screen of LCD. i tried my best to isolate it from each other by putting delays and clearing the arrays and data memory locations but the problem is as it is... please help me to rectify my problem...
following is my code:
CODE
#include <reg52.h>
#define select P3 #define Port P2 // control port #define adc_input P1 #define data_port P0 // data from microcontroller to LCD #define sec 50 #define scan 10
void lcd_cmd( unsigned int item ) { data_port=item; //command on data port p0 of lcd RS=0; // selecting command register of lcd // RW=0; E=1; delay(1); E=0;
}
void lcd_data( unsigned int item ) { data_port=item; //data on data port p0 of lcd RS=1; // selecting data register of lcd // RW=0; E=1; delay(1); E=0;
}
//----------- custom character Generation for Degree symbol-----------
Group: Moderators
Posts: 18,193
Member No.: 73
Joined: July 24, 2002
Circuit, layout?
--------------------
Answering questions is a tricky subject to practice. Not due to the difficulty of formulating or locating answers, but due to the human inability of asking the right questions; a skill that, were one to possess, would put them in the "answering" category.
Group: Spamminator Taskforce
Posts: 13,002
Member No.: 5,314
Joined: June 04, 2006
You can't upload images directly, but you can use a free image hosting service (such as photobucket.com) and either use the IMG tags (if the pic isn't too large) or just post a link to the image.
--------------------
Mac *
"Basic research is what I'm doing when I don't know what I'm doing." [Wernher Von Braun]
* is not responsible for errors, consequential damage, or... anything.
Group: Spamminator Taskforce
Posts: 977
Member No.: 3,131
Joined: August 29, 2005
Been there, done that. Connect one input to ground and switch the mux to that input before reading any of your other inputs. This will eliminate the crosscoupling between channels in most cases. The "proper" way to do it is to drive each input with an active low impedance source which will discharge the input capacitance of the ADC, most people however just connect passive sources to ADC inputs.
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)