Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 05, 2016, 05:37:01 17:37


Login with username, password and session length


Pages: [1]
Print
Author Topic: Problem with compiling  (Read 1820 times)
0 Members and 1 Guest are viewing this topic.
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« on: February 04, 2010, 08:48:44 08:48 »

Hi, Guys

I got this code from internet and it is written using MIKROC AVR from MIKROELEKTRONIKA  then I want to compie it but after compiling it I got alot of errors

Would you please check it?

 
Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #1 on: February 04, 2010, 05:27:05 17:27 »

Hi, Guys again

I am sorry, after making some research I saw that the code is written under codevision AVR  Compiler but there are still some errors can you please check it?

then the errors are at lines:

279 integral expression required
300 integral expression required
323 integral expression required
346 integral expression required
369 integral expression required


I am waiting your replies

« Last Edit: February 04, 2010, 05:30:10 17:30 by eleckits » Logged
leptro
V.I.P
Junior Member
*****
Offline Offline

Posts: 61

Thank You
-Given: 240
-Receive: 20


« Reply #2 on: February 04, 2010, 06:18:15 18:18 »

Hello,

the Switch  directive need a int value.

You have two solution here:

1: replace the switch  by  (device_x can only have two value, so its the best solution)

if (device_x)
{

}

else
{

}



2:

int device;


device= device_x;

switch(device)

Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #3 on: February 04, 2010, 06:49:37 18:49 »

Hi, again

dear leptro,

Device_2
Device_3
Device_4
Device_5
Device_6

are defined as :

PORTC.0
PORTC.1
PORTC.2
PORTC.3
PORTC.4
PORTC.5

can you please explain more?



Logged
leptro
V.I.P
Junior Member
*****
Offline Offline

Posts: 61

Thank You
-Given: 240
-Receive: 20


« Reply #4 on: February 04, 2010, 08:15:52 20:15 »

Device_*  = PORTC.X  are define as Bit and switch(Y) need a int for Y.

you can also use define Device_2 int(PORTC.0) in this case Device_2 is a int
and now switch(Device_2) will work.

Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #5 on: February 05, 2010, 02:06:42 14:06 »

I will build the project then test the adaption of the code as you suggestion.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC