PDA

View Full Version : old chestnut, 18f2550, fuses, osc's leds...



f_lez
- 28th October 2009, 00:22
Ok 4mhz crystal, 18f2550, led...

basic program is simple enough



'
'
define osc 16

ADCON0 = 0
CMCON = 7

trisa=0

loop:
porta=255
pause 1000
porta=0
pause 1000
goto loop
'
'
'






and these fuses are in a p18f2550fuses.inc



CONFIG PLLDIV = 1 ; set for 4mhz to pll
CONFIG CPUDIV = OSC4_PLL6 ; set for 16mhz cpu core
CONFIG USBDIV = 2 ; usb=pll/2
CONFIG FOSC = HSPLL_HS
CONFIG FCMEN = ON

;
;
;
;


(other fuses omitted)

thing is i can set the define osc to whatever i want, the speed the led flashes at is not changed, i thought the define osc was used to re-compile the delays etc in the pause routines? (amongst other things)

why do i not see a speed change in the led when i change it, why do i not see one second on and one second off, its more like a 1/4 of that irrespective of setting of define osc

I can set the fuses for the chip by hand at burn time, so i know the fuses are burned correctly as if i do set them by hand, same result, also if i set them wrong i can get faster flashing, but i cant get it to slow to 1hz irrespective of cpudiv/osc etc, i seem to get 2/4/8hz

Darrel Taylor
- 28th October 2009, 01:07
MPASM is case sensitive.

change...
define osc 16-- to --
define OSC 16

f_lez
- 28th October 2009, 08:55
Omg...........

comwarrior
- 30th October 2009, 01:17
isn't case sensitivity a swine at times... :D

f_lez
- 31st October 2009, 17:18
not as much as usb connectivity.....

which i still have not mastered.