mplab c18下载如何从C18迁移到XC16

后使用快捷导航没有帐号?
查看: 379|回复: 2
关于MPLAB C18嵌入汇编遇到大的问题
在线时间3 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
请教一个问题,用MPLAB C18编译器,C语言设定的全局变量在嵌入汇编中无法使用这个变量,应如何设置变量?谢谢!
在线时间3 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
本帖最后由 laoqi 于
21:34 编辑
程序如下,变量为count,在MOVLW 10& &MOVWF count,0 这两个个语句中变量没有被赋值
#include &p18cxxx.h&
extern int count;
void main()
& & int count=8;&&
& && & _asm&&
& && &&&MOVLW 10
& && &&&MOVWF count,0
& && &&&MOVLW 0xF8& && && && && & /*设RC0-RC2输出*/
& && &&&MOVWF TRISC,0
& && &&&nop
& && &&&MOVLW 0x00& && && && && & /*CCD脉冲头段开始*/
& && &&&MOVWF PORTC,0
& && &&&nop
& && &&&MOVLW 0x03
& && &&&MOVWF PORTC,0
& && &&&nop
& && &&&BCF PORTC,0,0
& && &&&nop
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop& &
& && &&&nop
& && &&&MOVLW 0x07
& && &&&MOVWF PORTC,0
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop& && && && && &&&/*以上为CCD脉冲头段*/&&
& && && &done:
& && && &MOVLW 0x01& && && && && & /*CCD主脉冲第一段2周期开始*/
& && &&&MOVWF PORTC,0
& && &&&BCF PORTC,0,0
& && &&&nop
& && &&&nop
& && &&&MOVLW 0x03
& && &&&MOVWF PORTC,0
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop& && && && && && && && && && &&&/*CCD主脉冲第一段2周期结束*/
& && &&&DECF PORTC,1,0&&/*CCD主脉冲第二段2周期开始*/
& && &&&nop
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop
& && &&&MOVLW 0x03
& && &&&MOVWF PORTC,0
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop& && && && && && && && && && &&&/*CCD主脉冲第二段2周期结束*/
& && &&&DECF PORTC,1,0& && &&&/*CCD主脉冲第三周期开始*/
& && &&&nop
& && &&&nop
& && &&&DECF PORTC,1,0
& && &&&nop
& && &&&nop& && && && && && && && && && &&&/*CCD主脉冲第三周期结束*/
& && &&&DECFSZ count, 1,0
& && && &GOTO done
& && &&&nop
& && &&&_endasm& &
在线时间3 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
哪位大师愿意帮忙!
Powered by
逛了这许久,何不进去瞧瞧?MPLAB-C18-Full-v3_30 Compiler program 2290000 source codes to download -
&File: MPLAB-C18-Full-v3_30& & [
& & & & &&]
&&Directory:
&&Dev tools: C-C++
&&File size: 34662 KB
&&Downloads: 3968
&&Uploader:
&Describe: Microchip C18 compiler, the latest chip support for Microsoft
File list(Click to check if it's the file you need, and recomment it at the bottom):
&&MPLAB-C18-Full-v3_30.exe
Please Comment: []&[]&[]&[]&[]&[]
&[]:Commonly to use&[]:Very Good&[]:Very Good&[]:Very Good&[]:Very Good&[]:Very Good&[]:Commonly to use&[]:Very Good&[]:Commonly to use&[]:Very Good
&Downloaders recently:
&&&&&&&&&&&&&&&&&&&&&[]
&To Search:
&&&&&&&&&&
&Search in more than 2292203 codes/documents:
&[] - software that use for writing the coding, also work with MPLAB for compiler. (ouput .hex file that can be use for design circuit (Proteus))
&[] - MPLAB C30 Compiller v 3_02
&[] - Be able to decrypt the local QQ chats including qq group chats, Italy debugging success
&[] - MPLAB C18 C compiler mcc18 using MPLAB C18 C Compilers, PIC18 PICmicro Single-chip, MPLINK Linker and MPLAB IDE, the user can easily develop a single-
&[] - MPLAB C18 Guide, is a good introductory tutorial
&[] - Microchip PIC16F877 microcontroller programming examples Guide
&[] - The latest board PICC-18, 30-day limit any function, have tried them already.
&[] - ucos-ii in the PIC18F4520 transplantation, with Proteus schematic simulation! A total of five simple task.
&[] - PICC-8.35 crack version, absolutely easy to use, I have been using itMPLAB C18 C语言程序设计-GE_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
MPLAB C18 C语言程序设计-GE
上传于||文档简介
&&M​P​L​A​B​ ​C8​ ​C​语​言​程​序​设​计​-​G​E
阅读已结束,如果下载本文需要使用
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩20页未读,继续阅读
你可能喜欢MPLAB_C18 MPALB c18的所有资料 保存入口的程序 SCM 单片机开发 238万源代码下载-
&文件名称: MPLAB_C18
& & & & &&]
&&所属分类:
&&开发工具: Visual C++
&&文件大小: 1239 KB
&&上传时间:
&&下载次数: 1
&&提 供 者:
&详细说明:MPALB c18的所有资料 保存入口的程序-failed to translate
文件列表(点击判断是否您需要的文件,如果是垃圾请在下面评价投诉):
&&MPLAB_C18资料\MPLAB_C18.pdf&&MPLAB_C18资料
&输入关键字,在本站238万海量源码库中尽情搜索:

我要回帖

更多关于 mplab 的文章

 

随机推荐