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.

[SOLVED] problem in simulating lpc2138 micro controller on proteous

Status
Not open for further replies.

abhishekdixit

Full Member level 2
Joined
Dec 30, 2011
Messages
124
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
India
Activity points
2,182
hi all,
i am using lpc2138 micro controller for our programming, and i am very much confident about my program. i am testing a single led toggling program. and my program is perfect. but when i try to simulate my program on proteus. so its not working. i think their is a some problem in initializing the lpc2138 micro conroller. so can anyone help me to give a schematic diagram of lpc2138 on proteus ,in which the basic component fare used for initializing my controller...

thank you
with regards,
abhishek dixit
 

Have you tried in real hardware with a debugger?

Since your code is just a led toggle can you post your code?
Can you also post your proteus project ?
 

hello alexan_e,
i tried my code on proteus. but its not working. i think that their is some mistake in initializing the lpc2138 controller. as per your instruction i am posting my code & proteus diagram.
Code:
#include <LPC214X.H>
void delay(int);
int main(void)
{
	IODIR0|=0x001;
	while(1)
	{
		IOSET0|=0x001;
		delay(10000);
		IOCLR0|=0x001;
		delay(10000);
	 }
	 return 0;
}

void delay(int a)
{
	unsigned int i;
	unsigned int j;
	for(i=0;i<=a;i++);
	for(j=0;j<=(a*2);j++);

	//return 0;
}

and its schematic diagram is

View attachment New Picture.bmp
 

Your mcu power is not connected.

Connect all Vss pins to groung
Connect the V3 pins , vref and vbat to 3v3
 

hello alexan_e,
I have done whatever you said but my project is still not working. i am again sending you the schematic diagram of my project. you just see & tell me what mistake i am doing. when i try to run it their are two types of error occurs which are:
1. No power supply specified for net 3.3v in power rail configuration.
2. simulation FAILED due to netlist compiler error(s).
these two error are coming. please check it...
my schematic diagram is here:
View attachment New Picture (1).bmp
 

You have not created the 3.3v power supply line, in the power terminal string edit box write +3.3v instead of 3.3v, if you don't use the + or - sign in front of the voltage then the power supply rail is not created unless you go to design -> configure power lines and do it manually.

Alex
 
hello alex,
my code is now working, thanx alot for that. but now i wanna to know one thing that how much amount of crystal oscillator i use for operate micro controller?
 

i mean that if i wanna to use lpc2138 on hardware then what should the value of the crystal oscillator for operating frequency.like in 8051 microcontroller we 11.0592MHz oscillator for generating frequency....
 

The clock system of the microcontroller is described in the user manual page 24

Another guide you can read is The Insider's Guide To The NXP LPC2000 Based Microcontrollers https://www.hitex.com/index.php?id=download-insiders-guides page 56

The frequency you enter in the property of proteus when you double click the mcu is the same as the used crystal in the hardware, then the PLL is set from the code to generate the core operating frequency, the mcu can work up to 60MHz
 
You have not created the 3.3v power supply line, in the power terminal string edit box write +3.3v instead of 3.3v, if you don't use the + or - sign in front of the voltage then the power supply rail is not created unless you go to design -> configure power lines and do it manually.

Alex

so now i have almost the same problem... the problem is on the VM (in the picture provided)... so how do i solve this problem??

prob.JPG
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top