Just got Tiny Bootloader to work with my X-bee network. Changed the .asm file to look like this so it runs at 9600 baud @4MHz
Code:
radix DEC
LIST P=18F1320 ; change also: Configure->SelectDevice from Mplab
xtal EQU 8000000 ; you may want to change:
;oscil: _HS_OSC_1H HS extern
; _INTIO1_OSC_1H Internal RC, OSC1 as RA7, OSC2 as Fosc/4
; _INTIO2_OSC_1H Internal RC, OSC1 as RA7, OSC2 as RA6
baud EQU 9600 ; standard TinyBld baud rates: 115200 or 19200
; The above 3 lines can be changed and buid a bootloader for the desired frequency and PIC type
#define _XTAL_FREQ 4000000 ;//set your xtal frequency here
#define _UART_BAUD 9600 ;//set your baud rate here
#define _UART_BRG ((_XTAL_FREQ / _UART_BAUD) / 64) - 1 ;//variable for setting SPBRG
;SPBRG = _UART_BRG ;//set baud rate
; TXSTA = 0b00100000; ; //tx enable, low speed baud rate generator
;RCSTA = 0b10010000; //serial port enable, continuous rx enable
;********************************************************************
; Tiny Bootloader for 18F series Size=100words
; [email protected]
; http://www.ac.ugal.ro/staff/ckiku/software/picbootloader.htm
;********************************************************************
#include "../icdpictypes.inc" ;takes care of: #include "p18fxxx.inc", max_flash, IdTypePIC
#include "../spbrgselect.inc" ; RoundResult and baud_rate
Bookmarks