首先,你忘了提到“不工作”是什么意思。请更具体。您的参考链接不起作用,因为包含了括号。如果您遵循第二个链接,HTTP://www. McCHIP.COM/FUMMS/M98967.ASPXY,您就看不到用IPE读取UDID(在GB6家族以前的一些版本中已经工作过)了。4 NOR GB6族。因此,我认为它也不会用于GA705。如果从这里你选择了你将在这里得到的链接:HTTP://www. McCHIP.COM/FoMss/FordPase/981589U将找到如何访问GA705族的UDID(和更多的内存位置)的代码。表29 -5显示了UDID地址,这似乎是你所犯的错误。D.UDID1 0x800 F0UDI2 0x800 F02…UDID5 0x800 F08DS300 10118B页340,& lt & & lt;;(编辑:继续阅读线程& Rev B;过时和包含错误地址)(希望Microchip正确地记录它们,文档对于GB4(其他线程)是错误的)。e作业,替换dg**函数,它们是自定义显示函数。
以上来自于百度翻译
以下为原文
FIRST, you forgot to mention what "does not work" means. Please be more specific.
Your reference links don't work, because the closing parenthesis is included.
If you follow the second link,
http://www.microchip.com/forums/m998867.aspx
you see that I was not able to read the UDID with IPE (worked in some previous version for the GB6 family) any longer for GB4 nor GB6 family. So I assume it won't for GA705 either.
If from there you choose the link you will get here:
http://www.microchip.com/forums/FindPost/981589
You will find the code how to access the UDID (and more memory locations)
For the GA705 family the Table 29-5 shows the UDID addresses, which you seem to have found.
UDID1
0x800F00
UDID2
0x800F02
...
UDID5
0x800F08
DS30010118B-page 340, <<< [
edit: continue reading thread -> Rev B is outdated and contains wrong addresses]
(Let's hope Microchip documented them correctly, documentation was wrong for the GB4 (other thread)).
The following code should do the job, replace the dbg* functions, they are custom display functions.
unsigned int j, wAddr, wData, wTablePag = TBLPAG; // save previous setting
TBLPAG= 0x80; // retrieve the PIC24 UDID
wAddr = 0x1600; // edit: 0x0F00 is wrong;
dbgPuts("UDID=");
for (j=0;j<5;++j)
{
dbgPuts("UDID");
dbgPutc('0'+j+1);
dbgPuts(" = ");
dbgPutHex( __builtin_tblrdh( wAddr) );
wData = __builtin_tblrdl( wAddr) ;
dbgPutHexW( wData );
wAddr += 2;
dbgPutLF();
}
TBLPAG = wTablePag;
首先,你忘了提到“不工作”是什么意思。请更具体。您的参考链接不起作用,因为包含了括号。如果您遵循第二个链接,HTTP://www. McCHIP.COM/FUMMS/M98967.ASPXY,您就看不到用IPE读取UDID(在GB6家族以前的一些版本中已经工作过)了。4 NOR GB6族。因此,我认为它也不会用于GA705。如果从这里你选择了你将在这里得到的链接:HTTP://www. McCHIP.COM/FoMss/FordPase/981589U将找到如何访问GA705族的UDID(和更多的内存位置)的代码。表29 -5显示了UDID地址,这似乎是你所犯的错误。D.UDID1 0x800 F0UDI2 0x800 F02…UDID5 0x800 F08DS300 10118B页340,& lt & & lt;;(编辑:继续阅读线程& Rev B;过时和包含错误地址)(希望Microchip正确地记录它们,文档对于GB4(其他线程)是错误的)。e作业,替换dg**函数,它们是自定义显示函数。
以上来自于百度翻译
以下为原文
FIRST, you forgot to mention what "does not work" means. Please be more specific.
Your reference links don't work, because the closing parenthesis is included.
If you follow the second link,
http://www.microchip.com/forums/m998867.aspx
you see that I was not able to read the UDID with IPE (worked in some previous version for the GB6 family) any longer for GB4 nor GB6 family. So I assume it won't for GA705 either.
If from there you choose the link you will get here:
http://www.microchip.com/forums/FindPost/981589
You will find the code how to access the UDID (and more memory locations)
For the GA705 family the Table 29-5 shows the UDID addresses, which you seem to have found.
UDID1
0x800F00
UDID2
0x800F02
...
UDID5
0x800F08
DS30010118B-page 340, <<< [
edit: continue reading thread -> Rev B is outdated and contains wrong addresses]
(Let's hope Microchip documented them correctly, documentation was wrong for the GB4 (other thread)).
The following code should do the job, replace the dbg* functions, they are custom display functions.
unsigned int j, wAddr, wData, wTablePag = TBLPAG; // save previous setting
TBLPAG= 0x80; // retrieve the PIC24 UDID
wAddr = 0x1600; // edit: 0x0F00 is wrong;
dbgPuts("UDID=");
for (j=0;j<5;++j)
{
dbgPuts("UDID");
dbgPutc('0'+j+1);
dbgPuts(" = ");
dbgPutHex( __builtin_tblrdh( wAddr) );
wData = __builtin_tblrdl( wAddr) ;
dbgPutHexW( wData );
wAddr += 2;
dbgPutLF();
}
TBLPAG = wTablePag;
举报