I introduce it because we succeeded in developing a 84 word firmware in PIC10F322.
[Way of thinking]
1 second loop using cnt1, cnt2, cnt3 the Receive routine requires a lot of code.
To shorten the code using the WDT (2 seconds initial).
[Before]
IntrareBootloader:
clrf ANSELA ; digital I/O
#ifdef Direct_TX
bcf LATA,TX
#else
bsf LATA,TX
#endif
bcf TRISA,TX ; set TX Port
call Receive ; init int clock & serial port
; wait for computer
sublw 0xC1 ; Expect C1
skpz
goto way_to_exit ; connection errer or timeout
Hi Dan, i have been trying for months on increasing the TinyBootloader size from 100words to about 200words for PIC18, what do i need to change in the code and PC Software?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My Tiny Bootloader software will show "Error: hex file too large, writing bootloader firmware" error message when uploading if code is more than 2000h of the program memory space.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,All,
I introduce it because we succeeded in developing a 84 word firmware in PIC10F322.
[Way of thinking]
1 second loop using cnt1, cnt2, cnt3 the Receive routine requires a lot of code.
To shorten the code using the WDT (2 seconds initial).
[Before]
IntrareBootloader:
clrf ANSELA ; digital I/O
#ifdef Direct_TX
bcf LATA,TX
#else
bsf LATA,TX
#endif
bcf TRISA,TX ; set TX Port
call Receive ; init int clock & serial port
; wait for computer
sublw 0xC1 ; Expect C1
skpz
goto way_to_exit ; connection errer or timeout
Receive: movlw xtal/2000000+1 ; for 20MHz => 11 => 1second
movwf cnt1
rpt2: clrf cnt2
rpt3: clrf cnt3
rptc: ; check Start bit
#ifdef Direct_RX
btfss PORTA,RX
#else
btfsc PORTA,RX
#endif
goto $+4
call r1rx11 ; recive data
addwf crc,f ; compute checksum
return
way_to_exit: goto first_address ; timeout:exit in all other cases
[After]
IntrareBootloader:
btfss STATUS,NOT_TO
goto first_address ; connection errer or timeout
#ifdef Direct_TX
bcf LATA,TX
#else
bsf LATA,TX
#endif
bcf TRISA,TX ; set TX Port
call Receive ; init int clock & serial port
; wait for computer
sublw 0xC1 ; Expect C1
skpz
goto first_address ; connection errer or timeout
Receive: bsf WDTCON,SWDTEN ; start WDT(2s)
Last edit: Dan 2013-12-08
Adding.
I was able PIC12F1822, PIC16F1823 also fit into 84 words.
Although I checked the writing of EEPROM,
It will fail if attempted to write EEPROM in V0.8.0 or later.
I made sure to write the EEPROM in V0.7.1.
Changes in V0.7.1
①Change of source
B --> K
②Add to piccodes.ini
$19, B, 12F 1822(84W), $1000, 256, 168, 32,
$37, B, 16F 1823(84W), $1000, 256, 168, 32,
Hi,ALL,
It is a bootloader for ATTINY13A/84Words.
The addition of a slight modification,
applicable to the following ATTINY.
ATTINY24A
ATTINY25
ATTINY261A
Hi,ALL,
There was a small bug in the firmware of PIC16F1823 and PIC12F1822.
[Contents of the bug]
It rewrite the 01Dh without rewriting the RCSTA (19Dh) to WDT reset after detection.
I will up the bug fix products.
[Change]
RCSTA because it is cleared by WDT reset,
I have changed the jump destination of the WDT reset after detection.
There is no effect on the operation even if there is a bug,
because it has not yet been implemented 01Dh
Hi,All,
There was a bug in the firmware of ATTINY13A.
(This does not affect the behavior.)
[Contents of the bug]
Code jump to the bootloader is wrong.
; RJMP IntrareBootloader
.dw 0xcf9f ;RJMP PC-0x60
-------------------------->
; RJMP IntrareBootloader
.dw 0xcfaf ;RJMP PC-0x50
I attach the modified version.
Hello Dan!
Thanks for these firmwares :-)
I'll put them in the next release of TinyBootloader+
Best regards,
Edorul
Last edit: edorul 2013-12-12
Hi Dan, i have been trying for months on increasing the TinyBootloader size from 100words to about 200words for PIC18, what do i need to change in the code and PC Software?
Why? The bootloader is intended to be less that 100words - why increase?
Please explain rational for the ask.
Thank you Anobium for the reply,
My Tiny Bootloader software will show "Error: hex file too large, writing bootloader firmware" error message when uploading if code is more than 2000h of the program memory space.