2011-07-07, 14:14:52
(This post was last modified: 2012-12-25, 17:05:20 by Mikael Gustavsson.)
I have spent ages trying to get bootloader working on USART1 of an 18F26K22. I have had no problems with other chips from the 18F family but this one has been a major headache.
After 2 days of fiddling i finally gave up and tried USART2. It worked on USART2 first time, but with errors. It would stop halfway through uploading a program and give a timeout error.
This is with
OSCF 16000000
BAUDRATE 115200
I realise that the Microchip manual gives this a 3% error rate but i have never had any problems with other chips.
I tried reducing the baudrate to 19200 (error rate 0.16) but had the same problems.
I finally fixed it by enabling USE_BRG16 and going back to 115200 (error -0.79%)
Now works perfectly (on USART2). Still nothing on USART1. I know USART1 works ok as i can program it fine using microchip C18 compiler.
Are these chips problematic or is there something i am missing?
I am using the latest version 3.0.0 of the bootloader software and my config settings are
config FOSC = INTIO67
config WDTEN = OFF
config BOREN = OFF
config PWRTEN = ON
config MCLRE = EXTMCLR
config LVP = OFF
config HFOFST = OFF
config PRICLKEN = OFF
config FCMEN = OFF
config CCP3MX = PORTB5
config XINST = OFF
config IESO = OFF
Has anyone got the bootloader working on USART1?
Thanks
After 2 days of fiddling i finally gave up and tried USART2. It worked on USART2 first time, but with errors. It would stop halfway through uploading a program and give a timeout error.
This is with
OSCF 16000000
BAUDRATE 115200
I realise that the Microchip manual gives this a 3% error rate but i have never had any problems with other chips.
I tried reducing the baudrate to 19200 (error rate 0.16) but had the same problems.
I finally fixed it by enabling USE_BRG16 and going back to 115200 (error -0.79%)
Now works perfectly (on USART2). Still nothing on USART1. I know USART1 works ok as i can program it fine using microchip C18 compiler.
Are these chips problematic or is there something i am missing?
I am using the latest version 3.0.0 of the bootloader software and my config settings are
config FOSC = INTIO67
config WDTEN = OFF
config BOREN = OFF
config PWRTEN = ON
config MCLRE = EXTMCLR
config LVP = OFF
config HFOFST = OFF
config PRICLKEN = OFF
config FCMEN = OFF
config CCP3MX = PORTB5
config XINST = OFF
config IESO = OFF
Has anyone got the bootloader working on USART1?
Thanks