Hey fellow PICers
After a few projects with PIC 16F series, I try to move on to the more advanced PIC 18F series. But already at the very beginning I got stuck. I tried already to solve it for days, but I have no more clue…
The hardware setup: PIC 18F458, 20Mhz Xtal on pins OSC1 and OSC2, two 15p caps for the Xtal, an LED with resistor on PORTD.2 (pin 21)
I had to change the __CONFIG lines in the .inc file in order to work with MPLAB like this:
define OSC 20 ' Quarz = 20 MHz
ADCON1 = 15 ' all digital
LED var portd.2
RxTx var portc.5
RS485Rx var portc.7
RS485Tx var portc.6
It compiles and burns into the PIC with no errors.
"Error: PM does not support this device. Use MPASM."
LIST p = 18F458, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F458.INC" ; MPASM Header
;__CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC
;__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
;__CONFIG _CONFIG4L, _LVP_OFF_4L
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 8
What happens when I turn on power is that the LED is always lit. No blinkin’, nothin’
How can I check if the Xtal works? Or any other hints what to do anyone?
Thanx & keep on PICin’
Hi, we are pleased to
see that you are using our forum.
We'd like you to
become a member of our community. Membership is FREE,
please REGISTER and view our forums
without these annoying reminders!
you may post on the forums, download from the file areas and use the
WIKI without interruption.