Expansion Modules dspMIAC - Error
Expansion Modules dspMIAC - Error
Hi Leigh and Benj,
I have a strange issue with the advanced expansion module, I keep getting an error:
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
When I try the example file Leigh sent before it works perfectly, the minute I take out all the references to the expansion module (initialize and Digital output macro) and re-compile it, it compiles 100%, do you know why i would get this error and when I use the example code for the expansion module it works 100%?.
I have a strange issue with the advanced expansion module, I keep getting an error:
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
When I try the example file Leigh sent before it works perfectly, the minute I take out all the references to the expansion module (initialize and Digital output macro) and re-compile it, it compiles 100%, do you know why i would get this error and when I use the example code for the expansion module it works 100%?.
Re: Expansion Modules dspMIAC - Error
Running the code below on its own run perfectly with no errors
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
Hi,
Could you post the project that gives the error?
Re-creating the above images I do not get any errors
Thanks
Leigh
Could you post the project that gives the error?
Re-creating the above images I do not get any errors
Thanks
Leigh
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
Hi Gavin,
When you use Expansion modules, the project target needs to be "MIAC (dsPIC) System"
Leigh
When you use Expansion modules, the project target needs to be "MIAC (dsPIC) System"
Leigh
Re: Expansion Modules dspMIAC - Error
Oops thanks Leigh!,
Do you know why the program would reset (every 5-10 minutes) if left idle plugged in to my USB?
Do you know why the program would reset (every 5-10 minutes) if left idle plugged in to my USB?
Re: Expansion Modules dspMIAC - Error
Hi Leigh,
Both with USB connected and unconnected, I have run the simulations and can't find a reset?
Regards,
Gavin
Both with USB connected and unconnected, I have run the simulations and can't find a reset?
Regards,
Gavin
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
What power supply are you using for the MIAC and Expansion modules?
What voltage and current capability?
What voltage and current capability?
Re: Expansion Modules dspMIAC - Error
its a Meanwell - NES-35-12 it a 12V 3.0A Supply, supplying both the MIAC and Miac Expansion
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
Hi Gavin,
OK, the PSU is good
I've not had chance to go through all your program, but I do see some instances of reentrancy,
that is, routines/macros calling themselves, this will cause problems, that can result in a reset.
For an example, RTC_SET calls HOUR_1 which calls RTC_SET
Leigh
OK, the PSU is good
I've not had chance to go through all your program, but I do see some instances of reentrancy,
that is, routines/macros calling themselves, this will cause problems, that can result in a reset.
For an example, RTC_SET calls HOUR_1 which calls RTC_SET
Leigh
Re: Expansion Modules dspMIAC - Error
Thanks Leigh,
I just needed the program to go "back" in-case the user made an error.
I just needed the program to go "back" in-case the user made an error.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
One way to do that is to use connection points to the macro end
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
You cannot.
But you can use it to exit from a macro when the user cancels.
But you can use it to exit from a macro when the user cancels.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Expansion Modules dspMIAC - Error
Yes, I think you are correct
There is a lot of one calling another, this will cause stack problems.
Try and get the execution back to Main, have a read up on state machines.
That is, use a state variable to decide what gets called from Main.
There is a lot of one calling another, this will cause stack problems.
Try and get the execution back to Main, have a read up on state machines.
That is, use a state variable to decide what gets called from Main.