Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
18F25K22 and 18F26K22 [solved]
#1
I have altered the DS30 Bootloader for a 18F25K22 so that it uses inverted RS232, this allows the use of a simple 2 resistor UART interface, rather than needing a MAX3232 etc.

It works well, at 38400 baud and 2.5v Supply, notably more reliable than Mikrobasic BootLoader (which was also a LOT harder to get working).

Anyway, there is not much differance in price between a 18F25K22 (32K) and the 18F26K22 (64K), will I have much of a problem using the DS30 Bootloader with the larger device ?
Reply
#2
Hi,
The bigger size won't be a problem. I won't notice any difference at all.
Unless you use more than 32k of course, than it will take a little longer
longer to write.

Mikael
Reply
#3
(2011-05-13, 18:40:58)Mikael Gustafsson Wrote: Hi,
The bigger size won't be a problem. I won't notice any difference at all.
Unless you use more than 32k of course, than it will take a little longer
longer to write.

Mikael

Thanks for the reply, good oh.

The DS30 is a great bit of software !
Reply
#4
Thank you! And thank you for the donation!
Reply
#5
Would you be willing to share this code? I'm using a 18F25k22 and would not mind losing the MAX232 IC.
Reply
#6
(2012-04-27, 15:57:39)brid0030 Wrote: Would you be willing to share this code? I'm using a 18F25k22 and would not mind losing the MAX232 IC.

Find this bit of the DS30LOADER.ASM and add the two BSFs shown to the bottom, the same changes would apply to many modern PICS;

;----------------------------------------------------------------------
; Init
;----------------------------------------------------------------------
clrf doerase
; Uart, this part of code assembles if USE_CAN is not defined
ifndef USE_CAN
;not using BRG
ifdef USE_BRG16
bsf BAUDCON_, BRG16
movlw (UBRG>>8)
movwf SPBRGH_
endif
movlw b'00100100' ;enable transmit and
movwf TXSTA_ ; high speed mode
movlw (UBRG&0xff) ;use only SPBRG_ (8 bit mode default) not using BAUDCON
movwf SPBRG_ ;set the baud rate ?
movlw b'10010000' ;enable serial port
movwf RCSTA_ ; and receive
bsf BAUDCON_,5 ;set inverted receive data
bsf BAUDCON_,4 ;set inverted transmit
endif




Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)