Hello,
I am working on a school project and the debugger returns me an error. The error states I should check C code I wrote, but I did not use C code at all (only block diagrams). The simulation works flawless except for a switch which does not change state (On D3). I am using Flowcode V4, pickit 2 and pic 16f1937. I program this kind of pic all the time using Hi-tec compiler and it always worked.
Program description:
The program is a simple stepper motor test. It first takes in time 1-6minutes (still working on actual minutes) using switches on port A. The motor than turns to one side and begins turning left and right. When time runs out or you turn D3 to "1" the program should end. (Led indicator on D2 is set as relay for power to VDD (the circuit applies turn on voltage till relay kicks in)).
The program: Please upload fcf files directly (edited by DAZZ 18:06 mon 5th may)
Hi can you please attach fcf file directly to posts (use the upload attachment box beneath post) this will ensure its an fcf file and not a virus etc ,i have attatched the fcf to this post
Regards
Dazz
debugger error stepper motor
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: debugger error stepper motor
Hi aerofrick,
All of LCD are not connected.
Right click LCD on your control panel, then choose connections.
Make sure all 6 connections are connected, then should compile OK, but I was using the default Boostc compiler.
Not tried with Hitec compiler.
Martin
All of LCD are not connected.
Right click LCD on your control panel, then choose connections.
Make sure all 6 connections are connected, then should compile OK, but I was using the default Boostc compiler.
Not tried with Hitec compiler.
Martin
Martin
-
- Posts: 23
- Joined: Mon Mar 08, 2010 4:37 pm
- Location: Slovenia
- Has thanked: 2 times
- Contact:
Re: debugger error stepper motor
Sorry I forgot to erase the LCD I used it to check if the counting works properly (It is not needed and was not there when I tried compiling). I'll try using Boostc compiler.
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: debugger error stepper motor
Hi Again
Can you change your variable names to something more meaningful ie
s change to Seconds,
a0 would be better as Minute_1 (this give a better clue as to what the switch on port A0 does)
If you can rename all variables to give a clue to what they do it will ensure you get more help quicker as it will be a lot easier to see what does what(also if you leave your project for say a year and go back to it you will instantly be able to see what it was doing rather than spending a while working out what each variable does(it was also one of the first things i was asked to do when i started using flowcode ))
in your macro inicializacija you have multiple decision branches this could be replaced by a switch branch it wont save on code space but will make your chart easier for you and others to follow, i've attached a flowchart with a rewrite of your inicializacija macro with a switch branch and renamed variables,
Regards
Dazz
Can you change your variable names to something more meaningful ie
s change to Seconds,
a0 would be better as Minute_1 (this give a better clue as to what the switch on port A0 does)
If you can rename all variables to give a clue to what they do it will ensure you get more help quicker as it will be a lot easier to see what does what(also if you leave your project for say a year and go back to it you will instantly be able to see what it was doing rather than spending a while working out what each variable does(it was also one of the first things i was asked to do when i started using flowcode ))
in your macro inicializacija you have multiple decision branches this could be replaced by a switch branch it wont save on code space but will make your chart easier for you and others to follow, i've attached a flowchart with a rewrite of your inicializacija macro with a switch branch and renamed variables,
Regards
Dazz
- Attachments
-
- cajrenamed vars.fcf
- (21.87 KiB) Downloaded 275 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: debugger error stepper motor
Hi
I totally missed this was the V4 Forum (doh doh doh )
Attached is a V4 Version of the post above
Regards
Dazz
I totally missed this was the V4 Forum (doh doh doh )
Attached is a V4 Version of the post above
Regards
Dazz
- Attachments
-
- caj (1)Flowcode V4.fcf
- (22.07 KiB) Downloaded 287 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 23
- Joined: Mon Mar 08, 2010 4:37 pm
- Location: Slovenia
- Has thanked: 2 times
- Contact:
Re: debugger error stepper motor
Hi,
I had reset the compiler settings and it works so thanks for the help.
I had reset the compiler settings and it works so thanks for the help.