fizo741
Member level 1
- Joined
- Aug 10, 2012
- Messages
- 34
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Tehran/Iran
- Activity points
- 1,539
Thanks alot:wink:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
unsigned int MemRead1(unsigned char SlaveAddress,unsigned char command1)
{
//some statements
...
...
if(TX_byte(SlaveAddress)){
do sth;
}
do sth
...
...
}
If TX_byte(SlaveAddress) returns some value like 0 or 1 and if the value is 1 i.e., true then the if condition is executed.if(TX_byte(SlaveAddress))
if (TX_byte(Slaveaddress)){
PORTD.0=~PORTD.0;
goto repeat;
}
unsigned char Tx_byte(unsigned char Tx_buffer)
{
unsigned char Bit_counter;
unsigned char Ack_bit;
unsigned char bit_out;
for(Bit_counter=8;Bit_counter>=1;Bit_counter--)
{
if(Tx_buffer&0x80==1)
bit_out=1;
else
bit_out=0;
send_bit(bit_out);
Tx_buffer<<=1;
}
Ack_bit=Receive_bit();
return Ack_bit;
}
Can you zip and post the .cof file and proteus file.