Hi everyone !

I'm currently trying to make a simple program to work on a PIC 16F872.
The source code is as follow :

#define __16f872
#include <pic16f872.h>

void main() {
     TRISB = 0;
     PORTB = 59;

     while(1)
     {

     }
}

I  generate the hex file with the command :
sdcc -mpic14 -p16f872 --use-non-free test2.c

and i'm using a sdcc 3.3.0 that I built from sources :
sdcc -v
SDCC : 
mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.3.0 
#8604 (Jan 15 2014) (Linux)

My test program build fine but when i burn it in the pic with a easypic 4 
programmer and a software on windows, nothing seems to happen, no led light on 
on port B.

I built the exact same program on a proprietary compiler, MickroC, and leds 
light on when I burn the .hex in the uC.

I attached the 2 .hex files, the one from sdcc and the one from mikroC.

Do you see what can be wrong with my source code/build command/sdcc version ?

Thanks in advance ! :-)

Ael

Attachment: Sdcc.hex
Description: Binary data

Attachment: MikroC.hex
Description: Binary data

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to