We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm using quite old version of Keil, 3.20. With following simple code, I get unexpected results. I believe there is some kind of code problem:
xdata char msg1[]="abc"; xdata char msg2[]="def"; void main() { init_8255(); init_lcd(); lcd_open_backlight(); lcd_cursor_on(); // here, i suppose to write "abc" to the first row lcd_print(10, 0, msg1); // here, i suppose to write "def" to the second row lcd_print(10, 1, msg2); strcpy(msg1, "ghi"); strcpy(msg2, "ijk"); // here, i suppose to write "ghi" to the 3rd row lcd_print(10, 2, msg1); // here, i suppose to write "ijk" to the 4th row lcd_print(10, 3, msg2); while (1); }
"abc" "def" "ghi" "ijk"
[empty] "ijk" [empty] "ijk"
#pragma CODE DEBUG SYMBOLS LARGE ROM(LARGE) NOLISTINCLUDE
Maybe u should test if you get the one line of the LCD working and if you succeed then write a function so you are always calling the lcd_print function once. But your C code looks correct in theory what you have written should work
thanks for the suggession. The problem was the chip. When I use Atmel 89C55WD, I cannot use MOVC succesfully. You know this command is used during initialization. But everthing is OK when 8952 is used with the same board. Any clue?