Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | "newbie" C problem using ht-ide and PICC

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

"newbie" C problem using ht-ide and PICC - Benjamin - Sep 8 8:05:18 2008

Hi all

First if this post doesn't conform to standart, then please bare with=20
me.
This is my first post here.

Now to the problem.

I am using Hi-TECH PICC to make a small c program using a pic 12f508
(which i had laying around).
But just ran into a few problems. I am sure that they are all an
"Error 40" (40 cm in front of the screen)-

I get compiler errors while doing a little boolean/bitwise stuff.
Right here i am just trying to OR GP0 and GP1 and then placing the
resulting bit bit5 on GP5.

Anyone have any clues ?

ps. functionality is just a simple OR between two pins.
Nothing more right now.

I am interrested in in how to solve the compiler error
not the functionality.

#include

__CONFIG(INTRC & WDTDIS & UNPROTECT & MCLRDIS);

#define C1 GP0
#define C2 GP1
#define C3 GP2
#define L GP3
#define R GP4
#define c1 GP5

void main(void)
{
TRIS =3D 0b00011111;
while (1=3D=3D1) {
GP5 =3D GP0 | GP1; <- this doesn't compile
GP5 =3D GP0 || GP1; <- this doesn't work
}
}

--
Best regards
Benjamin S=F8lberg
------------------------------------

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )