i think you shold try this:
#define __16f877a
#include "pic/pic16f877a.h"
/* Setup chip configuration */
typedef unsigned int config;
config at 0x2007 __CONFIG = _CP_OFF &
_WDT_OFF &
_BODEN_OFF &
_PWRTE_OFF &
_LVP_OFF &
_XT_OSC;
//delay
void delay(unsigned int a)
{
volatile unsigned int i, j, k;
for(i = 0; i<a; i++)
for(j = 0; j < 10; j++)
for(k = 0; k < 255; k++);
}
//main
void main(void) {
TRISD = 0x00;
while(1) { /* Loop forever */
//LED1-LED7
PORTD = 0x3F; delay(1000);
PORTD = 0x00; delay(1000);
PORTD = 0x3F;
}
}
2008/5/18 paragasu <[EMAIL PROTECTED]>:
> i am using debian sid. the compiler is sdcc, assembler is gpasm, linker is
> gplink
> i use the binary shipped with debian sid distribution. i will try to change
> the delay(1000)
> to delay(200) to see what happen. i just realize the problem. thank a lot..
>
> -------------------------------------------------------------------------
> 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
>
>
--
In a world without walls and fences,
Who needs Windows and Gates?
-------------------------------------------------------------------------
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