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.

[ARM] Proteus 8 Professional : LED Not Blinking

Status
Not open for further replies.

Kuji86

Newbie level 1
Joined
May 6, 2019
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
I developed LEB Blink code in Keil IDE for LPC2148. In the simulation mode of Keil, I was able to see the register values of the Pins are changed when we execute the code. I tried to simulate the same using proteus 8 professional. I used the hex file created in the Keil. I was unable to see the LEB Blink in the Proteus Simulation. The crystal frequency is 12 MHz and Clock Frequency also 12 MHz .


Please help me to resolve this. I have attached the code and the Proteus connection diagram also.
 

Attachments

  • Image.jpg
    Image.jpg
    297.9 KB · Views: 148

Are you sure LPC2148 Keil code works for LPC2138 Proteus model?

Delays are very less and LED needs a series current limiting resistor.

Rseries = (VDD - VLed) / ILed

In my Keil I have lpc213x.h file for LPC2138. You are using lpc21xx.h. Try changing it and see if that works.

See image.

Design > Configure Power Rails... should look like this. By default VDD/VCC is 5V. Change it to 3.3.

It works for me with above settings for VDD/VCC = 3.3


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
#include <lpc213x.h>
 
int main(void) {
    PINSEL0 = 0x00000000;
    IODIR0 = 0x00000001;
    
    while(1) {
        IOSET0 = 0x00000001;
        //IOCLR0 = 0x00000001;
    }   
}

 

Attachments

  • SS1.png
    SS1.png
    145.2 KB · Views: 131
  • SS2.png
    SS2.png
    47.7 KB · Views: 154
Last edited:

I used the hex file created in the Keil. I was unable to see the LEB Blink in the Proteus Simulation.

For some reason I could never run in the Proteus simulation any binary file generated externally to teh IDE, even though using the same compiler, ie, prefer using the HEX generated by the compilation from within the Proteus IDE itself. By the way, it's not clear whether you're performing these experiments in Debug or Release mode.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top