Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

BASCOM-8051 and 89c420

Status
Not open for further replies.

pkedvessy

Member level 5
Joined
Feb 17, 2005
Messages
81
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
2,077
89c420.dat

I tried to write a simple program, which is use the serial port, and send something to the computer, but it doesn't work! I got some error message after the compile! The code should be good, because if I choose an another chip in the Options/Compiler/Misc, the code can be compiled!

Anyone has some idea?
 

silvio

Advanced Member level 3
Joined
Dec 31, 2001
Messages
716
Helped
105
Reputation
210
Reaction score
16
Trophy points
1,298
Location
Romania
Activity points
11,497
bascom 8051

Hi pkedvessy,

As you probably know the DS89C420 has two serial ports.
All the SFR involved in serial communication has either 0 or 1 suffix:
SCON0
SCON1

SBUF0
SBUF1

It's true that at SFR addr 98h we'll find SCON0 for DS89C420 and SCON for 8051.
But BASCOM didn't find any declarations inside included 89c420.dat file regarding SCON or SBUF.
That's why you have errors when compiling for 89C420 and none for 8051.

Thus if you write JNB SCON0.1 or better JNB RI_0 you can pass over error 119.
Same is true for MOV SBUF0 and MOV SCON0 or use suffix 1 for serial port 1, MOV SBUF1......
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top