| ??? 10/17/99 19:53 Read: times |
#860 - RE: 8031 microcontroller |
I would like information on how to read a program from one 803l microcontroller and transfer the same program to another 8031.
************************ Although 8031 officially does not contain any code, I managed to read all 4K of it from both specimens I have. It seems that 8031 was meant to be 8051 but some bugs in software were discovered to late. How to read it? Connect EA to P1.0 inverted. During reset, P1.0 is high, EA is thus low so external program is executed: org 0h ljmp main org 2000h ;enough to read 8032 too main: ;[serial port initialization skipped] clr P1.0 ;switch to internal ROM by rising EA pin ;internal ROM is fetched only if address is correct (<1000h), ;otherwise external ROM is used and this program continues running mov DPTR,#0 loop: clr A movc A,@A+DPTR ;fetch internal ROM byte lcall putchr ;send it over RS232 inc DPTR ;next byte mov A,#10h cjne A,DPH,loop ;loop until end of internal ROM sjmp $ ;lock the system Now seriously, I don't think 8031 is the one you want to read code from, 8751 is more likely. If it is protected, forget about reading it. EA is latched immediately after reset and changing it is pointless. |
| Topic | Author | Date |
| 8031 microcontroller | 01/01/70 00:00 | |
RE: 8031 microcontroller | 01/01/70 00:00 |



