old chestnut, 18f2550, fuses, osc's leds...


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default old chestnut, 18f2550, fuses, osc's leds...

    Ok 4mhz crystal, 18f2550, led...

    basic program is simple enough

    Code:
    '
    '
    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

    Code:
    	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

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    MPASM is case sensitive.

    change...
    Code:
    define osc 16
    -- to --
    Code:
    define OSC 16
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Omg...........

  4. #4


    Did you find this post helpful? Yes | No

    Default

    isn't case sensitivity a swine at times...

  5. #5


    Did you find this post helpful? Yes | No

    Default

    not as much as usb connectivity.....

    which i still have not mastered.

Similar Threads

  1. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  2. 18F2550 config fuses, is my setup OK?
    By peu in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th July 2006, 03:48
  3. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 21:02

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts