View Single Post
Old 22-03-2006, 06:50 PM   #11
batbatdieu
Đệ tử 4 túi
 
Tham gia ngày: May 2005
Bài gửi: 83
:
Trích:
Nguyên văn bởi namqn
Tôi vừa thử nghiệm Tiny Bootloader với các dsPIC từ 201x đến 401x, tất cả đều chạy tốt, không có chuyện chỉ ghi được một lần duy nhất. Bạn có thể cho biết bạn đã làm như thế nào không?
Trích:
1 - You can use one of the provided .hex files or
2 - Modify tinybld.asm and assemble it using MPASM IDE (or Mpasmwin.exe)
Modify "xtal", "baud", "_??_OSC" to what you need; assemble it (for example with .\MPLAB\MCHIP_Tools\Mpasmwin.exe); write the HEX it with a PIC programmer; put the PIC on you board and connect it to the PC serial port.
3 - Requirements for your program:
The program must meet this requirement: it must have in the first 4 words of memory a GOTO to the start of the main program. (this is what the majority of the bootloaders require). So in assembler it should look something like this:PIC16F PIC16F PIC18F
org 0
;clrf STATUS
clrf PCLATH
goto Main org 0
;clrf STATUS
pagesel Main
goto Main org 0
goto Main

If you use a compiler, search the help for a directive that allows coexistence with a bootloader;
Tôi đã làm theo bước 2 , modify lại file tinybld_ds4012.s rồi dịch và nạp vào 4011 , kết quả là tiny bootloader nhận đc là dspic4011/4012 . Nhưng sau khi nạp chương trình thì tiny bootloader ko nhận ra dspic đc nữa , tôi buộc phải nạp lại bootloader.
Có lẽ do bước 3 tôi đã làm sai , anh có thể cho 1 chương trình mẫu tham khảo đc ko , tôi dùng C30
batbatdieu vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn