Hi! I'm try to use Tiny PIC Bootloader+, I have been reading the Quickstart guide and I made the steps but the Tiny PIC Bootloader says:
"Check Device...
Open COM4 serial port at 9600bd
Software reseting Device
Error: No Device Detected!!!
Verify: - COM number
- baud rate
- if Device was reseted less than 1sec ago
(do you need to check "RST Reset"?)
- if TinyBootloader firmware is correctly
programmed into Device
Close COM4 serial port"
In the bootloader program:
I check the device and Baud rate
I conected the MCLR pin to RST of the DB9 like can see in the http://tinypicbootload.sourceforge.net/hardware_connection.html page, so anyidea, what could be my problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try disabling RTS reset and do a manual reset. A delay is required after
RTS reset for the timings to be right which is disabled in the current
version of PC software.
Hi! I'm try to use Tiny PIC Bootloader+, I have been reading the
Quickstart guide and I made the steps but the Tiny PIC Bootloader says:
"Check Device...
Open COM4 serial port at 9600bd
Software reseting Device
Error: No Device Detected!!!
Verify: - COM number
- baud rate
- if Device was reseted less than 1sec ago
(do you need to check "RST Reset"?)
- if TinyBootloader firmware is correctly
programmed into Device
Close COM4 serial port"
In the bootloader program:
I check the device and Baud rate
I conected the MCLR pin to RST of the DB9 like can see in the http://tinypicbootload.sourceforge.net/hardware_connection.html page, so
anyidea, what could be my problem?
Hi!, I used other bootloader to my PIc and works, The Tiny PIC Bootloader recongnizes my PIC, now the problem is the program says "Error: Hex file for PIC16F, PIC family mismatch." and both programs are to PIC182620 , I don't understand what's wrong?...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sunish Issac.- I used Mplab IDE with MPASMWIN, and I don't know what do you mean with: Are the pragmas right ? sorry .
Dan .- Hi!, I have troubles when I press "write device", when I press "Check device" all is good, but when I want to write so I have problems, It's the same that you say?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes it's the same Dan told you about.
Sorry for the inconvenience but it won't be fixed quickly :-(
So for the moment, just uncheck "check file" in "transfert options".
Best regards,
Edorul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check Device...
Open COM4 serial port at 19200bd
Software reseting Device
Device answer: 0x4F 0x4B='K'
byte OK, now check ID-code and Family...
idCode = $4F
family = C
description = 18F 2620/4620/4680
flash mem = 65536 bytes
EEPROM mem = 1024 bytes
Bootloader size = 200 bytes
Transfert block size = 64 bytes
Found: 18F 2620/4620/4680
Open HEX file: C:\Proyecto_bootloader\main.hex
Checking hex file:
Hex file end line
Comment in file: ;PIC18F2620
Comment in file: ;CRC=AE24 CREATED="05-dic-13 10:33"
HEX sumary: INX32M,
PIC16F + cfg,
total=598 bytes.
Error: Hex file for PIC16F, PIC family mismatch.
Close COM4 serial port
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It won't be OK for all PIC devices... you can still have a "PIC family mismatch" error.
As said before, just uncheck "check file" in "transfert options".
Best regards,
Edorul
Last edit: edorul 2013-12-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the bootloader that I had used...
radix DEC
LIST P=18F4620 ; change also: Configure->SelectDevice from Mplab
xtal EQU 32000000 ; you may want to change: _XT_OSC_1H _HS_OSC_1H _HSPLL_OSC_1H
;baud EQU .16 ; for 115200
;baud EQU .34 ; for 57600
;baud EQU .52 ; for 38400
;baud EQU .103 ; for 19200
baud EQU .207 ;for 9600
; The above 3 lines can be changed and buid a bootloader for the desired frequency (and PIC type)
;view with TabSize=4
;&&&&&&&&&&&&&&&&&&&&&&& START &&&&&&&&&&&&&&&&&&&&&&
;---------------------- Bootloader ----------------------
;PC_flash: C1h U H L x ... <64 bytes> ... crc
;PC_eeprom: C1h 40h EEADR EEDATA 0 crc
;PC_cfg C1h U OR 80h H L 1 byte crc
;PIC_response: type K
ORG first_address ;space to deposit first 4 instr. of user prog.
nop
nop
nop
nop
ORG first_address+8
IntrareBootloader
;switch internal oscillator to 8MHz
setf OSCCON
;init serial port
movlw b'00100100'
movwf TXSTA
movlw b'10010000'
movwf RCSTA
bsf BAUDCON, BRG16
movlw baud
movwf SPBRG
;wait for computer
rcall Receive
sublw 0xC1 ;Expect C1h
bnz way_to_exit
SendL IdTypePIC ;send PIC type
MainLoop
SendL 'K' ; "-Everything OK, ready and waiting."
rptc
btfss PIR1,RCIF ;test RX
bra notrcv
movf RCREG,w ;return read data in W
addwf crc,f ;compute crc
return
notrcv
decfsz cnt3
bra rptc
decfsz cnt2
bra rpt3
decfsz cnt1
bra rpt2
;timeout:
way_to_exit
bcf RCSTA, SPEN ; deactivate UART
bra first_address
;*********
; After reset
; Do not expect the memory to be zero,
; Do not expect registers to be initialised like in catalog.
END
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dan!, I've tried with tinybld18F2620-4620-4680.asm in the Tiny_Avr-Pic_Bootloader+ (v0.8.3) and the software doesn't recognize my PIC and with the previous bootloader yes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dears,
I'm trying to get the bootloader running in UART mode for a PIC32MX795F512L. I need to make some modifications on the original code, because I'm using the UART1 instead of UART2, and I would prefer a baud rate of 38400 / 57600 instead of the faster 115200. So I opened up the project, make some change, for example lighting up my LED, and all the communication setting I need, recompiled it with success and downloaded it. no way, it seems the bootloader is not starting, the board seems to be dead. Any tips?
Davide
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
For those who want to try "Tiny PIC Bootloader +" but don't know where to start, there is now a "Quickstart guide" in the web site: http://tinypicbootload.sourceforge.net/quickstart.html
Best regards,
Edorul
Hi! I'm try to use Tiny PIC Bootloader+, I have been reading the Quickstart guide and I made the steps but the Tiny PIC Bootloader says:
"Check Device...
Open COM4 serial port at 9600bd
Software reseting Device
Error: No Device Detected!!!
Verify: - COM number
- baud rate
- if Device was reseted less than 1sec ago
(do you need to check "RST Reset"?)
- if TinyBootloader firmware is correctly
programmed into Device
Close COM4 serial port"
In the bootloader program:
I check the device and Baud rate
I conected the MCLR pin to RST of the DB9 like can see in the http://tinypicbootload.sourceforge.net/hardware_connection.html page, so anyidea, what could be my problem?
Try disabling RTS reset and do a manual reset. A delay is required after
RTS reset for the timings to be right which is disabled in the current
version of PC software.
Sunish
On Tue, Dec 3, 2013 at 4:34 AM, Cristy piki4@users.sf.net wrote:
Hi!, I used other bootloader to my PIc and works, The Tiny PIC Bootloader recongnizes my PIC, now the problem is the program says "Error: Hex file for PIC16F, PIC family mismatch." and both programs are to PIC182620 , I don't understand what's wrong?...
Which compiler are you using ? Are the pragmas right ?
Hi,Cristy,
"Error: Hex file for PIC18F, PIC family mismatch."
appears because there is a bug in the "check file" procedure in TinyBootloader+
http://sourceforge.net/p/tinypicbootload/discussion/help/thread/709981f3/
Sunish Issac.- I used Mplab IDE with MPASMWIN, and I don't know what do you mean with: Are the pragmas right ? sorry .
Dan .- Hi!, I have troubles when I press "write device", when I press "Check device" all is good, but when I want to write so I have problems, It's the same that you say?
Hello Cristy,
Yes it's the same Dan told you about.
Sorry for the inconvenience but it won't be fixed quickly :-(
So for the moment, just uncheck "check file" in "transfert options".
Best regards,
Edorul
This is the process:
Check Device...
Open COM4 serial port at 19200bd
Software reseting Device
Device answer: 0x4F 0x4B='K'
byte OK, now check ID-code and Family...
idCode = $4F
family = C
description = 18F 2620/4620/4680
flash mem = 65536 bytes
EEPROM mem = 1024 bytes
Bootloader size = 200 bytes
Transfert block size = 64 bytes
Found: 18F 2620/4620/4680
Open HEX file: C:\Proyecto_bootloader\main.hex
Checking hex file:
Hex file end line
Comment in file: ;PIC18F2620
Comment in file: ;CRC=AE24 CREATED="05-dic-13 10:33"
HEX sumary: INX32M,
PIC16F + cfg,
total=598 bytes.
Error: Hex file for PIC16F, PIC family mismatch.
Close COM4 serial port
I download the v0.8.1 version and works !! :)
Thanks!! :D
Hi again !
It won't be OK for all PIC devices... you can still have a "PIC family mismatch" error.
As said before, just uncheck "check file" in "transfert options".
Best regards,
Edorul
Last edit: edorul 2013-12-12
Hi!, One question.. I need to add something in the code to program?, I mean, it's necesary jump to a direction of memory in PIC?
Hi,Cristy
++ Constraints on source program created in PIC18F ++
1.With or without interrupt use, describes the instruction 'goto' four words beginning.
2.You can not describe the relative jump instruction in four words beginning.(rcall,bra)
3.Maximum program size = max_flash_size - bootloader_size
source Example
[good]
0000:call AAA
0002:goto INIT
[good]
0000:goto INIT
[NG]
0000:rcall AAA
0001:rcall BBB
0002:goto INIT
[NG]
0000:call AAA
0002:bra INIT
[NG]
0000:bra INIT
Reference:
Tiny_Avr-Pic_Bootloader+ (v0.8.1)/docs/Fctmt_Bootloader_PIC_AVR.xls
Last edit: Dan 2013-12-07
Hello Dan !
Thanks for this answer!!! I'll put it in this web page:
http://tinypicbootload.sourceforge.net/tested_compilers_pic.html
Best regards,
Edorul
Hi again! :) Finally I can programm my pic, but it doesn't work like should it.. Somebody can help me please! somebody had the same problem ?
Hi,Piki
After compiling the source of you,
Please describe the first four words of assembler code.
This is the bootloader that I had used...
radix DEC
LIST P=18F4620 ; change also: Configure->SelectDevice from Mplab
xtal EQU 32000000 ; you may want to change: _XT_OSC_1H _HS_OSC_1H _HSPLL_OSC_1H
;baud EQU .16 ; for 115200
;baud EQU .34 ; for 57600
;baud EQU .52 ; for 38400
;baud EQU .103 ; for 19200
baud EQU .207 ;for 9600
; The above 3 lines can be changed and buid a bootloader for the desired frequency (and PIC type)
;----------------------------- PROGRAM ---------------------------------
cblock 0
crc
i
cnt1
cnt2
cnt3
counter_hi
counter_lo
flag
endc
cblock 10
buffer:64
endc
SendL macro car
movlw car
movwf TXREG
endm
;0000000000000000000000000 RESET 00000000000000000000000000
;view with TabSize=4
;&&&&&&&&&&&&&&&&&&&&&&& START &&&&&&&&&&&&&&&&&&&&&&
;---------------------- Bootloader ----------------------
;PC_flash: C1h U H L x ... <64 bytes> ... crc
;PC_eeprom: C1h 40h EEADR EEDATA 0 crc
;PC_cfg C1h U OR 80h H L 1 byte crc
;PIC_response: type
K
IntrareBootloader
;switch internal oscillator to 8MHz
setf OSCCON
;init serial port
movlw b'00100100'
movwf TXSTA
movlw b'10010000'
movwf RCSTA
bsf BAUDCON, BRG16
movlw baud
movwf SPBRG
;wait for computer
rcall Receive
sublw 0xC1 ;Expect C1h
bnz way_to_exit
SendL IdTypePIC ;send PIC type
MainLoop
SendL 'K' ; "-Everything OK, ready and waiting."
mainl
clrf crc
rcall Receive ;Upper
movwf TBLPTRU
movwf flag ;(for EEPROM and CFG cases)
rcall Receive ;Hi
movwf TBLPTRH
movwf EEADR ;(for EEPROM case)
rcall Receive ;Lo
movwf TBLPTRL
movwf EEDATA ;(for EEPROM case)
rcvoct ;read 64+1 bytes
movwf TABLAT ;prepare for cfg; => store byte before crc
rcall Receive
movwf PREINC0
decfsz i
bra rcvoct
noeeprom
btfss flag,7 ;is CFG data?
bra noconfig
tblwt ;write TABLAT(byte before crc) to TBLPTR**
movlw b'11000100' ;Setup cfg
rcall Write
bra waitwre
noconfig
;write
eraseloop
movlw b'10010100' ; Setup erase
rcall Write
TBLRD*- ; point to adr-1
writebigloop
movlw 8 ; 8groups
movwf counter_hi
lfsr FSR0,buffer
writesloop
movlw 8 ; 8bytes = 4instr
movwf counter_lo
writebyte
movf POSTINC0,w ; put 1 byte
movwf TABLAT
tblwt+*
decfsz counter_lo
bra writebyte
waitwre
;btfsc EECON1,WR ;for eeprom writes (wait to finish write)
;bra waitwre ;no need: round trip time with PC bigger than 4ms
ziieroare ;CRC failed
SendL 'N'
bra mainl
;* procedures *****
Write
movwf EECON1
movlw 0x55
movwf EECON2
movlw 0xAA
movwf EECON2
bsf EECON1,WR ;WRITE
nop
;nop
return
Receive
movlw xtal/2000000+1 ; for 20MHz => 11 => 1second delay
movwf cnt1
rpt2
clrf cnt2
rpt3
clrf cnt3
rptc
btfss PIR1,RCIF ;test RX
bra notrcv
movf RCREG,w ;return read data in W
addwf crc,f ;compute crc
return
notrcv
decfsz cnt3
bra rptc
decfsz cnt2
bra rpt3
decfsz cnt1
bra rpt2
;timeout:
way_to_exit
bcf RCSTA, SPEN ; deactivate UART
bra first_address
;*********
; After reset
; Do not expect the memory to be zero,
; Do not expect registers to be initialised like in catalog.
And my code that I want to program is C not assembler.. What I can do?
hi,Piki
I have written your firmware.
Transfer format of the EEPROM has changed in Tiny AVR / PIC Bootloader +.
Please perform the source change based on tinybld18F2620-4620-4680.asm that is attached to the Tiny AVR / PIC Bootloader +
Hi Dan!, I've tried with tinybld18F2620-4620-4680.asm in the Tiny_Avr-Pic_Bootloader+ (v0.8.3) and the software doesn't recognize my PIC and with the previous bootloader yes.
Dears,
I'm trying to get the bootloader running in UART mode for a PIC32MX795F512L. I need to make some modifications on the original code, because I'm using the UART1 instead of UART2, and I would prefer a baud rate of 38400 / 57600 instead of the faster 115200. So I opened up the project, make some change, for example lighting up my LED, and all the communication setting I need, recompiled it with success and downloaded it. no way, it seems the bootloader is not starting, the board seems to be dead. Any tips?
Davide
Never mind, I got it working.