Electronic Components Datasheet Search
  English  ▼

X  

AN247 Datasheet(PDF) 11 Page - Microchip Technology

Part # AN247
Description  A CAN Bootloader for PIC18F CAN Microcontrollers
PDF  32 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

AN247 Datasheet(HTML) 11 Page - Microchip Technology

Back Button AN247 Datasheet HTML 7Page - Microchip Technology AN247 Datasheet HTML 8Page - Microchip Technology AN247 Datasheet HTML 9Page - Microchip Technology AN247 Datasheet HTML 10Page - Microchip Technology AN247 Datasheet HTML 11Page - Microchip Technology AN247 Datasheet HTML 12Page - Microchip Technology AN247 Datasheet HTML 13Page - Microchip Technology AN247 Datasheet HTML 14Page - Microchip Technology AN247 Datasheet HTML 15Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 32 page
background image
 2003 Microchip Technology Inc.
DS00247A-page 11
AN247
APPENDIX A: A SIMPLE
PROGRAMMING
INTERFACE
To demonstrate the functionality of the CAN bootloader,
a simple serial-to-CAN interface is discussed briefly
here. The hardware, controller firmware and software
are designed to work as a package. Users are encour-
aged to use this design example as a starting point for
developing their own programming systems.
The Hardware
An underlying assumption of the bootloader is that
some method exists to introduce the new program data
to the target CAN network. There may be cases, how-
ever, where no provision has been made for a network
to communicate with an outside data source. In these
cases, it is necessary to introduce a CAN node whose
sole function is to provide an external data interface.
A schematic outline for the interface’s hardware is pre-
sented in Figure A-1 and Figure A-2 (following pages).
The heart of the design is a PIC18F458 microcontroller,
which runs the programming firmware and provides
both CAN and RS-232 communications. Interfaces to
the CAN bus and programming data source are pro-
vided by an external CAN transceiver and RS-232
interface.
Optional status LEDs, headers for accessing the con-
troller’s I/O ports and power regulation are provided in
the design. These may be modified, removed or
expanded upon as the system design requires.
The Firmware
The firmware is an extension of the PIC18F serial boot-
loader discussed in Microchip Application Note AN851,
“A FLASH Bootloader for PIC16 and PIC18 Devices”.
Two new commands (RD_SRAM and WT_SRAM) have
been added to provide access to SRAM, thus allowing
complete control of all the peripherals (including the
CAN module) through the serial bootloader.
A summary of the commands and syntax for the PIC18
FLASH Bootloader is provided in Appendix A of
Application Note AN851.
The Host Software
The software portion of the interface is designed to run
on IBM® compatible computers running Microsoft®
Windows®. It provides a simple graphic-based tool to
translate program files in Intel® HEX format into serial
data for the programmer firmware.
THE CANCOMM CONTROL
The software interface uses an ActiveX® control to pro-
vide simple communications with the CAN module
through the serial port. For those who wish to experi-
ment with the interface, a total of 4 properties and 13
methods are available to the user. These are listed in
Table A-1.
THE USER INTERFACE
A simple graphic and text interface allows the user to
keep track of the bootloading operations in real-time.
Examples of the interface’s dialogs are shown in
Figure A-3.
TABLE A-1:
ActiveX METHODS USED BY THE HOST SOFTWARE
Method
Type
Purpose
BitRate
Property
Sets the bit rate of the comm port.
CommPort
Property
Specifies the comm port.
MaxTimeOut
Property
Specifies the maximum wait (in milliseconds) for data to be received in
the computer’s serial buffer.
MaxRetrys
Property
Specifies the maximum number of times to resend a serial packet.
SetFilter
Method
Sets a CAN filter on the interface.
SetMask
Method
Sets a CAN mask on the interface.
GetMsg
Method
Gets the message from the CAN receive buffer.
PutMsg
Method
Puts the message in the CAN transmit buffer.
SetBitRate
Method
Sets the CAN bit rate.
Init
Method
Initializes the CAN module on the interface.
IsGetMsgRdy
Method
Determines if the receive buffer has data.
IsPutMsgRdy
Method
Determines if the transmit buffer is open.
GoOnBus
Method
Puts the interface on the CAN bus.
GoOffBus
Method
Takes the interface off the CAN bus.
GetStat
Method
Gets the current status of the interface CAN module.
OpenComm
Method
Opens serial communications to the interface
CloseComm
Method
Closes communications to the CAN interface.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com