Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC12F683 GPIO pin reading problem

Status
Not open for further replies.

technocrate

Newbie level 4
Joined
Jan 17, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
USA
Activity points
1,366
Hello,

I am building a very small circuit with PIC12F683 which will drive two small 5V relays from its timers.
The time interval will depend on the one of 4 settings on DIP Switch connected to GP4 and GP5 (GP4 = Switch0 and GP5 = Switch1).
I am using HI-Tech PICC compiler Lite Version (9.83).

I am having syntax problems at "IF{ " when compiling the following lines:


// Main loop
while(1)
{

//Read Input Switches
//SW1 SW0
// 00 = AUTO MODE with PIR
// 01 = Fix Mode: Shot every 10 Sec
// 10 = Fix Mode: Shot every 30 Sec
// 11 = Fix Mode: Shot every 1 Minute

// Read the DIP switch settings

If(SW1==0 && SW0==0){
// AUTO MODE
// This would be external interrupt trigger driven code
// Turn Power ON
// POWER = 1;
// Delay 3 usec
__delay_ms(3000);
// Take a shot
// SHOOT = 1;
// Wait for it to be saved on the SD Card
__delay_ms(3000);
}

Thank you for your help.
 

i think it is case sensitive you type "IF" mostly you need try typing... "if"

Good Luck
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top