I attach the firmware and modified version host program.
The host program the previous presentation, reset by the RTS was disabled.
(Reset by the DTR is enabled.)
------------->
I was back to the original specification in a modified version of this.
Because I can cope with PIC device of all the Tiny AVR/PIC Bootloader+,
for data transfer format, I will summarize here.
Action command does not exist in Tiny AVR/PIC Bootloader+.
Rather than a command from the host side, perform firmware is necessary to erase flash memory.
1.The type of data transfer
There are three data to be transferred from Tiny AVR/PIC Bootloader+ host.
①Flash Data
②EEPROM Data
③Config Data (24-bit PIC and PIC18F)
Represents the character of one byte [] below.
2.Data format of 14-bit PIC (PIC10F/12F/16F), "B"-Family
①Flash transfer format: [AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressH] Start address of the flash page to override the data. (upper) [AddressL] Start address of the flash page to override the data. (lower) [2*N] Number of transfers of data as described in piccode.ini. (byte notation) [DataL/H(n)] Rewrite data (2*N)bytes. [SUM] Checksum.
②EEPROM transfer format: [EEAddressH][EEAddressL][2][EEData][0][SUM]
[EEAddressH] Address of the EEPROM to override the data | 0x40 (upper) [EEAddressL] Address of the EEPROM to override the data. (lower) EEAddressH:EEAddressL >= 0x4000 [2] Number of data transfers. (Always 2) [EEData] EEPROM 8-bit data to be rewritten. [0] Always 0. [SUM] Checksum.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
①Flash transfer format: [AddressU][AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressU] Start address of the flash page to override the data. (upper) [AddressH] Start address of the flash page to override the data. (middle) [AddressL] Start address of the flash page to override the data. (lower) [2*N] Number of transfers of data as described in piccode.ini. (byte notation) [DataL/H(n)] Rewrite data (2*N)bytes. [SUM] Checksum.
②EEPROM transfer format: [EEAddressU][EEAddressH][EEAddressL][1][EEData][SUM]
[EEAddressU] Address of the EEPROM to override the data | 0x40. (upper) [EEAddressH] Address of the EEPROM to override the data. (middle) [EEAddressL] Address of the EEPROM to override the data. (lower)
EEAddressU:EEAddressH:EEAddressL >= 0x400000 [1] Number of data transfers. (Always 1) [EEData] EEPROM 8-bit data to be rewritten. [SUM] Checksum.
③Config transfer format: [CFGAddressU][CFGAddressH][CFGAddressL][14][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(7)][CFGDataH(7)][SUM]
[CFGAddressU] Start address of the Config data to overwrite the data | 0x80. (upper) [CFGAddressH] Start address of the Config data to overwrite the data. (middle) [CFGAddressL] Start address of the Config data to overwrite the data. (lower)
CFGAddressU:CFGAddressH:CFGAddressL >= 0x800000 [14] Number of data transfers. (Always 14) [CFGData(n)] Rewrite data (2*7)bytes. [SUM] Checksum.
4.Data format of 16-bit PIC (PIC18F-J), "J"-Family
①Flash transfer format: [AddressU][AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressU] Start address of the flash page to override the data. (upper) [AddressH] Start address of the flash page to override the data. (middle) [AddressL] Start address of the flash page to override the data. (lower) [2*N] Number of transfers of data as described in piccode.ini. (byte notation) [DataL/H(n)] Rewrite data (2*N)bytes. [SUM] Checksum.
②Config transfer format: [CFGAddressU][CFGAddressH][CFGAddressL][8][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(4)][CFGDataH(4)][SUM]
[CFGAddressU] Start address of the Config data to overwrite the data | 0x80. (upper) [CFGAddressH] Start address of the Config data to overwrite the data. (middle) [CFGAddressL] Start address of the Config data to overwrite the data. (lower)
CFGAddressU:CFGAddressH:CFGAddressL >= 0x800000 [8] Number of data transfers. (Always 8) [CFGData(n)] Rewrite data (2*4)bytes. [SUM] Checksum.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
①Flash transfer format: [AddressL][AddressH][AddressU][3*N][DataL(1)][DataH(1)][DataU(1)]....[DataL(N)][DataH(N)][DataU(N)][SUM]
[AddressL] Start address of the flash page to override the data. (lower) [AddressH] Start address of the flash page to override the data. (middle) [AddressU] Start address of the flash page to override the data. (upper) [3*N] Number of transfers of data as described in piccode.ini. (byte notation) [DataL/H/U(n)] Rewrite data (3*N)bytes. [SUM] Checksum.
②EEPROM transfer format: [EEAddressL][EEAddressH][EEAddressU][2][EEDataL][EEDataH][SUM]
[EEAddressL] Address of the EEPROM to override the data (lower). [EEAddressH] Address of the EEPROM to override the data (middle). [EEAddressU] Address of the EEPROM to override the data (upper). [2] Number of data transfers. (Always 2) [EEDataL/H] EEPROM 16-bit data to be rewritten. [SUM] Checksum.
③Config transfer format: [CFGAddressL][CFGAddressH][CFGAddressU][18][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(9)][CFGDataH(9)][SUM]
[CFGAddressL] Start address of the Config data to overwrite the data. (lower) [CFGAddressH] Start address of the Config data to overwrite the data. (middle) [CFGAddressU] Start address of the Config data to overwrite the data. (upper) [18] Number of data transfers. (Always 18) [CFGDataL/H(n)] Rewrite data (2*9)bytes. [SUM] Checksum.
6.Data format of 24-bit PIC, "E"-Family
①Flash transfer format: [AddressL][AddressH][AddressU][3*N][DataL(1)][DataH(1)][DataU(1)]....[DataL(N)][DataH(N)][DataU(N)][SUM]
[AddressL] Start address of the flash page to override the data. (lower) [AddressH] Start address of the flash page to override the data. (middle) [AddressU] Start address of the flash page to override the data. (upper) [3*N] Number of transfers of data as described in piccode.ini. (byte notation) [DataL/H/U(n)] Rewrite data (3*N)bytes. [SUM] Checksum.
②Config transfer format: [CFGAddressL][CFGAddressH][CFGAddressU][30][CFGDataL(1)][CFGDataH(1)][CFGDataU(1)].....[CFGDataL(10)][CFGDataH(10)][CFGDataU(10)][SUM]
[CFGAddressL] Start address of the Config data to overwrite the data. (lower) [CFGAddressH] Start address of the Config data to overwrite the data. (middle) [CFGAddressU] Start address of the Config data to overwrite the data. (upper) [30] Number of data transfers. (Always 30) [CFGDataL/H/U(n)] Rewrite data (3*10)bytes. [SUM] Checksum.
Last edit: Dan 2014-06-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a lot for the new "D" and "E" families support in TinyBootloader+, the new firmwares and all the updates you made! You're great!!! I hope we'll meet one day :-)
So, by now I'm gathering everything from your posts and I'll post a v0.9.0 with all your addons.
Best regards,
Edorul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I downloaded the code looking for the (partial) support of the dsPIC33E chips, and under the Type D folder, there are no files! Did these get dropped somewhere?
I've been trying to modify MicroChip's dsPIC33E bootloaders, but have had little success--was hoping that Tiny Multi Bootloader+ might be the answer...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
Firmware size can not be freely selected.
If the erase/write unit is 16 words
84, 100, 116, 132 ...
If the erase/write unit is 32 words
100, 132, 164, ....
If the erase/write unit is 64 words
132, 196, .........
Please make it to be N x U + 4 for erase/write unit U. (N = 1, 2, 3, ....)
2.Change piccodes.ini
Even if the corresponding device already exists, assign another number.
The following is an example of PIC10F322
Thank you Dan, That information was very helpful, so i can adjust the firmware size from the piccodes.ini only or do i need to change any other thing in the PC software?
i really appreciate your reply.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Dan, Thank You for your replies, but when i inserted the example you gave to me and try to write into the MCU, i still get this error messages "Error: hex file too large, writing bootloader firmware!!!
* Error: problem in writing MCU memory!!!"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
radixDECLISTP=18F452;changetheselinesaccordinglytoyourapplication#include "p18f452.inc"IdTypePIC=0x41;mustexistsin"piccodes.ini"#define max_flash 0x8000 ; in BYTES!!! (= 'max flash memory' from "piccodes.ini")xtalEQU20000000;youmaywanttochange:_XT_OSC_1H_HS_OSC_1H_HSPLL_OSC_1HbaudEQU115200;standardTinyBldbaudrates:115200or19200;Theabove5linescanbechangedandbuidabootloaderforthedesiredfrequency(andPICtype);********************************************************************;TinyBootloader18FseriesSize=100words;claudiu.chiculita@ugal.ro;http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm;;modifiedbyEdorul:;EEPROMwriteisonlycompatiblewith"Tiny PIC Bootloader+";http://sourceforge.net/projects/tinypicbootload/;********************************************************************#include "spbrgselect.inc" ; RoundResult and baud_rate#define first_address max_flash-180 ;100 words changed from 200__CONFIG_CONFIG1H,_OSCS_OFF_1H&_HS_OSC_1H__CONFIG_CONFIG2L,_BOR_ON_2L&_BORV_20_2L&_PWRT_ON_2L__CONFIG_CONFIG2H,_WDT_OFF_2H&_WDTPS_128_2H__CONFIG_CONFIG4L,_STVR_ON_4L&_LVP_OFF_4L&_DEBUG_OFF_4L;-----------------------------PROGRAM---------------------------------cblock0crcicnt1cnt2cnt3counter_hicounter_loflagendccblock10buffer:64dummy4crcendcSendLmacrocarmovlwcarmovwfTXREGendm;0000000000000000000000000RESET00000000000000000000000000ORG0x0000GOTOIntrareBootloader;viewwithTabSize=4;&&&&&&&&&&&&&&&&&&&&&&&START&&&&&&&&&&&&&&&&&&&&&&;----------------------Bootloader----------------------;PC_flash:C1hUHLx...<64bytes>...crc;PC_eeprom:C1h40hEEADRHEEADR1EEDATAcrc;PC_cfgC1hUOR80hHL1bytecrc;PIC_response:type`K`ORGfirst_address;spacetodepositfirst4instr.ofuserprog.nopnopnopnoporgfirst_address+8IntrareBootloader;initserialportmovlwb'00100100'movwfTXSTAmovlwspbrg_valuemovwfSPBRGmovlwb'10010000'movwfRCSTA;waitforcomputerrcallReceivesublw0xC1;ExpectC1hbnzway_to_exitSendLIdTypePIC;sendPICtypeMainLoopSendL'K';"-Everything OK, ready and waiting."mainlclrfcrcrcallReceive;UppermovwfTBLPTRUmovwfflag;(forEEPROMandCFGcases)rcallReceive;HimovwfTBLPTRHrcallReceive;LomovwfTBLPTRLmovwfEEADR;(forEEPROMcase)rcallReceive;countmovwfiincfilfsrFSR0,(buffer-1)rcvoct;read64+1bytesmovwfTABLAT;prepareforcfg;=>storebytebeforecrcrcallReceivemovwfPREINC0btfssi,0;don't know for the moment but in case of EEPROM data presence... movwf EEDATA ;...then store the data byte (and not the CRC!) decfsz i bra rcvoct tstfsz crc ;check crc bra ziieroare btfss flag,6 ;is EEPROM data? bra noeeprom movlw b'00000100' ;Setup eeprom rcall Write bra waitwrenoeeprom;----no CFG write in "Tiny PIC Bootloader+"; 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;---- ;writeeraseloop movlw b'10010100' ; Setup erase rcall Write TBLRD*- ; point to adr-1writebigloop movlw 8 ; 8groups movwf counter_hi lfsr FSR0,bufferwritesloop movlw 8 ; 8bytes = 4instr movwf counter_lowritebyte movf POSTINC0,w ; put 1 byte movwf TABLAT tblwt+* decfsz counter_lo bra writebyte movlw b'10000100' ; Setup writes rcall Write decfsz counter_hi bra writesloopwaitwre ;btfsc EECON1,WR ;for eeprom writes (wait to finish write) ;bra waitwre ;no need: round trip time with PC bigger than 4ms bcf EECON1,WREN ;disable writes bra MainLoopziieroare ;CRC failed SendL 'N' bra mainl;******** procedures ******************Write movwf EECON1 movlw 0x55 movwf EECON2 movlw 0xAA movwf EECON2 bsf EECON1,WR ;WRITE nop ;nop returnReceive movlw xtal/2000000+1 ; for 20MHz => 11 => 1second delay movwf cnt1rpt2 clrf cnt2rpt3 clrf cnt3rptc btfss PIR1,RCIF ;test RX bra notrcv movf RCREG,w ;return read data in W addwf crc,f ;compute crc returnnotrcv 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,All
I was successful in writing flash of dsPIC30.
I verified the Config and EEPROM current.
Contributions Once I have completed.
I think to become a template for 24/24H/dsPIC33.
Last edit: Dan 2014-06-14
Hi,All
dsPIC30 corresponding version was completed.
I attach the host program.
and ds30F3012's firmware.
and ds33FJ128GP202's firmware.
(If you create the firmware, also corresponds to the writing of the PIC24.)
My Change: //$nn
Details of the changes described in the ReadMe.txt
Last edit: Dan 2014-06-18
Hi,All
I was able to operate also confirmed PIC24HJ12GP202.
Corresponding to the D type is almost complete.
Hi,All
Distinction of the E-type and D-type.
Relationship with the E-type and D-type is similar to the relationship of PIC18J and PIC18.
"Frash Config Words" does not exist in the D-type.
[Device corresponding to the D-type]
dsPIC30F
PIC24F
PIC24FV
PIC24HJ
PIC24E(Partial)
dsPIC33F(Partial)
dsPIC33E(Partial)
[Device corresponding to the E-type]
PIC24FJ
PIC24E(Partial)
dsPIC33F(Partial)
dsPIC33E(Partial)
Last edit: Dan 2014-06-18
Hi,All
Modified the host program, I also support E-Type.
I attach the firmware and modified version host program.
The host program the previous presentation, reset by the RTS was disabled.
(Reset by the DTR is enabled.)
------------->
I was back to the original specification in a modified version of this.
Source Changes:
//$nn ---> //$#nn
Hi,All
Because I can cope with PIC device of all the Tiny AVR/PIC Bootloader+,
for data transfer format, I will summarize here.
Action command does not exist in Tiny AVR/PIC Bootloader+.
Rather than a command from the host side, perform firmware is necessary to erase flash memory.
1.The type of data transfer
There are three data to be transferred from Tiny AVR/PIC Bootloader+ host.
①Flash Data
②EEPROM Data
③Config Data (24-bit PIC and PIC18F)
Represents the character of one byte [] below.
2.Data format of 14-bit PIC (PIC10F/12F/16F), "B"-Family
①Flash transfer format:
[AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressH] Start address of the flash page to override the data. (upper)
[AddressL] Start address of the flash page to override the data. (lower)
[2*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H(n)] Rewrite data (2*N)bytes.
[SUM] Checksum.
②EEPROM transfer format:
[EEAddressH][EEAddressL][2][EEData][0][SUM]
[EEAddressH] Address of the EEPROM to override the data | 0x40 (upper)
[EEAddressL] Address of the EEPROM to override the data. (lower) EEAddressH:EEAddressL >= 0x4000
[2] Number of data transfers. (Always 2)
[EEData] EEPROM 8-bit data to be rewritten.
[0] Always 0.
[SUM] Checksum.
3.Data format of 16-bit PIC (PIC18F), "C"-Family
①Flash transfer format:
[AddressU][AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressU] Start address of the flash page to override the data. (upper)
[AddressH] Start address of the flash page to override the data. (middle)
[AddressL] Start address of the flash page to override the data. (lower)
[2*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H(n)] Rewrite data (2*N)bytes.
[SUM] Checksum.
②EEPROM transfer format:
[EEAddressU][EEAddressH][EEAddressL][1][EEData][SUM]
[EEAddressU] Address of the EEPROM to override the data | 0x40. (upper)
[EEAddressH] Address of the EEPROM to override the data. (middle)
[EEAddressL] Address of the EEPROM to override the data. (lower)
EEAddressU:EEAddressH:EEAddressL >= 0x400000
[1] Number of data transfers. (Always 1)
[EEData] EEPROM 8-bit data to be rewritten.
[SUM] Checksum.
③Config transfer format:
[CFGAddressU][CFGAddressH][CFGAddressL][14][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(7)][CFGDataH(7)][SUM]
[CFGAddressU] Start address of the Config data to overwrite the data | 0x80. (upper)
[CFGAddressH] Start address of the Config data to overwrite the data. (middle)
[CFGAddressL] Start address of the Config data to overwrite the data. (lower)
CFGAddressU:CFGAddressH:CFGAddressL >= 0x800000
[14] Number of data transfers. (Always 14)
[CFGData(n)] Rewrite data (2*7)bytes.
[SUM] Checksum.
4.Data format of 16-bit PIC (PIC18F-J), "J"-Family
①Flash transfer format:
[AddressU][AddressH][AddressL][2*N][DataL(1)][DataH(1)]....[DataL(N)][DataH(N)][SUM]
[AddressU] Start address of the flash page to override the data. (upper)
[AddressH] Start address of the flash page to override the data. (middle)
[AddressL] Start address of the flash page to override the data. (lower)
[2*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H(n)] Rewrite data (2*N)bytes.
[SUM] Checksum.
②Config transfer format:
[CFGAddressU][CFGAddressH][CFGAddressL][8][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(4)][CFGDataH(4)][SUM]
[CFGAddressU] Start address of the Config data to overwrite the data | 0x80. (upper)
[CFGAddressH] Start address of the Config data to overwrite the data. (middle)
[CFGAddressL] Start address of the Config data to overwrite the data. (lower)
CFGAddressU:CFGAddressH:CFGAddressL >= 0x800000
[8] Number of data transfers. (Always 8)
[CFGData(n)] Rewrite data (2*4)bytes.
[SUM] Checksum.
5.Data format of 24-bit PIC, "D"-Family
①Flash transfer format:
[AddressL][AddressH][AddressU][3*N][DataL(1)][DataH(1)][DataU(1)]....[DataL(N)][DataH(N)][DataU(N)][SUM]
[AddressL] Start address of the flash page to override the data. (lower)
[AddressH] Start address of the flash page to override the data. (middle)
[AddressU] Start address of the flash page to override the data. (upper)
[3*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H/U(n)] Rewrite data (3*N)bytes.
[SUM] Checksum.
②EEPROM transfer format:
[EEAddressL][EEAddressH][EEAddressU][2][EEDataL][EEDataH][SUM]
[EEAddressL] Address of the EEPROM to override the data (lower).
[EEAddressH] Address of the EEPROM to override the data (middle).
[EEAddressU] Address of the EEPROM to override the data (upper).
[2] Number of data transfers. (Always 2)
[EEDataL/H] EEPROM 16-bit data to be rewritten.
[SUM] Checksum.
③Config transfer format:
[CFGAddressL][CFGAddressH][CFGAddressU][18][CFGDataL(1)][CFGDataH(1)].....[CFGDataL(9)][CFGDataH(9)][SUM]
[CFGAddressL] Start address of the Config data to overwrite the data. (lower)
[CFGAddressH] Start address of the Config data to overwrite the data. (middle)
[CFGAddressU] Start address of the Config data to overwrite the data. (upper)
[18] Number of data transfers. (Always 18)
[CFGDataL/H(n)] Rewrite data (2*9)bytes.
[SUM] Checksum.
6.Data format of 24-bit PIC, "E"-Family
①Flash transfer format:
[AddressL][AddressH][AddressU][3*N][DataL(1)][DataH(1)][DataU(1)]....[DataL(N)][DataH(N)][DataU(N)][SUM]
[AddressL] Start address of the flash page to override the data. (lower)
[AddressH] Start address of the flash page to override the data. (middle)
[AddressU] Start address of the flash page to override the data. (upper)
[3*N] Number of transfers of data as described in piccode.ini. (byte notation)
[DataL/H/U(n)] Rewrite data (3*N)bytes.
[SUM] Checksum.
②Config transfer format:
[CFGAddressL][CFGAddressH][CFGAddressU][30][CFGDataL(1)][CFGDataH(1)][CFGDataU(1)].....[CFGDataL(10)][CFGDataH(10)][CFGDataU(10)][SUM]
[CFGAddressL] Start address of the Config data to overwrite the data. (lower)
[CFGAddressH] Start address of the Config data to overwrite the data. (middle)
[CFGAddressU] Start address of the Config data to overwrite the data. (upper)
[30] Number of data transfers. (Always 30)
[CFGDataL/H/U(n)] Rewrite data (3*10)bytes.
[SUM] Checksum.
Last edit: Dan 2014-06-24
Hello Dan!
Thanks a lot for the new "D" and "E" families support in TinyBootloader+, the new firmwares and all the updates you made! You're great!!! I hope we'll meet one day :-)
So, by now I'm gathering everything from your posts and I'll post a v0.9.0 with all your addons.
Best regards,
Edorul
I downloaded the code looking for the (partial) support of the dsPIC33E chips, and under the Type D folder, there are no files! Did these get dropped somewhere?
I've been trying to modify MicroChip's dsPIC33E bootloaders, but have had little success--was hoping that Tiny Multi Bootloader+ might be the answer...
Hi,Nelson
Please look for the following fofolders.
Tiny_Avr-Pic_Bootloader+ (v0.9.0)
Tiny Multi Bootloader+ (v0.10.0)
Best regards,
Dan
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? Same question.
Hi,
If the erase/write unit is 16 words
84, 100, 116, 132 ...
If the erase/write unit is 32 words
100, 132, 164, ....
If the erase/write unit is 64 words
132, 196, .........
Please make it to be N x U + 4 for erase/write unit U. (N = 1, 2, 3, ....)
2.Change piccodes.ini
Even if the corresponding device already exists, assign another number.
The following is an example of PIC10F322
; PIC10 family
; example: PIC10F322 Flash: 512 words = 200h; 200h*2 = 400h
;-----------
$11, B, 10F 322 (100W), $400, $000, default, 32,
$12, B, 10F 322 (84W), $400, $000, 168, 32,
Thank you Dan, That information was very helpful, so i can adjust the firmware size from the piccodes.ini only or do i need to change any other thing in the PC software?
i really appreciate your reply.
Hello Dan, please write an example for PIC16F877 to be firmware size to about 132 words
; PIC16 family
; example: PIC16F877 Flash: 8192 words = 2000h; 2000h*2 = 4000h
;-----------
$31, B, 16F 876/877/876A/877A, $4000, $100, default, default,
exsample
$40, B, 16F 876/877/876A/877A, $4000, $100, 264, default,
$00 < NUMBER =< $FF
Last edit: Dan 2018-05-25
Hello Dan, Thank You for your replies, but when i inserted the example you gave to me and try to write into the MCU, i still get this error messages "Error: hex file too large, writing bootloader firmware!!!
* Error: problem in writing MCU memory!!!"
Hi
Is the upper limit of HEX file 0x1F7B or less?
Does this work?
$40, B, 16F 886/887/876A/877A/876/877(132w), $4000, $100, 264, 32,
ext clock 8MHz
19200 bpr
Last edit: Dan 2018-05-25
Thank you Dan, i will check and give reply soon.
I still get the same error messages, i found out that your code is still running on 20MHz even when the xtal is 8MHz
xtal EQU 8000000 ; you may also want to change: _HS_OSC _XT_OSC
baud EQU 19200 ; standard TinyBld baud rates: 115200 or 19200
Receive:
movlw xtal/2000000+2 ;for 20MHz => 11 => 1second
movwf cnt1
I imported my code to PIC18F452
Here is the Hex File
my ASM code
Is your target 16F, 18F?
Code made with 18f can not flow to 16F.
I already changed the code back on 16F but its still conplaining about the same error,
Initially the PC Software couldn't detect the MCU, then i detected this in the code
MainLoop:movlw 'B'MainLoop:movlw 'K'i really appreciate your replies