home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / intel / 1670 < prev    next >
Encoding:
Text File  |  1992-09-09  |  4.2 KB  |  105 lines

  1. Newsgroups: comp.sys.intel
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!ntuix!ntuvax.ntu.ac.sg!mz1647701
  3. From: mz1647701@ntuvax.ntu.ac.sg
  4. Subject: Query on Intel 8052AH
  5. Message-ID: <1992Sep10.171548.1@ntuvax.ntu.ac.sg>
  6. Lines: 93
  7. Sender: news@ntuix.ntu.ac.sg (USENET News System)
  8. Nntp-Posting-Host: v9000.ntu.ac.sg
  9. Organization: Nanyang Technological University - Singapore
  10. Date: Thu, 10 Sep 1992 09:15:48 GMT
  11.  
  12. Hello,
  13.  
  14. Does anybody know about Intel 8052AH microcontroller?
  15.  
  16. I'm writing a few subroutines to enhance the string manipulation feature 
  17. in the BASIC-52 interpreter of this chip, such as string comparsion,
  18. string concatenation, mid-string comparsion, etc.
  19.  
  20. However, I faced some problems in getting the BASIC-52 interpreter
  21. to recongnise these assembly language subroutines stored at address
  22. 2000H and above.
  23.  
  24. I hope someone will give me a helping hand by answering some of the 
  25. following questions. Thanks.
  26.  
  27. (1) What is the correct procedures for programming assembly language
  28.     in 8052AH using a External Static Nonvolatile RAM (or SRAM) ?
  29.  
  30.     The reason for using SRAM is to simplify the development process 
  31.     of the subroutines.
  32.  
  33.     Currently, a 32k SRAM (DALLAS, DS1235 ABW-150) is used to replace 
  34.     a EPROM and it is configured to store programs from 2000H to 9FFFH.
  35.     The Data memory and Program(code) memory are in the combined mode.
  36.     
  37.     I'd also discovered that the execution of the BASIC programs and 
  38.     Power-up(reset) will cause the contents in the SRAM to be cleared
  39.     even though External Data memory location 05FH is set to 05AH 
  40.     (Don't clear external RAM). The 05AH byte is also cleared.
  41.  
  42.     After much trial and error, I managed to keep the SRAM contents by
  43.     disabling the WRite signal (remove JP11) to the SRAM and XBY(05FH)=05AH. 
  44.     I've also stored a BASIC program at 8011H with a PROGx mode of PROG5 
  45.     (in ROM mode) using the self-loading program given in the BASIC-52 
  46.     manual.
  47.                                                                                                
  48.     Unfortunately, the BASIC interpreter don't seem to recongnise the 
  49.     programs stored in the SRAM. Please see question 2 for more details.
  50.     Please note that the MTOP value is automatically set to 1FFFH after 
  51.     each reset. Does this matter?
  52.  
  53.     Please comment and suggest on the above.
  54.  
  55. (2) How to set bit 25.5H in the Internal Data Memory to indicate that
  56.     BASIC token expansion table is present?
  57.  
  58.     Presently, this bit is supposed to be set with a short routine 
  59.     (at 2048H) in the user defined asm program as shown below. 
  60.     I,ve also tried setting it with DBY(25H)=0A0H but they all return 
  61.     with a reset and then BASIC go into the READY prompt.
  62.  
  63.         ORG     2002H           ;Tell BASIC-52 that extension keywords        
  64.         DB      5AH             ;is present
  65.         ;                                
  66.         ORG     2048H           ;Tell BASIC-52 that custom token table
  67.         SETB    45              ;is provided 
  68.         RET                     
  69.         ;                                
  70.         ORG     2070H           ;Setup DPTR to jump table
  71.         MOV     DPTR,#VECTOR_TABLE
  72.         RET
  73.         ;                                 
  74.         ORG     2078H           ;Setup DPTR to extensions table
  75.         MOV     DPTR,#TOKEN_TABLE
  76.         RET
  77.         ;
  78.         ORG     2400H
  79. VECTOR_TABLE:
  80.         DW      DO_STRCMP       ;Address of string comparison subroutine
  81.         ;
  82. TOKEN_TABLE:
  83.         DB      10H             ;1st user defined token no.
  84.         DB      'STRCMP'        ;Keyword for string comparison
  85.         DB      0FFH            ;End of table
  86.         ;
  87. DO_STRCMP:                      ;Start of subroutine for string comparison
  88.         ANL     PSW,#0E7H       ;Select register bank 0
  89.         ;
  90.         ...                     ;to be continued.
  91.  
  92.  
  93.     The bit 25.5H is not set at all even after the READY prompt.
  94.  
  95.                                            
  96.  
  97. Once again, I like to thank you for reading this article.
  98. If you have any relavant information or programs (BASIC-52 or asm) 
  99. related to this 8052AH chip, please feel free to mail to my network
  100. address mz1647701@ntuvax.ntu.ac.sg ,as soon as you can.
  101.  
  102. Your assistance is much appreciated.
  103.  
  104. Regards.
  105.