PDA

View Full Version : Illegal upcode



lerameur
- 10th November 2011, 18:40
hello,

I am getting illegal upcode error when i compile in Micro code studio.
when i add this line to disable MCLR
@ DEVICE pic16F88, MCLR_OFF

but when compiling under the dos interface, I am not getting any error.
any how even if it is compiling, I need to put a resistor to the MCRL pin of my 16F88.

i am assembling using MSPASM
any thoughts?

I did some modification in the INC files ( both in the PBP directory and the Microchop directory) and no change.

Ken

mackrackit
- 10th November 2011, 19:49
@ DEVICE pic16F88, MCLR_OFF
Is for PM

i am assembling using MSPASM

http://www.picbasic.co.uk/forum/showthread.php?t=543

lerameur
- 10th November 2011, 20:02
yes i did use the correcte one:
@ __config _INTRC_OSC_NOCLKOUT & _MCLRE_OFF

and it still gives me the same error message. I change it in the 16f88.inc and looked in the p16f88.inc files. changed it in both 16f88.inc files .. still getting the error.

ken

mackrackit
- 10th November 2011, 20:14
both 16f88.inc files
UhOh
The P16F88.inc is NOT to be edited.

lerameur
- 10th November 2011, 21:42
i OPENED it and there is nothing much to be edited concerning MCLR. Do not look anything like the tutorial link you posted earlier. So no I did not touch that file. Just put it there that I went through all the files, all the possiblities I know and it does not disable it.

Ken

Acetronics2
- 10th November 2011, 22:27
Hi, Ken

Surprising ... I wrote this one for a '88 3 days ago ... ( I always use MPASM ...)



'************************************************* *****************************
'Config
#CONFIG
__config _CONFIG1, _CP_OFF & _CCP1_RB3 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_ON & _INTRC_IO
__config _CONFIG2, _IESO_OFF & _FCMEN_OFF
#ENDCONFIG
OSCCON = %01101110 ' 4 Mhz Internal RC w/ I/Os


Alain

lerameur
- 10th November 2011, 23:08
I guess you type these line in the code (micro code studio?). I did and the compiler stops at #CONFIG..

K

lerameur
- 10th November 2011, 23:26
do I need PBP3.0 ???

I put your code in the header file and it works now, thanks

K

mackrackit
- 10th November 2011, 23:31
Yes, if you are going to use the code Alain posted.
No, to use the chip.