SELECTEUSART precompiler define selects TX/RX STA/BRG/REG registers properly, however RX test on PIR1 is only for UART1 and should be PIR3 test (same bit #) on UART2. Perhaps add a #define _PIR PIR1 or #define _PIR PIR3 and btfss _PIR, RCIF accordingly (or make the _RCIF select from RCIF/RC2IF, but it's the same bit)
Last edit: Dmitri Kisten 2016-01-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, got it. Furthermore, not sure if I did something wrong but, 128 chunk length didn't work for me. I can confirm pic18F86k22 as a tested device with adjusted chunk len to 64
$6E, C, 18F w/64KB flash & 1024B EEPROM, $10000, $400, 264, 64.
and in asm file accordingly buffer:64
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SELECTEUSART precompiler define selects TX/RX STA/BRG/REG registers properly, however RX test on PIR1 is only for UART1 and should be PIR3 test (same bit #) on UART2. Perhaps add a #define _PIR PIR1 or #define _PIR PIR3 and btfss _PIR, RCIF accordingly (or make the _RCIF select from RCIF/RC2IF, but it's the same bit)
Last edit: Dmitri Kisten 2016-01-12
Hi,Dmitri
This bug has already been measures.
Please try the following.
http://sourceforge.net/p/tinypicbootload/discussion/devices/thread/19d5ece8/
2015.03.22.zip
Ok, got it. Furthermore, not sure if I did something wrong but, 128 chunk length didn't work for me. I can confirm pic18F86k22 as a tested device with adjusted chunk len to 64
$6E, C, 18F w/64KB flash & 1024B EEPROM, $10000, $400, 264, 64.
and in asm file accordingly buffer:64
Hi,Dmitri
What you say is correct!!
In Dan_tinybld18F65K22-85K22-66K22-86K22-67K22-87K22_int16MHz_19200_r4.asm
Table was incorrect!!
The erase blocks are:
PIC18FX5K22 and PIC18FX6K22 32 words or 64 bytes
PIC18FX7K22 64 words or 128 bytes
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
; |IdTypePIC| Device | Write_Page | Erase_Page | TX1/TX2 | RX1/RX2 | max_flash | EEPROM | TQFP |
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
; | 0x6C |18F65K22| 32 words | 32 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x8000 | 1024 | 64 |
; | 0x6D |18F85K22| 64 words | 64 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x8000 | 1024 | 80 |
; | 0x66 |18F66K22| 32 words | 32 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x10000 | 1024 | 64 |
; | 0x6E |18F86K22| 64 words | 64 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x10000 | 1024 | 80 |
; | 0x69 |18F67K22| 32 words | 32 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x20000 | 1024 | 64 |
; | 0x6F |18F87K22| 64 words | 64 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x20000 | 1024 | 80 |
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
-------------------->
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
; |IdTypePIC| Device | Write_Page | Erase_Page | TX1/TX2 | RX1/RX2 | max_flash | EEPROM | TQFP |
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
; | 0x6C |18F65K22| 32 words | 32 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x8000 | 1024 | 64 |
; | 0x6C |18F85K22| 32 words | 32 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x8000 | 1024 | 80 |
; | 0x66 |18F66K22| 32 words | 32 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x10000 | 1024 | 64 |
; | 0x66 |18F86K22| 32 words | 32 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x10000 | 1024 | 80 |
; | 0x6F |18F67K22| 64 words | 64 words |C6(31)/G1(4) |C7(32)/G2(5) | 0x20000 | 1024 | 64 |
; | 0x6F |18F87K22| 64 words | 64 words |C6(37)/G1(6) |C7(38)/G2(7) | 0x20000 | 1024 | 80 |
; +---------+--------+------------+------------+-------------+-------------+-----------+--------+------+
Thank you.
Dan