And don't forget the loop :-)
void main (void)
From: Paul [mailto:paul@...
Sent: s=E1bado, 31 de maio de 2003 14:44
Subject: Re: [Sdcc-user] SDCC help
Shahzad Khan wrote:
I am a newbie with SDCC and facing a lot of problem in
a project. I am trying to glow a LED in the main
program and nothing else. But the LED doesn't behave
as desired. I am pretty sure that the problem is in
Why are you sure of that?
A common error is to connect the LED from a port pin to ground, with the=
intention that the LED will light when the pin is high. This does not=
work, because the pin can not source much current.
The LED must be connected between the pin and Vcc, with a current limiting=
resistor in the range of 200 to 1000 ohms. Disconnect the wire from your=
port pin and try shorting it to ground to verify that the LED really does=
light when the pin is driven low.
Also, connect a voltmeter to the pin and watch the actual voltage. If the=
resistor is too high and its a low efficiency LED there may not be enough=
current to light the LED.
Either, the linkage is not proper or their
is a memory problem (in RAM).=20
Does SDCC give error in
compilation if there is a memory problem? (small
Usually you will get an error, but not always.
You did not provide the exact command you're using to run sdcc, so we can=
not see what options you are giving to the linker for memory mapping. =
Please refer to the list of 4 recommended things to include in support=
Please help me as I am badly stuck.
Find the files attached.
I am using AT89C52.
The code looks like it should work, assuming you're compiling the main() in=
the second attached file.
Thanks in advance,
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
The information contained in this e-mail and in the attached files are for=
exclusive use of the addressee herein nominated, and may contain trade=
privileged and other confidential information,protected by the applicable=
In case you are not the right addressee, you are hereby notified that=
reviewing, reading, copying and/or distributing of this e-mail's content=
strictly prohibited and unauthorized. Please, delete the e-mail's content=
notify the sender immediately.=20
Thank you for your cooperation.