18F25K22 and 18F26K22 [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: 18F25K22 and 18F26K22 [solved] (/showthread.php?tid=82) |
18F25K22 and 18F26K22 [solved] - srnet - 2011-05-13 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 ? RE: 18F25K22 and 18F26K22 - Mikael Gustavsson - 2011-05-13 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 RE: 18F25K22 and 18F26K22 - srnet - 2011-05-13 (2011-05-13, 18:40:58)Mikael Gustafsson Wrote: Hi, Thanks for the reply, good oh. The DS30 is a great bit of software ! RE: 18F25K22 and 18F26K22 - Mikael Gustavsson - 2011-05-13 Thank you! And thank you for the donation! RE: 18F25K22 and 18F26K22 - brid0030 - 2012-04-27 Would you be willing to share this code? I'm using a 18F25k22 and would not mind losing the MAX232 IC. RE: 18F25K22 and 18F26K22 - srnet - 2012-05-01 (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 |