Rooftop
Full Member level 2

i2c_init() atmega8535
hi all, i have a little problem here with some code using C for AVR
#include<string.h>
char mychar[30];
strcpy(mychar,'LOOONG CHARACTER');
it said some error like character constant is too long. I'm using Codevision, please help me because when i am using Keill(for 8051) it works well although i need to change ' to " . Please help me, because this is my first project using AVR ATMEGA8535.
when i using
#include<string.h>
char mychar[30];
strcpy(mychar,'LO');
it works.Please tell me how to do it for more than two characters
Really thanks
Best regards
hi all, i have a little problem here with some code using C for AVR
#include<string.h>
char mychar[30];
strcpy(mychar,'LOOONG CHARACTER');
it said some error like character constant is too long. I'm using Codevision, please help me because when i am using Keill(for 8051) it works well although i need to change ' to " . Please help me, because this is my first project using AVR ATMEGA8535.
when i using
#include<string.h>
char mychar[30];
strcpy(mychar,'LO');
it works.Please tell me how to do it for more than two characters
Really thanks
Best regards