I develop a app with sdcc (sept 29 2008) and test the result on GPSIM .
I use PIKLAB IDE 0.15.3
But when I program , NOTHING
So I try to verify my pic , with a hello word . But .. it didn't work
I use a .hex on the net , and the led blink , so the problem is not my pic , my JDM serial programmer, ..or my led
//THE CODE
#include <pic16f877.h>
void delay_ms(long ms)
{
long i;
while (ms--)
for (i=0; i < 330; i++)
;
}
not 100% sure but, the A Port on your device is used together with the ADC. See the adc section in the datasheet how to initialize the port for digital output. On some devices this can also be set in configuration registers so double check them also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As we all know, blinky traditionally sets some pin *low* (RAn = 0), waits a bit (delay_ms), sets the same pin(s) *low* (RAn = 0) again, and waits again (delay_ms) ...
Try assigning RA0 = 1; RA1 = 1; the second time through!
Good luck,
Raphael
PS: The hint about initialization of ADC and config bits is still valid.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi my message is so simple .
I develop a app with sdcc (sept 29 2008) and test the result on GPSIM .
I use PIKLAB IDE 0.15.3
But when I program , NOTHING
So I try to verify my pic , with a hello word . But .. it didn't work
I use a .hex on the net , and the led blink , so the problem is not my pic , my JDM serial programmer, ..or my led
//THE CODE
#include <pic16f877.h>
void delay_ms(long ms)
{
long i;
while (ms--)
for (i=0; i < 330; i++)
;
}
void main()
{
TRISA = 0x00;
while(1)
{
RA0 = 0;
RA1 = 0;
delay_ms(250);
RA0 = 0;
RA1 = 0;
delay_ms(250);
}
}
THK before .
not 100% sure but, the A Port on your device is used together with the ADC. See the adc section in the datasheet how to initialize the port for digital output. On some devices this can also be set in configuration registers so double check them also.
and check the watchdog configuration in config regs
As we all know, blinky traditionally sets some pin *low* (RAn = 0), waits a bit (delay_ms), sets the same pin(s) *low* (RAn = 0) again, and waits again (delay_ms) ...
Try assigning RA0 = 1; RA1 = 1; the second time through!
Good luck,
Raphael
PS: The hint about initialization of ADC and config bits is still valid.
Thank I will check that
there is an error in the code , yes the the second time , RA1 and RA0 are =1
this is the simple test, in the real , I put ALL PORTS on output TRISA to TRISD , and toggle PORTA to PORTD ,
I ll check the watchdog
thk
Heyyyyy , thank for the help now I can test my tach :-)
I just have to configure the __CONFIGure BITS ( _WDT_OFF )
Vive SDCC