Hi
Just had a quick look at your program
Not had time to try it on hardware tonight or have a close look, but I did spot the following error.
Where you use the LoadsVsLines, it needs to be a byte variable not a float.Though this is not causing your problem.
Under FC5 I dont get your errors and it will compile to a hex file with just serious warnings rather than errors.
New user
Moderator: Benj
- JohnCrow
- Valued Contributor

- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: New user
Hi
Think I sorted it
The variables on the LHS need to be bytes as well. Ive renamed them for you.
As shown below
//Lines_D = float_gt(Lines,0)
//Loads_D = float_gt(Loads,0)
Lines_DD = float_gt(Lines,0)
Loads_DD = float_gt(Loads,0)
LinesVLoads = (Lines_DD XOR Loads_DD)
This now will compile
Think I sorted it
The variables on the LHS need to be bytes as well. Ive renamed them for you.
As shown below
//Lines_D = float_gt(Lines,0)
//Loads_D = float_gt(Loads,0)
Lines_DD = float_gt(Lines,0)
Loads_DD = float_gt(Loads,0)
LinesVLoads = (Lines_DD XOR Loads_DD)
This now will compile
1 in 10 people understand binary, the other one doesn't !
-
Darkcircle
- Posts: 8
- Joined: Sun Apr 08, 2012 6:38 pm
Re: New user
Can some one tell me why this code is showing me failure,returncode=-2,Trying o calculate frequency......
- Attachments
-
- Crona.fcf
- (7.5 KiB) Downloaded 300 times
- JohnCrow
- Valued Contributor

- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: New user
Hi
Because you are using floats the code is too big to fit in the 16F88. You need a device with more memory.RAM available:368 bytes, used:211 bytes (57.4%), free:157 bytes (42.6%),
Heap size:157 bytes, Heap max single alloc:95 bytes
ROM available:4096 words, used:4291 words (104.7%), free:-195 words (-4.-7%)
Too much code to fit in ROM, overfilled by:195 locations
1 in 10 people understand binary, the other one doesn't !
-
Darkcircle
- Posts: 8
- Joined: Sun Apr 08, 2012 6:38 pm
Re: New user
Thank's johncrow.I solved the previous problem.But I still got prob when I load the following file in proteus,though It compiles & run well in flowcode.I used interrupt & it will start a count down when ADC high & reset the count down when ADC low.But it show 0.000 in proteus.......Did I made anything wrong....??
& would you pls can rewrite the same program for AVR with flowcode.Don't know why interrupt function in Flowcode for AVR is not working or I'm making mistake......(In flowcode AVR there in no timer0, it's timer0 over flow & Hz doesn't change when I change the ratio in interrupt).
& would you pls can rewrite the same program for AVR with flowcode.Don't know why interrupt function in Flowcode for AVR is not working or I'm making mistake......(In flowcode AVR there in no timer0, it's timer0 over flow & Hz doesn't change when I change the ratio in interrupt).
- Attachments
-
- Domination.fcf
- (7.5 KiB) Downloaded 277 times