Documente Academic
Documente Profesional
Documente Cultură
Electronics Engineering
Autumn 2014
Lecture 8
DEBUG
If PIC18 system is connected to in-circuit debugger, then RB6 and
RB7 are lost. By disabling background debugger these pins can
be used as general purpose I/O
STVREN
Stack overflow: system goes to a reset state
LVP
Low voltage in-circuit serial programming (ICSP), RB5 is used
LIST Directive
LIST P = 18f458, F = INHX32, MM= OFF, R = HEX, ST = OFF, x= OFF
LIST options
PIC18 : Configuration Registers contd
Example (INHX8M)
PIC18 : INTEL HEX FILES contd.
INHX32 file has also same six parts but with different
options of TT field
:BBAAAATTHHHHHHHHCC
PIC18 : INTEL HEX FILES contd.
Example (INHX32)
PIC18 : HEX FILE LOADING
There are three ways to load the Hex File in to ROM
1. Device Burner: A separate hardware programmer is used to
burn/load the program onto PIC chip, after programming chip
is placed in actual circuit. Many third party burners available.
2. ICSP: In-Circuit Serial Programmer.
Allows programming while device
is fixed in the circuit. Microchip ICD 2
is a wonderful device for debugging
programs. Excellent for designs that
changes or update. RB6 and RB7 are
utilized. After programming these
pins can again be used as IO.
3. Boot Loader: A piece of program which
loaded in ROM and it communicates with user via serial
port, CAN, USB or even network connection. Ideal for use.