Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Error message

Status
Not open for further replies.

EXODUS

New Member
I'm trying to use the internal clock on the pic so I set the
config register to _config h'3F18' but when i try and compile I get an error
"illegal opcode (h)". I get this code even if i use the Ox prefix.

Im preaty sure the code 3F18 sets the internal clock bit 4 and clears bit 1 and 0 which will free up pins A6 and A7 and also clears bit 5 the Mclr pin so that its an I/O pin anything you can tell me to
fix this
 
The correct syntax is 3f18h or 0x3f18 - no quotes.

As I said previously, it's better to use the microchip provided labels.
I.E.
__config _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_ON & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_ON & _PWRTE_ON & _WDT_OFF & _INTRC_IO

I don't know what the syntax would be with a value. I'd guess,
__config _CONFIG1, 0x3f18

As the 16f88 has 2 config locations.

Mike.
 
I am not familiar with the label format but I can see how your using it, it seems kind of long compared dosent it.

also I havent been able to find any books that good for people learning the 16f88 most of the books I see cover the 16f84 I do read the data sheet but it would be nice to have some examples of projects and info on the 88
 
EXODUS said:
I am not familiar with the label format but I can see how your using it, it seems kind of long compared dosent it.

also I havent been able to find any books that good for people learning the 16f88 most of the books I see cover the 16f84 I do read the data sheet but it would be nice to have some examples of projects and info on the 88

The 88 is the same 14 bit core as the 84, the only changes required are minor, and do to the enhanced facilities on the 88.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top