In order to take advantage of low memory chip, the following considerations are valid.
①By reducing as much as possible the size of the boot loader, to expand the user program area.
②Enable user programs from the resources of the bootloader inside.(IAP)
For ATtiny13A and PIC10F322, in the revision of this up,
I was able to create the firmware to balance the above-mentioned items.
hI,All
I have updated the firmware. (Attiny2313A,ATtiny4313)
To perform a review of the code,
I have to to disable the UART at the exit of the bootloader.
Last edit: Dan 2014-06-02
Hi,All
I have update the firmware. (Pic10F322,ATtiny13A)
Code review.
IAP of serial routine.(SendL,RcvL).
Last edit: Dan 2014-06-04
Supplement
In order to take advantage of low memory chip, the following considerations are valid.
①By reducing as much as possible the size of the boot loader, to expand the user program area.
②Enable user programs from the resources of the bootloader inside.(IAP)
For ATtiny13A and PIC10F322, in the revision of this up,
I was able to create the firmware to balance the above-mentioned items.
(1)Serial transmission:SendL
+------------+-----------+-----------+------------+
| MPU |IAP Address| Work Reg | Constraint |
+------------+-----------+-----------+------------+
| PIC10F322 | 0x01E2 | 0x7E/0x7F | No |
+------------+-----------+-----------+------------+
| ATtiny13A | 0x01F0 |r23/r24/r25| No |
+------------+-----------+-----------+------------+
(PIC10F322)
movlw 'T'
call SendL
(ATtiny13A)
ldi r25,'T'
rcall SendL
(2)Serial reception:RcvL
+------------+-----------+-----------+------------------------+
| MPU |IAP Address| Work Reg | Constraint |
+------------+-----------+-----------+------------------------+
| PIC10F322 | 0x01D3 | 0x7E/0x7F | No |
+------------+-----------+-----------+------------------------+
| ATtiny13A | 0x01DE |r23/r24/r25|Yes:clear Temporary Flag|
+------------+-----------+-----------+------------------------+
(PIC10F322)
call RcvL ;Return in W and 0x7F
(ATtiny13A)
clt ;Clear Temporary Flag (only once)
rcall RcvL ;return in r25
(3)flash erase/write buffer/write page
:wr_e,wr_l,wr_w,Flash_Sequence
+------------+------------+-----------+------------+
| MPU |IAP Address | Work Reg | Constraint |
+------------+------------+-----------+------------+
| PIC10F322 |0x01F4/F5/F6| No | No |
+------------+------------+-----------+------------+
| ATtiny13A | 0x01DA | r22 | No |
+------------+------------+-----------+------------+
(PIC10F322)
movlw VVVV
movwf PMADRH
movlw WWWW
movwf PMADRL
movlw XXXX
movwf PMDATH
movlw YYYY
movwf PMDATL
call wr_w
(ATtiny13A)
ldi r31,VVVV
ldi r30,WWWW
mov r1,rX
mov r0,rY
ldi r22,5
rcall Flash_Sequence
Last edit: Dan 2014-06-05
Hi,All
I have updated the firmware.(PIC12F1822,PIC16F1823)
In the previous revision,
I was able to reduced to 84 words a code size using the WDT,
but I produce side effects.
Since the reset /MCLR and reset WDT is indistinguishable in PIC,
reset /MCLR did not work with the previous firmware.
The code shortening, I was able to solve this problem in this revision.
(Not use the reset WDT.)
Hi,All
I have updated the firmware of the beta version.
Review of the existing firmware.
New Device:PIC16F1703,1704,1705,1707,1708,1709,1713,1716,1717,1718,1719
Hi,All
I have updated the firmware.(PIC16F14XX,PIC16F15XX)
It reduces the size of the firmware, it was able to be modified by the user.
Hi,All
I have updated the firmware.
PIC12F617/752
Code review
PIC16F819
132Words -> 100Words
PIC16F872
116Words -> 100Words
There is a need to change the piccodes.ini.
; PIC12 family
$17, B, 12F 752/1501/1571, $800, 0, default, 32,
$18, B, 12F 617/1612, $1000, 0, default, 32,
; PIC16 family
$34, B, 16F 818, $800, $080, 264, 64,
$35, B, 16F 819, $1000, $080, 264, 64,
$39, B, 16F 753, $1000, 0, default, 32,
$3F, B, 16F 872(116w), $1000, $40, 232, 32,
---------------------------------------------->
; PIC12 family
$17, B, 12F 1501/1571, $800, 0, default, 32,
$18, B, 12F 1612, $1000, 0, default, 32,
$1B, B, 12F 617, $1000, 0, default, 8,
$1C, B, 12F 752, $800, 0, default, 8,
; PIC16 family
$34, B, 16F 818, $800, $080, default, 64,
$35, B, 16F 819, $1000, $080, default, 64,
$39, B, 16F 753, $1000, 0, default, 8,
$3F, B, 16F 872, $1000, $40, default, 2,
The firmware update is complete.
Hi,All
I will add a file update.
16F882-883-884-886-887
I was fixed because there was a bug.
(Not use the reset WDT.)