Can't tell you about EPIC, sorry!
Ioannis
OK I got the program to load backwards. I think it was sucessfull. I imported the hex into the MPLAB and programed it with my ICD2, it seemed to work.
Now that I am using MPASM and the ICD2, I don't know how to turn on the internal oscillator or mclr since they are not legal statements for the PIC18s
how do I program the following statemements in now?
@ device INTRC_OSC_NOCLKOUT
'@ DEVICE XT_OSC ' System Clock Options
@ DEVICE WDT_ON ' Watchdog Timer
@ DEVICE PWRT_ON ' Power-On Timer
@ DEVICE BOD_ON ' Brown-Out Detect
@ DEVICE MCLR_OFF ' Master Clear Options
@ DEVICE LVP_OFF ' Low-Voltage Programming
@ DEVICE CPD_OFF ' Data Memory Code Protect
@ DEVICE PROTECT_OFF ' Program Code Protection
OSCCON = $60 'sets the oscillator speed
DEFINE OSC 4 'Oscillator speed in MHz: 3(3.58) 4 8 10 12 16 20 24 25 32 33
I actually really only need the internal osc at 8mHz and the MCLR off, the rest would be nice to know for future reference.
Any help? Thanks
the commands/directives of the mpasm assembler are different from PM.exe so you have to read the manual of the mpasm to understand the syntax and commands.
I'd be happy to read for you but I do not have the time to do so.
Ioannis
got it. in the front of the code, i put the following
@ __CONFIG _CONFIG1H, _INTIO2_OSC_1H
@ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
@ __CONFIG _CONFIG3H, _MCLRE_ON_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L
but you have to go into PBP's 18F2220.INC and remark out the following...
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F2220, r = dec, w = -311, f = inhx32
INCLUDE "P18F2220.INC" ; MPASM Header
; __CONFIG _CONFIG1H, _XT_OSC_1H
; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
; __CONFIG _CONFIG3H, _MCLRE_ON_3H
; __CONFIG _CONFIG4L, _LVP_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 8
Thanks...
Bookmarks