完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
我把下面的示例.ASM作为项目中的源文件之一,但是我在汇编指令(NOP)上得到了“相位错误”。3个NOP指令被标记为错误:(840)相位错误,什么是相位误差和/或我可以在哪里查找错误解释?-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------预文件,它似乎已经失去了缩进和空格。我不确定A.Primefile应该是什么样子,所以我首先在记事本++中编辑了.ASM文件,以将所有标签隐藏到空格中,但这无济于事。在这次运行中,我改变了NOPS到所有的上限,但这无济于事。这里是预文件:结束
以上来自于百度翻译 以下为原文 I've added the following Example.asm as one of the source files in the project but I'm getting "phase error" on the assembly instructions (nop). PROG CODE ; Set the start of code from 16f84a.lkr scriptmain ; Min code entry called from Example2.asm global main ; Define as global so can be used in Example2.asm nop ; Main does nothing -- Put your code here goto main ; Our sample "main" is just an infinite loopservice ; Interrupt routine, called from Example2.asm global service ; Define as global so can be used in Example2.asm nop ; Interrupt code would go here nop retfie endThe 3 nop instructions are tagged as error: (840) phase error What is a phase error and/or where can I look up error explanations? ------------------------------------------------------------------- If I look at the Example.pre file it appears to have lost indenting and spaces. I'm not sure what a .pre file is supposed to look like so at first I edited the .ASM file in Notepad++ to covert all tabs to spaces but that didn't help. In this run I changed the nops to all CAPS but that didn't help. Here is the .pre file: # 1 "Example.asm" PROG CODE ; Set the start of code from 16f84a.lkr scriptmain ; Min code entry called from Example2.asm global main ; Define as global so can be used in Example2.asm NOP ; Main does nothing -- Put your code here goto main ; Our sample "main" is just an infinite loopservice ; Interrupt routine, called from Example2.asm global service ; Define as global so can be used in Example2.asm NOP ; Interrupt code would go here NOP retfie end |
|
相关推荐
7个回答
|
|
|
|
|
|
|
|
|
你用“Simult.ASM”开头的文件是针对PIC16F87的,所以文件“ExpRe2.2.ASM”。你的帖子中的另一行暗示你可能对PIC16F84A DeViCe感兴趣。我已经为PIC16F84A附上了MPLABX项目,希望能有所帮助。
以上来自于百度翻译 以下为原文 The file you have started with "EXAMPLE.ASM' is targeted for a PIC16F887 so is the file "EXAMPLE2.ASM". Another line in your post suggests that you may be interested in code for a PIC16F84A devcie. I have attached an MPLABX project for a PIC16F84A in the hope it may be of some help. Attachment(s) 16F84A_template.zip (7.00 KB) - downloaded 0 times |
|
|
|
|
|
这是XC8C编译器工具包的ASPIC汇编程序中的一个错误:ASPIC不兼容*MPASM。如果您只想组装MPASM SOIURCE文件,请使用MICICROCHAMP MPASM工具包。你不能将MPASM源文件(.ASM)和XC8C源混合到同一个程序中。如果你想将汇编与XC8C源混合使用,你需要使用ASPIC汇编程序,但是它有几个语法差异和不同的汇编指令,所以要转换MPASM源有很多工作。
以上来自于百度翻译 以下为原文 That's an error from the XC8 C compiler toolsuite's ASPIC assembler: ASPIC is *NOT* MPASM compatible. If you just want to assemble MPASM soiurce files use the Microchip MPASM Toolsuite. You cant mix MPASM source files (.asm) with XC8 C source in the same program. If you want to mix assembly with XC8 C source you need to use the ASPIC assembler, but it has several syntax differences and very different assembler directives, so its a lot of work to convert MPASM source. |
|
|
|
|
|
啊哈,好的。击中头部的钉子!我宁愿使用MPASM,无论如何,我有几百个.ASM库例程我一直在使用,但是这次我需要使用PIC16F1613,并且我找不到任何地方的P16F1613C头文件。我使用不包括16F16XX系列的通用P16XXX.C文件吗?
以上来自于百度翻译 以下为原文 Ah ha, OK. Hit the head on the nail! wink: I would prefer to use MPASM anyhow, I have hundreds of .ASM library routines I've been using but this time I need to use the PIC16F1613 and I can't find a p16f1613.inc header file anywhere. Do I use the generic p16xxx.inc file which doesn't include the 16F16xx series? |
|
|
|
|
|
那么,你是说你想使用MPASM吗?如果是这样,那么选择MPASM作为工具集,而不是XC8。总之,MPASMX和XC8都分别具有MPASM和ASPIC的P16F1613C文件。
以上来自于百度翻译 以下为原文 So, are you saying you want to use MPASM? If so, then select MPASM as your toolset, and not XC8. Anyway, both MPASMX and XC8 have the p16f1613.inc file for MPASM and ASPIC, respectively. |
|
|
|
|
|
你看了In:程序文件(x86)Microchip MPLABXV4.15MPASMX(最老的MPLABX I在手上是V3.00,它也有那个文件)。
以上来自于百度翻译 以下为原文 Did you look in C:Program Files (x86)MicrochipMPLABXv4.15mpasmx (The oldest MPLABX I have on hand is v3.00, and it also had that file.) |
|
|
|
|
|
宾果,那是我的问题。我还在使用MPLAB和MPASM,我不知道MPLABX。我回来了,谢谢你的帮助。
以上来自于百度翻译 以下为原文 BINGO, that was my problem. I was still using MPLAB and MPASM, I didn't know about the MPLABX. I'm back in business, thanks for your help. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
485 浏览 0 评论
5806 浏览 9 评论
2346 浏览 8 评论
2234 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3540 浏览 3 评论
1145浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1114浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
883浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
487浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-9 06:30 , Processed in 0.896844 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1698