thannara123
Advanced Member level 5
hello ,experts
i read the datasheet of adc0804 .and wrote a program to convert the analog input (through adc0804)
program follwos
sbit rd = P3 ^ 3; // declare P3.3 as rw pin
sbit cs = P3 ^ 4; // declare p3.4 as cs pin
sbit wr = P3 ^ 5; // declare p3.5 as read/write pin
sbit intr = P3 ^ 6;
unsigned char gk;
void conv(); //Start of conversion function
void read(); //Read ADC function
void conv()
{
cs = 0; //Make CS low
wr = 0; //Make WR low
wr = 1; //Make WR high
//cs = 1; //Make CS high
while (intr); //Wait for INTR to go low
}
void read()
{
cs = 0; //Make CS low
rd = 0; //Make RD low
gk = P1; //Read ADC port
rd = 1; //Make RD high
// cs = 1;
//Make CS high
[FONT='Courier New', Courier, monospace]}[/FONT]
[FONT='Courier New', Courier, monospace]i need the pin intr,rd,cs,wr [/FONT]
[FONT='Courier New', Courier, monospace]But in development Board has some pins are shorted , something like see the picture
[/FONT]
why the pin INTR and WR are shorted,
CS and RD pin are shorted >and given to ground (if so how can i read the data without giving High to RD pin)
please help me thanks
i read the datasheet of adc0804 .and wrote a program to convert the analog input (through adc0804)
program follwos
sbit rd = P3 ^ 3; // declare P3.3 as rw pin
sbit cs = P3 ^ 4; // declare p3.4 as cs pin
sbit wr = P3 ^ 5; // declare p3.5 as read/write pin
sbit intr = P3 ^ 6;
unsigned char gk;
void conv(); //Start of conversion function
void read(); //Read ADC function
void conv()
{
cs = 0; //Make CS low
wr = 0; //Make WR low
wr = 1; //Make WR high
//cs = 1; //Make CS high
while (intr); //Wait for INTR to go low
}
void read()
{
cs = 0; //Make CS low
rd = 0; //Make RD low
gk = P1; //Read ADC port
rd = 1; //Make RD high
// cs = 1;
//Make CS high
[FONT='Courier New', Courier, monospace]}[/FONT]
[FONT='Courier New', Courier, monospace]i need the pin intr,rd,cs,wr [/FONT]
[FONT='Courier New', Courier, monospace]But in development Board has some pins are shorted , something like see the picture
[/FONT]
why the pin INTR and WR are shorted,
CS and RD pin are shorted >and given to ground (if so how can i read the data without giving High to RD pin)
please help me thanks