Forum breadcrumbs - You are here:ForumGeneral: Report BugsProblems with 8051
You need to log in to create posts and topics.

Problems with 8051

Good day.

First and foremost, I wish to extend my sincere gratitude to the developers, testers, and all those involved in the creation of this remarkable simulator.

I kindly apologize in advance for any errors in my English, as I am using a translator.

I am using SimulIDE for assembly language programming (ASEM51 compiler) for 8051 and may have found some errors related to the model of this microcontroller.

1) The problem of reading the status of ports when running the simulation.

When running the simulation, the port values are not updated (logical 1 is always read) until the logical level is changed. This issue applies to SimulIDE_1.1.0-SR1_Win64 and SimulIDE_1.2.0-1231_Win64 versions. For example, a simple program is used that reads the state of output P1.0 and passes the read value to output P2.0.

Code:

MAIN:

mov C,P1.0

mov P2.0,C

jmp MAIN

END

If a logical 0 is already present on P1.0 when the simulation is turned on, the program continues to read the logical unit from P1.0 anyway. If you change the logic level to P1.0 during the simulation, then the state transfer from P1.0 to P2.0 starts working correctly.

2) The commands orl C,bit and orl C,/bit are mixed up.

When executing the orl C,bit command, the result is obtained as from executing the orl C,/bit command and vice versa. This problem occurs in versions SimulIDE_1.1.0-SR1_Win64 and SimulIDE_1.2.0-1231_Win64.

3) UART reception is not initiated in the shift register mode (SM0=0 and SM1=0).

In the SimulIDE_1.1.0-SR1_Win64 UART version, in shift register mode, when writing to SBUF, transmission is not initiated and the TI flag is not set. In the SimulIDE_1.2.0-1231_Win64 version, this problem has been fixed, but when receiving in the same UART mode, executing the sequence of clr RI and setb REN commands does not initiate reception and the RI flag is not set.

4) For SimulIDE_1.1.0-SR1_Win64 and SimulIDE_1.2.0-1231_Win64 versions, the movx command does not initiate an external memory access cycle. Also, when running the program in step-by-step mode, you can see that running movx increases the PC by 2 (it should be +1).

 

For verification purposes, all four of the above items were tested in Proteus, and as a result, no problems were found.

I may also have discovered a problem with connecting the ASEM51 compiler for the 8051 model. In the Setting -> File Settings window, there is no selection of Asem-51 in the list of compilers, although the settings file is asem51.xml present on the way data\codeeditor\compilers\assemblers\asem51.xml . For myself, I found a solution to the problem:

1) Copy asem51.xml to the directory data\codeeditor\compilers\compilers\. The compiler appears in the Compiler list of the "File Settings window, but compilation is not performed, because in the "asem51.xml the "-v$filePath argument substitutes the path to the .asm file using a slash / instead of a backslash \ as is customary in Microsoft OS. As a result, ASEM51 does not recognize the path to the .asm" file.

2) In the file asem51.xml replace the -v $filePath argument with “$fileName$fileExt", i.e. get rid of the full path, leaving only the name of the source file with the program. The source file with the program will need to be located in the project directory.

Hi, thanks for reporting.

I will have a look as soon as possible.

VT58 has reacted to this post.
VT58