CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - TECH PICC18
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - TECH PICC18 - List
[
Other
]
canf18xx8.h
DL : 5
、 先在microchip网站上找到00738.zip,这个包中有 can18xx8.h,can18xx8.c,将其复制到一个你要编写程度的子目录中,例如C:\testcan下,这个时候这个东东是不能直接用的。 2、 下载一个MPLAB 7.10,直接安装(要求直接下载) 3、 再下载一个PICC18 (HI-TECH的),要正版哦(支持正版,买不起的想其它办法吧) 4、在你的头文件上写上如下的样式: #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h"//可能是“pic.h”不太好包含,因此常会报错,直接包含克服之 5、然后设置好PICC和MPLAB,如果MPLAB上没有PICC18,则到PICC的网上下一个安装软件,可以直接运行安装就有了。 6、按照工程的基本要求把你的源代码、添加上两个库(不加也可以) 然后就可以写如下代码了:下面是一个完整版,可以直接使用microchip的库函数,本程序只是仿真调试过,未在多个芯片通信过,仍在制作中。 #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h" unsigned long NewMessage; BYTE NewMessageData[8]; BYTE MessageData[8]; BYTE NewMessageLen; enum CAN_RX_MSG_FLAGS NewMessageFlags=1; BYTE RxFilterMatch; void main() { //int a; //int b; CANInitialize(1, 5, 7, 6, 2, CAN_CONFIG_VALID_XTD_MSG); while(1) { // Application specific logic here // Check for CAN message if ( CANIsRxReady() ) { CANReceiveMessage(&NewMessage,NewMessageData,&NewMessageLen,&NewMessageFlags); if ( NewMessageFlags & CAN_RX_OVERFLOW ) { // Rx overflow occurred; handle it } if ( NewMessageFlags & CAN_RX_INVALID_MSG ) { // Invalid message received; handle it } if ( NewMessageFlags & CAN_RX_XTD_FRAME ) { // Extended Identifier received; handle it } else { // Standard Identifier received. } if ( NewMessageFlags & CAN_RX_RTR_FRAME ) { // RTR frame received } else { // Regular frame received. } // Extract receiver filter match, if it is to be used RxFilterMatch = NewMessageFlags & CAN_RX_FILTER_BITS; } // Process received message // Transmit a message due to previously received message or // due to application logic itself. if ( CANIsTxReady() ) { MessageData[0] = 0x01; CANSendMessage( 0x02,MessageData,1,CAN_TX_PRIORITY_0 &CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME); } // Other application specific logic } // Do this forever // End of program } 以上均是参考文档并进行了修正,由于中间总是报错,为了大家让CAN更容易,谢谢大家!
Update
: 2009-05-25
Size
: 10.43kb
Publisher
:
lovelzs2008@126.com
[
ELanguage
]
HI_TECH_PICC18_MANUAL
DL : 0
英文版 HI-TECH PICC18 STD 最详细最权威的开发手册-The English version of HI-TECH PICC18 STD most detailed development of the most authoritative manual
Update
: 2025-02-17
Size
: 6.4mb
Publisher
:
陈培国
[
SCM
]
PIC_BOOTLDR_16BIT
DL : 0
根据HI-TECH PICC18原版BOOTLOADER改进的适合PIC18F4580的BOOTLOADER程序。对HEX文件有要求,HEX32格式,在MPLAB中用编译后导出方式生成,不能直接用编译生成的的HEX文件,否则会不成功。-According to the original HI-TECH PICC18 BootLoader improved BootLoader procedures for the PIC18F4580. HEX file a request for, HEX32 format used in MPLAB compiled Export generated, can not be directly generated by the compiler of the HEX file, otherwise they will be unsuccessful.
Update
: 2025-02-17
Size
: 72kb
Publisher
:
陈培国
[
ELanguage
]
HT_PICC960_Crack
DL : 0
HITECH PICC18 V9.61 pro crack
Update
: 2025-02-17
Size
: 1.17mb
Publisher
:
snoopy
[
SCM
]
HCPICP-pro-9.60PL5
DL : 0
PICC9.60PL5 PRO版,很新的了。-PICC9.60PL5 PRO version of the very new.
Update
: 2025-02-17
Size
: 5.69mb
Publisher
:
yanxinming
[
ELanguage
]
PICC18
DL : 0
HI-TECH PICC18编译器,但是我的注册码生成器不好用了-HI-TECH PICC18 compiler, but I am not the key generator with the
Update
: 2025-02-17
Size
: 6.04mb
Publisher
:
nene
[
Embeded-SCM Develop
]
HT-PICC16_V9.50
DL : 1
picC语言开发环境,用于pic单片机c语言开发-pic mcu pic mcu pic mcu pic mcu pic mcu pic mcu pic mcu pic mcu pic mcu
Update
: 2025-02-17
Size
: 7.38mb
Publisher
:
李芳
[
Embeded-SCM Develop
]
HI-TECH-PICC-std9.6
DL : 0
HI-TICH-picc9.60编译器,最新的编译器和破解文件,保证能用-HI-TICH-picc9.60 compiler, the latest compiler and crack files, can be used to ensure
Update
: 2025-02-17
Size
: 6.73mb
Publisher
:
hxn
[
ELanguage
]
HCPIC18-pro-9.63PL3+Patch
DL : 0
Update
: 2025-02-17
Size
: 26.04mb
Publisher
:
raham
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.