Hi,
I may be doing something wrong, but the component macro "get average byte" seems to hang the programme attached. The offending bit is commented and is in the macro "sign_get", Ive tried using the "get byte" instead and this works fine. Ive also tried disabling Timer 1 just before and re-enabling after the component macro. The problem still exists, the system simulates fine but does NOT work in the hardware.
Regards,
Chris
Problem with Average analogue component macro?
Moderator: Benj
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Problem with Average analogue component macro?
- Attachments
-
- Flasher and Brake Debug.fcfx
- (39.41 KiB) Downloaded 231 times
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: Problem with Average analogue component macro?
I've had similar problems with the dsPICs and the average ADC macros. Both the Get Average and Raw Average functions made the program freeze up. Worked fine on 8 bit PICs but not 16 bit.
The Get Byte or Get Int worked fine if I remember correctly.
Also, you can try to increase the delay from 2us to maybe 200 or 2000us just to test it out.
The Get Byte or Get Int worked fine if I remember correctly.
Also, you can try to increase the delay from 2us to maybe 200 or 2000us just to test it out.
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: Problem with Average analogue component macro?
Sorry to push, but is there any progress on this? (Im now confident it is a bug as others have experienced the same problem)
Regards,
Chris
Regards,
Chris
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Problem with Average analogue component macro?
Hi Chris,
Please can you give this file a go, it seems to be working well for me.
The file needs to live here "C:\Program Files (x86)\Flowcode 6\CAL\PIC16BIT".
Please can you give this file a go, it seems to be working well for me.
The file needs to live here "C:\Program Files (x86)\Flowcode 6\CAL\PIC16BIT".
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: Problem with Average analogue component macro?
Hi,
All working properly now (thanks for your help )
Regards,
Chris
All working properly now (thanks for your help )
Regards,
Chris