Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  __CONFIG(0, 0xFFFF);
  __CONFIG(1, FOSC_HS  );
  __CONFIG(4, 0xFFFF);
  __CONFIG(5, 0xFFFF);
> __CONFIG(6, CP0_OFF && CP1_OFF);
> __CONFIG(8, WRT0_OFF && WRT1_OFF);

The rows that I have marked cause a syntax error while building, others are fine.

C:\Users\Oppilas\AppData\Local\Temp\s6bc.:14: error: syntax error

I am using HI-TECH PICC-18 PRO v9.66, lite mode.

share|improve this question
Here's the sort of question you'd find in an IQ test: find one thing the problematic lines have in common. – Armandas May 6 '12 at 16:21
@Armandas I was going to answer read- or writeprotection :) – varesa May 6 '12 at 16:29
up vote 7 down vote accepted

OK, I thought I'll answer properly :)

The && is a logical operator and the result is boolean. This does not make any sense in this case. What you need is & (a bit-wise operator).

share|improve this answer
Oh wow, good one. This is one of those problems you can stare at for a whole day and never figure out. – AngryEE May 6 '12 at 23:27
@AngryEE I once typed |= instead of != in a condition. Now that took me a while to find. – Armandas May 7 '12 at 5:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.