Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/20/08 12:14
Read: times


 
#160147 - Problem in migrating from AT89S8252 to AT89S8253 - Pls help!
Responding to: ???'s previous message
Thank you all for the replies.

Actually I have that in formation from primers of AT89S8252 & AT89S8253:

+ AT89S8252:
"The 8K bytes of internal Flash memory are accessed at addresses 0000H-1FFFH. Program
memory accesses at addresses 2000H - FFFFH always access external memory.

+ AT89S8253:
"The 12K bytes of internal Flash memory are accessed at addresses 0000H - 2FFFH. Program
memory accesses at addresses 3000H - FFFFH always access external memory."

And here is a part of the original code:

;---------------------------------------------
; EEPROM DATA - AT89S8252
;---------------------------------------------
; ORDER TABLE
; To read rom we must locate
; it after 127 (7F hex)
; ram addresses
cseg at 2000H
;
; Location of charactor data.
; Position data or order
; Enter the order that the floors shall be in.
;To define a message DB Mess?," " include a space so each input is made up of 2 bytes.
;
ORDER: DB " "
DB "B " ;Flr1
DB "G " ;Flr2
.....
DB " " ;Flr62 =
DB " " ;Flr63 =


MX: DB Mess1 ;Message 1 "Out Of Service"
;XLX: DB CHX-1000H,CHX-1000H ; = -X-

cseg at 2082h
DB 06h ;2082h Scroll speed
DB 20h ;2083h
DB 01h ;2084h Scrolling off/on
DB 20h ;2085h
DB 080h ;2086h Flr Input brightness
DB 20h ;2087h
DB 01h ;2088h Arrow Type
DB 20h ;2089h
DB 05h ;208ah Message Speed
DB 01h ;208bh Input type clock/direct
DB 10d ;208ch OS Time in seconds

ORG 20A0h
DW Message1-2000h
DW Message2-2000h
.....
DW Message62-2000h
DW Message63-2000h

cseg at 2140h
;Start of message file determines
; 1. "01" = Hard on.
; 2. "02" = Scroll right to left.
; 3. "03" = Scroll left to right.
; 4. "04" = Hard on and flash.
........


And here is what I have to change to get the board work with AT89S8253 given the fact that I also change other part of the software to match to that....
;---------------------------------------------
; EEPROM DATA - AT89S8253
;---------------------------------------------
cseg at 3000H

ORDER: DB " "
DB "B " ;Flr1
DB "G " ;Flr2
.....
DB " " ;Flr62 =
DB " " ;Flr63 =


MX: DB Mess1 ;Message 1 "Out Of Service"
;XLX: DB CHX-1000H,CHX-1000H ; = -X-

cseg at 3082h
DB 06h ;3082h Scroll speed
DB 20h ;3083h
DB 01h ;3084h Scrolling off/on
DB 20h ;3085h
DB 080h ;3086h Flr Input brightness
DB 20h ;3087h
DB 01h ;3088h Arrow Type
DB 20h ;3089h
DB 05h ;308ah Message Speed
DB 01h ;308bh Input type clock/direct
DB 10d ;308ch OS Time in seconds

ORG 30A0h
DW Message1-3000h
DW Message2-3000h
.....
DW Message62-3000h
DW Message63-3000h

cseg at 3140h
;Start of message file determines
; 1. "01" = Hard on.
; 2. "02" = Scroll right to left.
; 3. "03" = Scroll left to right.
; 4. "04" = Hard on and flash.
........

The board work well after I burnt the software to AT89S8253 chip, but could not work when I use PC program to re-load new data to those "default" values.

It would not be practical if I modify the PC program (to load the new value to those memory address) because user has to identify which chip on board... Therefore I thought that in RxTx serial file when the board receive data from PC, I just to point the address of PDTR to the new address and write the value there:

E.g. DB 06h ;2082h Scroll speed

if load new value to 2082h (currently 06h) I just point to 3082h. I thought that in that case DPH will hold 20h and DPL will hold 82h. And thus just increase DPH to 30h and reload??? like:

mov DPH,RxTxStepHx ;load EEPROM address
mov DPL,RxTxStepLx

mov A,DPH
add A,#010h ;increase MSB
mov DPH,A ;reload

mov A,RxTxData ; write to EEPROM

But it still does not work. Please help!

List of 14 messages in thread
TopicAuthorDate
AT89S8253: EEPROM programming via serial COM            01/01/70 00:00      
   simple example            01/01/70 00:00      
   Problem            01/01/70 00:00      
   No need to "increment"...            01/01/70 00:00      
      Problem in migrating from AT89S8252 to AT89S8253 - Pls help!            01/01/70 00:00      
         Confusion            01/01/70 00:00      
            It's Dataflash not EEPROM address, but...            01/01/70 00:00      
               I assume that you have external RAM            01/01/70 00:00      
                  Problem in migrating from AT89S8252 to AT89S8253 - Pls help!            01/01/70 00:00      
                     Probable answer            01/01/70 00:00      
                         Probable answer for serial re-program EEPROM            01/01/70 00:00      
                           AT89S8252, change in serial programing            01/01/70 00:00      
    Problem in migrating from AT89S8252 to AT89S8253 - Pls hel            01/01/70 00:00      
      Please explain your hardware            01/01/70 00:00      

Back to Subject List