Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
18F25K22 Support [solved]
#1
Hi Mikael, Graham here from Digital DIY.

With the feature packed 18F25K22 now fully supported by Microchip, it is becoming the PIC of choice for PICAXE, Amicus and Xino. I have a few of them to test with, although I found there were some issues with the ds30 bootloader.

First thing I noticed - 'Device.INC' has a duplicate pre-compile option:
Code:
    ifdef    __18F25K22
        #include    p18F25K22.inc
        #define        VALID_DEV        1
        #define        MAX_FLASH        0x8000
        #define        DEVICEID        83
        #define        HAS_UART2        1
        #define        ROWSIZEW        32
    endif
After correcting that, I entered in the settings for my hardware (an Amicus board with 16Mhz crystal). Here's the relevant settings from 'settings.inc'
Code:
;------------------------------------------------------------------------------
; Device
;------------------------------------------------------------------------------
        LIST          P=18F25K22;                        ;xxx


;------------------------------------------------------------------------------
; Includes
;------------------------------------------------------------------------------
        #include    "devices.inc"


;------------------------------------------------------------------------------
; User preferences
;------------------------------------------------------------------------------
        radix DEC

        #define        DEV_MODE        1                ;xxx delete or comment this line
        #define        OSCF            64000000        ;xxx oscillator frequency
        #define        BLTIME            2000            ;xxx data receive timeout [ms]
        #define        BLINIT            2000            ;xxx hello receive timeout [ms]
        #define        HELLOTRIES        2                ;xxx number of non hello characters received before branching to the user application


;------------------------------------------------------------------------------
; UART settings
;------------------------------------------------------------------------------            
        #define        BAUDRATE         115200            ;xxx baudrate
        #define        USE_UART1        1                ;xxx uncomment to use uart1
        ;#define    USE_UART2        1                ;xxx uncomment to use uart2
        ;#define    USE_BRG16        1                ;xxx uncomment to use 16-bit brg        
        
        ;#define    USE_TXENABLE    1                ;xxx uncomment to use a tx enable pin        
        #ifdef USE_TXENABLE
            #define    TRISR_TXE        TRISC            ;xxx tris register containing tx enable
            #define    LATR_TXE        LATC            ;xxx port register containing tx enable
            #define    TRISB_TXE        TRISC6            ;xxx tris bit for tx enable
            #define LATB_TXE        RC6                ;xxx port bit for tx enable
        #endif


;------------------------------------------------------------------------------
; CAN settings
;------------------------------------------------------------------------------        
        ;#define USE_CAN                            ;xxx uncomment to use CAN instead of UART
        #define        ID_PIC        1                    ;xxx node number for this device
        #define     ID_GUI         0x7ff                ;xxx node number of the ds30 Loader gui


;------------------------------------------------------------------------------
; Advanced settings
;------------------------------------------------------------------------------        
        #define        PROT_GOTO    1                    ;xxx protect goto at 0x00
        #define        PROT_BL     1                    ;xxx protect bootloader
        
        #define        BLPLP        7                    ;bootloader placement, pages from end
        #define        BLSIZEP        7                    ;bootloader size [pages], used by bootloader protection    
        

;------------------------------------------------------------------------------
; Configuration bits, these macros can be found at the end of the inc-files located in
; C:\Program Files\Microchip\MPASM Suite\
;
; These can also be set in MPLAB IDE instead, they are found in Configure->Configuration bits...
;------------------------------------------------------------------------------
    CONFIG FOSC = HSHP
    CONFIG PLLCFG = ON
    CONFIG FCMEN = OFF
    CONFIG IESO = OFF
    CONFIG BOREN = ON
    CONFIG WDTEN = OFF
    CONFIG WDTPS = 128
    CONFIG PBADEN = OFF
    CONFIG STVREN = ON
    CONFIG LVP = OFF
    CONFIG XINST = OFF
    CONFIG DEBUG = OFF
The ds30 GUI can not detect the device, and a quick check with 18F25K20 settings suggest the hardware works fine (the GUI picks it up fine). What am I overlooking?
I should have added that I am using MPLAB 8.63
Reply


Messages In This Thread
18F25K22 Support [solved] - by Mitchy - 2011-02-12, 07:27:49
RE: 18F25K22 Support - by Mikael Gustavsson - 2011-02-12, 12:03:44
RE: 18F25K22 Support - by Mitchy - 2011-02-12, 12:41:13
RE: 18F25K22 Support - by Mikael Gustavsson - 2011-02-12, 22:12:41
RE: 18F25K22 Support - by Mitchy - 2011-02-13, 10:14:13
RE: 18F25K22 Support - by Mikael Gustavsson - 2011-02-14, 21:20:23
RE: 18F25K22 Support - by moonshadow - 2011-02-17, 14:06:05
RE: 18F25K22 Support - by Mikael Gustavsson - 2011-02-17, 21:18:59
RE: 18F25K22 Support - by Mitchy - 2011-02-19, 00:10:20
RE: 18F25K22 Support - by moonshadow - 2011-03-17, 15:24:44
RE: 18F25K22 Support [solved] - by rotting79 - 2013-10-08, 07:10:35
RE: 18F25K22 Support [solved] - by rotting79 - 2013-10-29, 03:13:42

Forum Jump:


Users browsing this thread: 3 Guest(s)