• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 如何自製燒錄線路及程式?
#10
高級會員
高級會員


查看用戶資訊
No no no...
dear hanxuallan,you are missing from my words...你誤解我的話了!

I don't know what the process of burning a hex-file into PIC via "CCS ICD" you have used.

Why I told you the hex file format is in order to help you develop the boodloader+downloader programs.
I think that using bootloader to "download" your hex file into your pic through rs232 is called ICSP.
ICSP can be executed by USART(=rs232) without ICD2(RB6,RB7) or other hardwares.
(refer http://ww1.microchip.com/downloads/en/AppNotes/_91015b.pdf)
But if you use the kit-"ICD2" to burn the program into pic, well..you don't have to realize the hex-file format.
On the other hand, I condiser that how to "import" your hex file and burn it to you PIC chip is what you should know.

I suggest you to refer the "MPLAB IDE v.7.22" or "MPLAB ICD2" documents such as "quick start guide"...
their links are
http://www.microchip.com/stellent/idc ... me=en019469&part=SW007002
http://www.microchip.com/stellent/idc ... me=en010046&part=DV164005
These documents will assist you how to operate the ICD2.
Maybe your current requirement is to know how to use your "CCS-ICD" to burn the hex file into PIC, not to realize how to use Microchip's ICD2.

Regarding your new questions, my answer are
1) Yes, you got the point.
2) That's what I say "You are missing from my words".
But you still ask a point about ICSP tech.- "change position".
In the data payload "FF30....", for example, one real data pair should be "30FF", not "FF30", 30 is its high byte, FF is its low byte, don't forget it.

奇怪,你英文那麼好,為何不去美國的forum問呢? Try it!
http://forum.microchip.com/
我真怕我寫的東西其他人看不懂,傷他人眼睛,
況且我英文也不好...寫多了會被笑...

發表於: 2005/12/1 15:38
Morgan Chuang
s909201@gmail.com
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#9
新會員
新會員


查看用戶資訊
To me84108:

Thank you so much, that is what I want.

Yeah!!! The more things I do, the more troubles I have
to facing....

Right now, one serious problem that I have to understand,, but I am not sure whether my thought is
right or not:

since the IC on the target board is blank one, that is, it can not do anything, and only receive data (by RB7) and accompany with clock (RB6). So I have to transfer the data by certain format and instractions.

I read programming specification for this, It told me the TABLE POINTER command, the format, is that:

the original format is: (from P6 of DS39576B)

Table write (4 bits command ) +Data payload (16 bits)
1101 3C40

And once it is transfering, should be convert to:
1011 0000 0010 0011 1100

-------------------------------------------------
So, one of my question is the relationship between 'Data payload ' and one line in the hex file.

such as:

:0C02F400FF30860083168500860183120F (From P22 of DS00732A)

1) '02F4' is address (for TBLPTRU, TBLPTRH, TBLPTRL)
'FF3086008316850086018312' is data payload,
correct? I am not sure.....

2) Do I need to change the position of each bit when I
pass this data into target board through my 'ICD'.


Thanks for all your help.








發表於: 2005/12/1 0:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#8
高級會員
高級會員


查看用戶資訊
There are some C18 functions I writed for 18f4620 memory arrangement.
I wish these codes could help you to realize the memory configuration of pic18.

If you want to know the coding format about Hex-file,
you can refer the Microchip document "DS00732A",
or link to http://www.microchip.com/stellent/idc ... eId=1824&appnote=en011788,
see the pages 21-22.

After understanding these technique, I guess that you would get more and more questions.
God bless you.

By the way, to create a protocol or handshaking for bootloader and downloader is a "art".
---------------------------------------
#include <p18F4620.h>
#include <delays.h>
#include <usart.h>

void ERASEPGM(unsigned short long Address)
{
// --- Erase ---
EECON1bits.EEPGD=1; // PG Memory
EECON1bits.CFGS=0;
EECON1bits.WREN=1;
EECON1bits.FREE=1;
INTCONbits.GIE=0;
EECON2=0x55;
EECON2=0xAA;
EECON1bits.WR=1;
INTCONbits.GIE=1;
// -------------
}

void WritePGM(unsigned char data,unsigned short long Address)
{
TABLAT=data; // data

_asm
tblwt // Table Read
_endasm

EECON1bits.EEPGD=1;
EECON1bits.CFGS=0;
EECON1bits.WREN=1;
INTCONbits.GIE=0;
EECON2=0x55;
EECON2=0xAA;
EECON1bits.WR=1;
INTCONbits.GIE=1;
EECON1bits.WREN=0;

TBLPTR++;
}


// ---------- EEPROM ---------------------------
void WriteEEPROM(unsigned char data,unsigned short long Address)
{
EEADR=Address;
EEDATA=data;
EECON1bits.EEPGD=0; // EEPROM
EECON1bits.CFGS=0;
EECON1bits.WREN=1;
INTCONbits.GIE=0;
EECON2=0x55;
EECON2=0xAA;
EECON1bits.WR=1;
INTCONbits.GIE=1;
EECON1bits.WREN=0;
}

發表於: 2005/11/30 14:26
Morgan Chuang
s909201@gmail.com
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#7
新會員
新會員


查看用戶資訊
To me84108:

Thanks for your reply.

Actually, I just want to try how to build a programmer
by myself, currently, I have a CCS ICD-U40.
personally, it should be easy to make, but I do not know so far.

by the way, I'v already read some information about Bootloader, they let me know many fresh things.

Currently, I am reading 'Flash microcontroller Programming specification for pic18f', but I still do not know how to use the famous command - TABLE POINTER, to control target board by my-ICD, that is, Once I get one line Hex code, how to transfer this to target board using table write....

Anyway, Thanks for your help.

發表於: 2005/11/30 10:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#6
高級會員
高級會員


查看用戶資訊
well,
如果你沒有ICD2,我真的不知道該如何讓程式燒至PIC內!
(但是一定可以,只是我不會).

若你要啟動bootload的機制,
至少第一次一定要燒錄一個Bootload的程式在PIC中,
再由rs232 download程式到PIC的program memory.
(refer: AN851,AN732)

about document 39576b.pdf,
我只有用它的硬體介面(page 1,但我沒用RB5),
跟我的ICD2相接後,可直接燒錄在我的實驗板,
至少燒錄bootload一定要如此做!

若你要問bootload程式哪裡找?這裡可以晃晃..
http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm
http://mdubuc.freeshell.org/Colt/
http://www.microchipc.com/
但是,我不保證可以用唷!(因為有些我沒用過!)

歡迎加入使用PIC的行列!

還有,ICD2ㄧ個大概才4000元左右,
買一個應該不至於動搖國本吧??

發表於: 2005/11/29 20:58
Morgan Chuang
s909201@gmail.com
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#5
新會員
新會員


查看用戶資訊
39576b.pdf

I read this file already, but I still do not know how to do.

please help me~~~~

All table commands are 4 bits Instruction, such
as : '1100' is Table write, and folowing 16 bits Data
Payload, but I donot know what should I put into this
16 bits? Is it from Hex file?

So, can you give me a simple example?

Thanks a lot!參照:

Ryang 寫道:
PIC16 與 PIC18 的燒錄方式是不一樣的,PIC16直接送串列的燒錄資料而PIC18要送Table Write Command 的方式來燒錄。
這樣說吧! PIC18 的燒錄比較複雜。

有興趣可參考燒錄的規格,如下所示:

dsPIC : http://ww1.microchip.com/downloads/en/DeviceDoc/70102d.pdf

PIC18Fxxxx :
http://ww1.microchip.com/downloads/en/DeviceDoc/39576b.pdf

發表於: 2005/11/29 18:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#4
版主
版主


查看用戶資訊
PIC16 與 PIC18 的燒錄方式是不一樣的,PIC16直接送串列的燒錄資料而PIC18要送Table Write Command 的方式來燒錄。
這樣說吧! PIC18 的燒錄比較複雜。

有興趣可參考燒錄的規格,如下所示:

dsPIC : http://ww1.microchip.com/downloads/en/DeviceDoc/70102d.pdf

PIC18Fxxxx :
http://ww1.microchip.com/downloads/en/DeviceDoc/39576b.pdf

發表於: 2005/2/16 14:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#3
初級會員
初級會員


查看用戶資訊
參照:

Ryang 寫道:
在Microchip網站上找 DS30277D 有詳細的 ICSP 程式與電路。


該文件我有看過:
只有提到12C5XX,16CXX,17CXX,16F8XX
沒有提到線路在18FXX及dsPIC30FXX可否使用?
Programming Specification是否相同?
程式要否調整?
報歉問了許多問題!

發表於: 2005/2/16 3:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何自製燒錄線路及程式?
#2
版主
版主


查看用戶資訊
在Microchip網站上找 DS30277D 有詳細的 ICSP 程式與電路。

發表於: 2005/2/15 15:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


如何自製燒錄線路及程式?
#1
初級會員
初級會員


查看用戶資訊
如果沒有MPLAB ICD2或燒錄器的話,
有沒有簡單的線路及程式可以直接將.HEX或.BIN燒到
PIC18FXXX或dsPIC30FXX等cpu上
或應該reference which document?
或是有更便宜的ICSP KITS
謝謝!

發表於: 2005/2/15 14:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------