Article View: comp.sys.intel
Article #600Query on Intel 8052AH
From: mz1647701
Date: Thu, 10 Sep 1992 09:15
Date: Thu, 10 Sep 1992 09:15
93 lines
4391 bytes
4391 bytes
Hello,
Does anybody know about Intel 8052AH microcontroller?
I'm writing a few subroutines to enhance the string manipulation feature
in the BASIC-52 interpreter of this chip, such as string comparsion,
string concatenation, mid-string comparsion, etc.
However, I faced some problems in getting the BASIC-52 interpreter
to recongnise these assembly language subroutines stored at address
2000H and above.
I hope someone will give me a helping hand by answering some of the
following questions. Thanks.
(1) What is the correct procedures for programming assembly language
in 8052AH using a External Static Nonvolatile RAM (or SRAM) ?
The reason for using SRAM is to simplify the development process
of the subroutines.
Currently, a 32k SRAM (DALLAS, DS1235 ABW-150) is used to replace
a EPROM and it is configured to store programs from 2000H to 9FFFH.
The Data memory and Program(code) memory are in the combined mode.
I'd also discovered that the execution of the BASIC programs and
Power-up(reset) will cause the contents in the SRAM to be cleared
even though External Data memory location 05FH is set to 05AH
(Don't clear external RAM). The 05AH byte is also cleared.
After much trial and error, I managed to keep the SRAM contents by
disabling the WRite signal (remove JP11) to the SRAM and XBY(05FH)=05AH.
I've also stored a BASIC program at 8011H with a PROGx mode of PROG5
(in ROM mode) using the self-loading program given in the BASIC-52
manual.
Unfortunately, the BASIC interpreter don't seem to recongnise the
programs stored in the SRAM. Please see question 2 for more details.
Please note that the MTOP value is automatically set to 1FFFH after
each reset. Does this matter?
Please comment and suggest on the above.
(2) How to set bit 25.5H in the Internal Data Memory to indicate that
BASIC token expansion table is present?
Presently, this bit is supposed to be set with a short routine
(at 2048H) in the user defined asm program as shown below.
I,ve also tried setting it with DBY(25H)=0A0H but they all return
with a reset and then BASIC go into the READY prompt.
ORG 2002H ;Tell BASIC-52 that extension keywords
DB 5AH ;is present
;
ORG 2048H ;Tell BASIC-52 that custom token table
SETB 45 ;is provided
RET
;
ORG 2070H ;Setup DPTR to jump table
MOV DPTR,#VECTOR_TABLE
RET
;
ORG 2078H ;Setup DPTR to extensions table
MOV DPTR,#TOKEN_TABLE
RET
;
ORG 2400H
VECTOR_TABLE:
DW DO_STRCMP ;Address of string comparison subroutine
;
TOKEN_TABLE:
DB 10H ;1st user defined token no.
DB 'STRCMP' ;Keyword for string comparison
DB 0FFH ;End of table
;
DO_STRCMP: ;Start of subroutine for string comparison
ANL PSW,#0E7H ;Select register bank 0
;
... ;to be continued.
The bit 25.5H is not set at all even after the READY prompt.
Once again, I like to thank you for reading this article.
If you have any relavant information or programs (BASIC-52 or asm)
related to this 8052AH chip, please feel free to mail to my network
address mz1647701@ntuvax.ntu.ac.sg ,as soon as you can.
Your assistance is much appreciated.
Regards.
Technical Details
Message-ID:
<1992Sep10.171548.1@ntuvax.ntu.ac.sg>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!ntuix!ntuvax.ntu.ac.sg!mz1647701Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.intel Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!ntuix!ntuvax.ntu.ac.sg!mz1647701 From: mz1647701@ntuvax.ntu.ac.sg Subject: Query on Intel 8052AH Message-ID: <1992Sep10.171548.1@ntuvax.ntu.ac.sg> Lines: 93 Sender: news@ntuix.ntu.ac.sg (USENET News System) Nntp-Posting-Host: v9000.ntu.ac.sg Organization: Nanyang Technological University - Singapore Date: Thu, 10 Sep 1992 09:15:48 GMT