Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
aack...I canny git the18F26K22 to boot its wee load [solved]
#1
Hey folks:

New to the forum. Wanting to move from an 18F2620 using tiny-bootloader, to an 18F26K22 using ds30Loader. First off, ds30Loader looks awesome -- I have been waiting for something configurable like this for two decades.

Summary:

1) i can't get it to work with an 18F26K22, but I can with an 18F2620
2) yeah, there are different config bits and all, but I think they are correct
3) will post the settings info below if space permits.

Before that:

a) using a pic pcb board that has been in use for fifteen years
b) well-defined max202 iface; 20 MHz xtal; good ground plane...
c) have used 16F876 BL, trutrack BL for 18F252, tiny BL for 18F2620
d) all BLs have worked flawlessly for many years
e) so, not a hardware problem, ok?

I load up current version of MPLAB-X:

i) looks good. I tweak dsLoader settings for building both 2620 and 26K22
ii) builds are fine, but when I plug in the pickit-3 I just got, no frickin' luck
iii) it finds pickit-3, sees serial-num, but no joy after that

So I use my old-friend QuickWriter to burn the 2620 image from MPLAB-X:

I) Yeah baby! Loaded the BL into the 2620, and ds30Loader worked great!
II) Great except that the QuickWriter is obsolete and does not program the K22. But hey, the BL worked, so I am pumped.

So now I need to get Pickit-3 working with the 2620 for comparison:

0000) a bit of googling leads me to believe that MPLAB-X is a piece-of-shit with pickit-3
0001) so i uninstall MPLAB-X and install the old MPLAB 8.whatever that came on disc with my brand-new pickit-3
0010) yeah! it can actually communicate with the pickit-3!
0011) it updates PI-3 firmware, and i re-build projects
0100) i can load 18F2620 BL via pickit-3, and use ds30 to load code!
0101) life is good!

Now I need to get the 26K22 BL running:

0x00) the pickit-3 (via mplab 8.x) loads the BL code into the 18F26K22!
0x01) but ds30Loader cannot see the 26K22 (crap)
0x02) same hardware; same socket; just different chip/BL-firmware

So now, after a week of farting around, I am no further in migrating my project from 18F2620 using tiny-bootloader, to an 18F26K22 using ds30Loader.

I am not sure how to proceed after getting to the point where the BL does not find the target. Does anyone have any ideas?

thanks, gil smith

the important lines from my 18F26K22 settings file:

processor 18F26K22 ;xxx
;
#define OSCF 20000000 ; 20MHz oscillator frequency (including pll)
#define BLINIT 2000 ;xxx hello receive timeout [ms]
#define HELLOTRIES 2 ;xxx number of non hello characters received before branching to the user application
#define BLTIME 2000 ;xxx data receive timeout [ms]

#define USE_UART1 1 ;xxx uncomment to use uart1
;#define USE_UART2 1 ;xxx uncomment to use uart2
#define BAUDRATE 115200 ;xxx baudrate
;#define USE_ABAUD 1 ;xxx uncomment to use auto baud rate detection, READ ERRATA FIRST
;#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 TXE_DELAY 10 ;xxx time in us to wait before transmitting after pulling the tx enable pin high
#define TRISR_TXE TRISD ;xxx tris register containing tx enable
#define LATR_TXE LATD ;xxx port register containing tx enable
#define TRISB_TXE TRISD0 ;xxx tris bit for tx enable
#define LATB_TXE RD0 ;xxx port bit for tx enable
endif

#define KICK_WD 1 ;xxx uncomment to kick the wdt in the rx loop, only enable if the watchdog is enabled
#define PROT_GOTO 1 ;xxx protect goto at 0x00
#define PROT_BL 1 ;xxx protect bootloader
#define WRITE_VER 1 ;do flash write verification
#define EWRITE_VER 1 ;do eeprom write verification

ifdef IS_PIC18F
#define BLPLP 9 ;bootloader placement, pages from end
#define BLSIZEP 9 ;bootloader size [pages], used by bootloader protection
endif

ifdef IS_PIC18FJ
#define BLPLP 2 ;bootloader placement, pages from end
#define BLSIZEP 1 ;bootloader size [pages], used by bootloader protection
endif


config FOSC = HSHP ; HS oscillator (high power > 16 MHz)
config PLLCFG = OFF ; 4xPLL Disabled (direct oscillator)
config PRICLKEN = ON ; Primary clock Enabled
config FCMEN = OFF ; Fail-Safe Clock Disabled
config IESO = OFF ; Oscillator Switchover Disabled
config PWRTEN = ON ; Powerup Timer Enabled
config HFOFST = OFF ; HFINTOSC delayed until oscillator stable
config BOREN = ON ; Brown Out Detector Enabled
config BORV = 250 ; VBOR set to 2.50 V nominal
config WDTEN = ON ; WDT Enabled; SWDTEN bit has no effect
config WDTPS = 512 ; WDT = 1:512 = 2048 ms

config CCP2MX = PORTB3 ; CCP2 i/o is multiplexed with RB3 (not RC1)
config CCP3MX = PORTB5 ; P3A/CCP3 i/o is multiplexed with RB5 (not RC6)
config T3CMX = PORTB5 ; T3CKI is on RB5 (not RC0)
config P2BMX = PORTC0 ; ECCP2 P2B is on RC0 (not RB5)
config PBADEN = OFF ; PORTB<5:0> pins configured as digital i/o (not analog)
config MCLRE = EXTMCLR ; MCLR pin enabled, RE3 input pin disabled

config STVREN = ON ; Stack Overflow Reset Enabled
config XINST = OFF ; Extended Instructions Disabled
config LVP = OFF ; Low-Voltage-Programming Disabled

config CP0 = OFF ;Code Protect 00800-03FFF
config CP1 = OFF ;Code Protect 04000-07FFF
config CP2 = OFF ;Code Protect 08000-0BFFF
config CP3 = OFF ;Code Protect 0C000-0FFFF
config CPB = OFF ;Code Protect Boot
config CPD = OFF ;Data EE Read Protect
config WRT0 = OFF ;Table Write Protect 00800-03FFF
config WRT1 = OFF ;Table Write Protect 04000-07FFF
config WRT2 = OFF ;Table Write Protect 08000-0BFFF
config WRT3 = OFF ;Table Write Protect 0C000-0FFFF
config WRTC = OFF ;Config. Write Protect
config WRTB = OFF ;Table Write Protect Boot
config WRTD = OFF ;Data EE Write Protect
config EBTR0 = OFF ;Table Read Protect 00800-03FFF
config EBTR1 = OFF ;Table Read Protect 04000-07FFF
config EBTR2 = OFF ;Table Read Protect 08000-0BFFF
config EBTR3 = OFF ;Table Read Protect 0C000-0FFFF
config EBTRB = OFF ;Table Read Protect Boot
Reply


Messages In This Thread
aack...I canny git the18F26K22 to boot its wee load [solved] - by teletype-guy - 2012-06-23, 06:55:28

Forum Jump:


Users browsing this thread: 1 Guest(s)