Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Proteus, MCU 8051 IDE

Status
Not open for further replies.

PG1995

Full Member level 5
Joined
Apr 18, 2011
Messages
248
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
3,758
Hi

I'm new to MCUs and learning Proteus and some other related programs.

I'm trying to do this problem (I think the code given in the book is not correct so the correct code is given below). I have also attached Proteus file.

I was able to build circuit in Proteus and it works too! I also played around with MCU 8051 IDE. In the linked videos I have some questions. Please help me with them. In Video #1, please ignore Q1. Thank you very much.

Video #1: https://www.youtube.com/watch?v=Os6NhBpRAjc
Video #2: https://www.youtube.com/watch?v=wQLVj3bDkGg

Correct Code:
Code:
ORG 00H
MOV	 A,#55H
AGAIN:	MOV	 P1,A
		ACALL DELAY
		CPL 	 A
		SJMP	 AGAIN
DELAY:	MOV	 R5,#2
HERE1:	MOV	 R4,#180
HERE2:	MOV	 R3,#255
HERE3:	DJNZ	 R3,HERE3
		DJNZ	 R4,HERE2
		DJNZ	 R5,HERE1
		RET  
END
 

Attachments

  • isis_blingkingLeds.rar
    10.3 KB · Views: 51
  • IMG.jpg
    IMG.jpg
    97.5 KB · Views: 105
Last edited:

Q2: As far as i remember, the microcontroller latch the value of EA after any reset, so you need to have EA high only at the beginnig of the simulation
Q3: sure! the simulation of a bargraph in proteus is very easy... i recommed to read the help about that element, but it's like an array of leds... the right side(11-20) is cathodes and the left side(1-10) are the anodes...
Q: the left table obviously is the internal RAM table... there you can see the first row as the common register (R0-R7) where R3,R4 and R5 change according the program...

i suggest to read or take a class about microcontrollers to understand this facts...
 
  • Like
Reactions: PG1995

    PG1995

    Points: 2
    Helpful Answer Positive Rating
Thank you, Kurenai Ryu.

Could you please explain it a bit that what you mean by the following? Thanks.

Q2: As far as i remember, the microcontroller latch the value of EA after any reset, so you need to have EA high only at the beginnig of the simulation

Best regards
PG
 

External Access Enable/Programming Supply Voltage: EA must be externally held low
to enable the device to fetch code from external program memory locations 0000H to the
maximum internal memory boundary. If EA is held high, the device executes from internal
program memory unless the program counter contains an address greater than 0FFFH for
4 k devices, 1FFFH for 8 k devices, 3FFFH for 16 k devices, and 7FFFH for 32 k devices.
The value on the EA pin is latched when RST is released and any subsequent changes
have no effect.
This pin also receives the 5V/12V (±10%) programming supply voltage (VPP)
during FLASH programming.
from the philips 89C51 datasheet, i remember that any 80C51 behaves like that... (and i think i have readed it in other datsheets BTW)
 
  • Like
Reactions: PG1995

    PG1995

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top