> The LED is connected to the PIC16F877A PORTD. From the PORTD there is a 
> Resistor.
> And the LED located between the resistor and ground.
> 
> To light on the LED.. i should do
> 
> TRISD = 0x00;
> PORTD = 0x3F ?

I would say 'yes' to that; TRISD=0 makes all pins Outputs (all 1's would 
make them Inputs; 0=O; 1=I).

Another problem in your code: delay() takes an (unsigned) char argument, 
but you pass in 1000, which is truncated to 1000 % 256 = 232.

What *do* you see: LED full bright on, LED completely dark, LED half 
bright on?

What compiler/linker options do you use?

Regards,
Raphael

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to