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 char E_Read(int addr, unsigned char *ch, char len)
{
unsigned char byte;
ErrFlags = 0; // Clear error
I2C_Start();
I2C_Write(CHIP_Write);
if(!I2C_nack()) return 1; //
I2C_Write((unsigned char) (addr >> 8 & 0xff)); // << here is high byte of address
if(!I2C_nack()) return 1;
I2C_Write((unsigned char) addr & 0xff); // << here is low byte of address
if(!I2C_nack()) return 1;
I2C_Start();
I2C_Write(CHIP_Read); //
if(!I2C_nack()) return 1;
if(len == 1) // Read a single char.
{
*ch = I2C_Read();
}
else if(len > 1) // Read a sequential data steam
{
while(len-- > 1)
{
*ch++ = I2C_Read(); // read character
I2C_ack(); // Send ack
}
*ch = I2C_Read();
}
else // Read s NULL string
{
do{
*ch = I2C_Read();
I2C_ack();
}while(*ch++ != 0);
*ch = I2C_Read();
}
I2C_Sendnack(); // send nack
I2C_Stop(); // send stop
return 0;
}
for( i = 0 ; i < 10 ; i++ )
{
lcd_command( 0x01 );
lcd_start();
lcd_command( 0x80 );
lcd_show( "ROLL NUMBER " );
lcd_command( 0x8C );
lcd_data( i + 0x30 ); // you have to add in the ASCII... numbers start at 0x30.
keypad(); //call the keypad
}
ok. waiting. till then i will try to work on protues and tell you my experience with it.![]()
There are quite a few of us that use ISIS But the full version WITH several micro modules is very expensive I pay about £500 a year in renewals.ohh.. then you can only show how my program works..
Pasting your program may be difficult as we probably use different compilers... As I have said, I use SDCC... You are probably using keil or something?so i should paste whole program ?? or should i post my program for reading from eeprom ?? because that is my final step...