Hi, my pic 18f1220 seems has an 8khz internal clock instead of 8mhz..
#include <pic18fregs.h>
#include "delay.h"
code char at __CONFIG1H CONFIG1H = _OSC_INT_Port_on_RA6_Port_on_RA7_1H
& _FCMEN_ON_1H & _IESO_ON_1H;
code char at __CONFIG2L CONFIG2L = _PUT_ON_2L & _BODEN_OFF_2L & _BODENV_2_0V_2L;
code char at __CONFIG2H CONFIG2H = _WDT_DISABLED_CONTROLLED_2H &
_WDTPS_1_32768_2H;
code char at __CONFIG3H CONFIG3H = _MCLRE_MCLR_disabled_RA5_input_en_3H;
code char at __CONFIG4L CONFIG4L = _STVR_ON_4L & _LVP_OFF_4L & _BACKBUG_OFF_4L;
#pragma stack 0xC0 0x40
void main(void) {
ADCON1 = 0x7E; //PORTB digital i/o
PORTB = 0;
TRISB = 0;
PORTB = 0;
while(1) {
PORTBbits.RB0 = 1;
delay100tcy(80);
PORTBbits.RB0 = 0;
delay100tcy(80);
}
}
With this code a led placed on RB0 flash 1 time per second.. Same
problem if i use " for(char i = 1; c; ++c) " instead of
delay100tcy(80), i can see the led flashing..
I have tried whit more than one pic..
Any ideas?
Alex
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user