2013-03-04, 05:18:32
(This post was last modified: 2013-03-08, 09:56:36 by Mikael Gustavsson.)
For some time I've been working away at getting this bootloader to work on a 26K22.
Many of the posts here helped me a great deal, however I now have a rather curious problem after resolving most of my issues.
I now have it running such that the bootloader GUI communicates with the micro, but the response is disappointing.
sent -> 0xC1
sent back-> 0x57 0x83 0x02 0x4B
So it fails on the echo test, and is identifying with a device number of 131 instead of 343
The DEVICEID is confirmed as 343 in the compilation using the messg mechanism
I have added the following to my code to confirm Tx can work :
; send test message out uart1
movlw 0x2A ; load * ascii code
movwf TXREG1
rcall Send
Strangely two asterix chars are sent, hence maybe this is part of my problem, however it is at least sending the correct character.
Have tried the same code at 16MHz & 64Mhz (with and without x4 PLL) and also with high and low baud rates eg 19200 and 115200.
Suggestions where to look ?
Craig
Fixed that problem, rather stupidly had not initially realised the "movwf TXREG1" was not required....
So, point is that this mechanism sends the correct data ie an asterix appears when observed in Teraterm.
CS
Many of the posts here helped me a great deal, however I now have a rather curious problem after resolving most of my issues.
I now have it running such that the bootloader GUI communicates with the micro, but the response is disappointing.
sent -> 0xC1
sent back-> 0x57 0x83 0x02 0x4B
So it fails on the echo test, and is identifying with a device number of 131 instead of 343
The DEVICEID is confirmed as 343 in the compilation using the messg mechanism
I have added the following to my code to confirm Tx can work :
; send test message out uart1
movlw 0x2A ; load * ascii code
movwf TXREG1
rcall Send
Strangely two asterix chars are sent, hence maybe this is part of my problem, however it is at least sending the correct character.
Have tried the same code at 16MHz & 64Mhz (with and without x4 PLL) and also with high and low baud rates eg 19200 and 115200.
Suggestions where to look ?
Craig
(2013-03-04, 05:18:32)strud Wrote: I have added the following to my code to confirm Tx can work :
; send test message out uart1
movlw 0x2A ; load * ascii code
movwf TXREG1
rcall Send
Strangely two asterix chars are sent, hence maybe this is part of my problem, however it is at least sending the correct character.
Fixed that problem, rather stupidly had not initially realised the "movwf TXREG1" was not required....
So, point is that this mechanism sends the correct data ie an asterix appears when observed in Teraterm.
CS