This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AT89C51 program on AT89S51

Hello,
I have the problem that I have a program that works on the AT89C51, but not on the AT89S51.
A simple program (blink.c) works on both MC.
AT89C51 with #include <at89c51RC2.h>
AT89S51 with #include <at89x52.h>
Compiler = Keil C version 9.60.7.0
The program for AT89S51
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <at89x52.h>
#include <stdio.h>
#include <stdlib.h>
#include <absacc.h>
#include <float.h>
#include <string.h>
#define LCD_ADR XBYTE[0xF800] // Basisadresse : Daten in das Befehlsregister
// schreiben
#define LCD_ADR1 XBYTE[0xF801] // Basisadresse +1: Daten in das Datenregister
// schreiben
#define LCD_ADR2 XBYTE[0xF802] // Basisadresse +2: Inhalt des Befehlsregister
// lesen
#define LCD_ADR3 XBYTE[0xF803] // Basisadresse +3: Inhalt des Datenregister
// lesen
//#define LCD_ADR *((unsigned char volatile xdata*)0xF800)
//#define LCD_ADR1 *((unsigned char volatile xdata*)0xF801)
//#define LCD_ADR2 *((unsigned char volatile xdata*)0xF802)
//#define LCD_ADR3 *((unsigned char volatile xdata*)0xF803)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0