发 帖  
原厂入驻New
实战多通道高速精密测温仪的全系列设计教程,以实际项目为依托,提升工程师核心竞争力!→点击立即抢购←
[问答] HTC相当于EEPROM宏
141 HTC EEPROM
分享
大家好,我把一个用HTC编译器编译的旧代码移植到设备PIC18F42的MCC18 V3.47编译器上。谁能告诉我在编译时初始化EEPROM的EEPROM宏是什么?在HTC代码中,我这样做:这将初始化从设备地址EEPROM的地址0到7的前8个位置。如何在MCC18编译器的代码中做到这一点?任何帮助都是伟大的。

以上来自于百度翻译


      以下为原文

    Hi everyone

I am porting an old code which was compiLED with HTC compiler to the MCC18 v3.47 compiler for device PIC18F452.

Can anyone tell me what is the equivalent of EEPROM macros for initializing the EEPROM at compile time?

In the HTC code i was doing it as this:

__EEPROM_DATA('J','0','0','0','1','0','8','0');

This would initialize the first 8 locations, from address 0 to 7, of the device EEPROM.

How can i do same this in code for MCC18 compiler?

Any help is great.
0
2019-3-11 12:32:59   评论 分享淘帖 邀请回答
19个回答
有人建议您使用XC8编译器线程,如这些可能有帮助:HTTP:/www. MyCHIP.COM/FUMMS/M79733ASPX

以上来自于百度翻译


      以下为原文

    Somebody would suggest you use XC8 compiler
 
Threads like these might help:
http://www.microchip.com/forums/m797439.aspx
 
2019-3-11 12:38:18 评论

举报

HTTP://www. McCHIP.COM/FUMMS/M906921.ASPX

以上来自于百度翻译


      以下为原文

    http://www.microchip.com/forums/m906921.aspx
 
2019-3-11 12:53:08 评论

举报

为什么要从一个过时的编译器移植到一个过时的编译器?

以上来自于百度翻译


      以下为原文

    Why are you porting from one obsolete compiler to a different obsolete compiler?
2019-3-11 13:07:51 评论

举报

我现在资源有限,一个小英特尔原子上网本1.8GHz,1GB,Windows 7的这项工作。MPLAB V860工作精细。我试图安装XC8编译器上,但不能让它工作。于是我尝试了McC18,它工作了。我不知道MPLABX是否会运行在这个小机器上。我没有试过。有没有想过值得一试?

以上来自于百度翻译


      以下为原文

   


I am resource limited at the moment; a small Intel Atom netbook 1.8GHz, 1GB, Windows 7 for this work. MPLAB v8.60 working fine on it. I tried to install XC8 compiler on it but could not get it working.. So then i tried MCC18 and it worked.
I dont know if MPLABX will run on this small machine. I did not try it. Any idea if it worth the try?
2019-3-11 13:17:32 评论

举报

您可能会找到必要的“窍门”,使XC8在这个论坛上工作在MPLAB8上,例如ASTTP://www. MyCHIP.COM/FMUMS/M775 55.ASPXHTTP://www. McCHIP.COM/FUMMS/M64 3167.ASPXand My.1GB RAM,X在启动时将非常缓慢,但它可能工作-我确实建议反对使用它无论如何,如果可以不做

以上来自于百度翻译


      以下为原文

    You may find the needed "trick" to get XC8 working in MPLAB8 on this forum, such as
http://www.microchip.com/forums/m747555.aspx
http://www.microchip.com/forums/m643167.aspx
and more.
 
with 1GB RAM, X will be very slow at launch, but then it may work - I definitely advice against using it anyway, if can do without
2019-3-11 13:23:05 评论

举报

为什么不坚持HTC呢?它不工作吗?

以上来自于百度翻译


      以下为原文

    Why not just stick with HTC?  Is it not working?
2019-3-11 13:42:41 评论

举报

我最近没试过。我记得它曾经被激活在线(或也许我错了…)如果你说,那么我可以更好地尝试它。

以上来自于百度翻译


      以下为原文

   


I did not try it recently. I remember it used to get activated online..(or maybe i am wrong..)
If you say then i can better try it.
2019-3-11 13:47:51 评论

举报

一些真正的老版本,比如8。x不再工作,但是9版本的一些版本仍然有效。

以上来自于百度翻译


      以下为原文

    Some of the really old versions like 8.X no longer work, but some of the 9.X versions still work.
2019-3-11 14:03:41 评论

举报

顺便说一下,你如何比较2个编译器HTC V9. X和MCC18?McC18是最新的,将更加稳定和无bug或只是我的想法?如果生成一个好的稳定无bug代码是比较标准而不是代码大小,你会建议哪一个?

以上来自于百度翻译


      以下为原文

   


BTW how do you compare the 2 compilers HTC v9.x vs MCC18? MCC18 is more recent and would be more stable and bug free or is it just my thinking? Which one do you suggest if generation of good stable bug free code is the comparison criterion and not the code-size?
2019-3-11 14:19:49 评论

举报

你能提供9?x版本的下载链接吗?我试图找到,但链接不工作。

以上来自于百度翻译


      以下为原文

   


Can you give download link for 9.X version? I tried to find but the links are not working..
2019-3-11 14:25:05 评论

举报

我不推荐其中任何一个,因为它们都过时了,但HTC是一个更好的编译器。如果您正在使用HTC编写的现有代码,如果您试图用C18构建代码,那么可能会遇到许多新问题。最终,XC8是最好的选择。注意,你不需要有一个IDE来使用XC8。如果你熟悉“制作”,你可以使用它,这将是一个理想的选择,在你的资源有限的硬件。

以上来自于百度翻译


      以下为原文

    I wouldn't recommend either of them since they're both obsolete, but HTC is a better compiler.  And if you're working with existing code that was written for HTC, you are likely to run into lots of new problems if you try to build the code with C18.
 
Ultimately, XC8 is the best choice.  Note that you don't need to have an IDE to use XC8.  If you're familiar with "make" you can use it instead, which would be an ideal choice on your resource-limited hardware.
2019-3-11 14:39:41 评论

举报

目前HTC编译器的版本是XC8V1.42,MPLAB 8.92,XC8 V1.33可能比较容易。Microchip用C编译器和工作人员购买了高科技软件公司。有些人仍然在开发编译器,有些人在这个论坛上写了一些。HTC编译器被改名为XC8,与其他编译器和开发工具名称的变更相关。C18是一个不同的、不兼容的编译器,它被放置了。初始化是在DOCS目录中与编译器程序文件一起,在程序文件(x86)的问候下,Mysil

以上来自于百度翻译


      以下为原文

    Don't go from HTC to MCC18.
 
The current version of HTC compiler is XC8 v1.42
With MPLAB 8.92,  XC8 v1.33 may be easier.
 
Microchip bought the HI-TECH Software company, with C compiler and staff.
Some of the same people still work with development of the compiler, and some of them write in this forum some times.
The HTC compiler was renamed to XC8 in connection with some other compiler and development tool name changes.
C18 was a different and incompatible compiler that was put away.
 
__EEPROM_DATA( 'J','0','0','0','1','0','8','0');       is still there.
 
See XC8 Compiler User's Guide  chapter 5.5.5.2 EEPROM INITIALIZATION
The manual is in docs directory together with compiler program files, somewhere under: Program Files (x86)
 
Regards,
   Mysil
2019-3-11 14:47:44 评论

举报

高科技档案:FTP://编译器Ro:C0MP!0511@ FTP.MICCHIP.COM/

以上来自于百度翻译


      以下为原文

    Hi-Tech archive:  ftp://Compilers-RO:C0mP!0511@ftp.microchip.com/
2019-3-11 15:02:59 评论

举报

JTEMPPLESI将使用XC8编译器,而不是MPLAB IDE。您能给出几个“制造”实用工具的示例命令吗?我的项目是一个多文件项目。如何使用“制作”实用程序生成.HEX。

以上来自于百度翻译


      以下为原文

   


@jtemples
I am going to use XC8 compiler using "make" instead of MPLAB IDE.
Would you be kind enough to give few sample commands of "make" utility?
My project is a multi-file project. How can i generate a .hex using the "make" utility. 
2019-3-11 15:22:00 评论

举报

@ MysilThanks详细答复。非常感谢你让我们在技术上很容易做出正确的决定。现在我在我的1GB上网本机上使用MPLABX和XC编译器。工作精细。我构建的代码,最初是在HTC编译器中编写的,在2011中,由CangeTotoi得到了很多警告和错误。未定义的符号:-Wr.WyeEpBuyyEpEpEdRead BeopeNo.Wig,这里有什么问题?

以上来自于百度翻译


      以下为原文

   
 
@Mysil
Thanks for the detailed reply. Really appreciate that you made it technically easy for us to do the right decision.
 
Now i am using MPLABX with XC compiler on my 1GB netbook machine. Working fine..
 
I build the code, which was originally written in HTC compiler back in 2011, by changing
#include <htc.h>
to 
#include <xc.h>
 
 
I get lots of warnings and following error.
 
undefined symbols:
 
-Write_b_eep
_Busy_eep
_Read_b_eep
 
Any idea what is the problem here?
2019-3-11 15:37:52 评论

举报

那些是高科技时代的老EEPROM例程。我不知道它们是否已经可用,但是你可以在旧的HTC安装中找到源代码。

以上来自于百度翻译


      以下为原文

    Those are the old EEPROM routines from Hi-Tech days.  I don't know if they're available anymore, but you can find the source code in your old HTC installation.
2019-3-11 15:55:49 评论

举报

这是否意味着XC8编译器不支持?我没有旧的HTC安装在我的机器上,从那里我可以得到这些EEPROM宏的源代码。你能提供帮助吗?

以上来自于百度翻译


      以下为原文

   


Does it mean that 
__EEPROM_DATA( 'J','0','0','0','1','0','8','0');
 
is not supported in XC8 compiler?
 
I dont have the old HTC installation on my machine from where i could have get the source codes of these EEPROM macros.
 
Can you provide help on this?
2019-3-11 16:03:59 评论

举报

不,那并不意味着。如果你查看编译器手册,你会看到它,它们是函数,而不是宏。如果你找不到它们,你必须自己写。读/写PIC EEPROM是非常简单的,并且在数据表中被记录。

以上来自于百度翻译


      以下为原文

   
 
No, it doesn't mean that.  If you look in the compiler manual, you will see it there.
 

 
They are functions, not macros.  If you can't find them, you'll have to write your own.  Reading/writing PIC EEPROM is very simple and is documented in the data sheet.
2019-3-11 16:17:25 评论

举报

不,那并不意味着。如果你查看编译器手册,你会看到它,它们是函数,而不是宏。如果你找不到它们,你必须自己写。读/写PIC EEPROM是非常简单的,并且被记录在数据表中。实际上,我没有明确地使用这些函数,它看起来像是在宏中使用的。如果这个宏在XC8中被支持,那么为什么上面的函数在编译器中不可用。我能得到一些关于这些函数的源代码的帮助的链接吗?

以上来自于百度翻译


      以下为原文

   
 
No, it doesn't mean that.  If you look in the compiler manual, you will see it there.
 

 
They are functions, not macros.  If you can't find them, you'll have to write your own.  Reading/writing PIC EEPROM is very simple and is documented in the data sheet.

</blockquote>


Actually i am not using these function explicitly, namely

_Write_b_eep()
_Busy_eep()
_Read_b_eep()
 
It looks like they are being used inside the macro
__EEPROM_DATA()
 
so if this macro is supported in XC8 then why are the above functions not available in the compiler.. 
 
Can you provide some link where i can get help about the source code of these functions?
2019-3-11 16:36:14 评论

举报

只有小组成员才能发言,加入小组>>

44个成员聚集在这个小组

加入小组

创建小组步骤

关闭

站长推荐 上一条 /10 下一条

快速回复 返回顶部 返回列表