adc voltage sample program

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
ctesla75
Posts: 25
Joined: Sat May 03, 2014 7:27 am
Has thanked: 5 times
Been thanked: 4 times
Contact:

adc voltage sample program

Post by ctesla75 »

hi all,
I have downloaded the demo version of flowcode v6 ,i have run the sample program adcvoltage.fcx and it runs pefectly, i have tried to duplicate the program to run on a at90s8535 but only get 0.0000 on the lcd with the number not increasing when i adjust the pot ,there are now error messages. will it not run on this chip i can use adc using getbyte but not getstring i also have had no luck with get voltage


thanks ctesla75

medelec35
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: adc voltage sample program

Post by medelec35 »

Hi ctesla75,
Welcome to the Matrix forums.
Can you post the flowchart that is causing the error message and post what the actual error message is.
The more details the better.

Martin
Martin

ctesla75
Posts: 25
Joined: Sat May 03, 2014 7:27 am
Has thanked: 5 times
Been thanked: 4 times
Contact:

Re: adc voltage sample program

Post by ctesla75 »

Hi Martin,
that was a typo it was supposed to say there are no errors. The sample program is for a 16f877a pic but i wanted it to run on a at90s8535 so made a new program
as far as i know i duplicated it correctly all pots going to the same pins but i get no output

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: adc voltage sample program

Post by EtsDriver »

Could you post your Flowchart which you try to get to the at90s8535 still so we could see if there is something wrong? I could take look at it, have fought so many fights with the AVR side of Flowcode since V4. ;) :D
Ill just keep the good work up!

ctesla75
Posts: 25
Joined: Sat May 03, 2014 7:27 am
Has thanked: 5 times
Been thanked: 4 times
Contact:

Re: adc voltage sample program

Post by ctesla75 »

Hi etsdriver,
here is the flow chart it is basically the same program with a different chip,this is another trial to get it to go the first time i used a different lcd and pot from the sample, as i couldnt find the blue lcd in my demo version.This time i copied and pasted all components ,i still get 0.000 but no voltage with pot variation
thanks
flow.GIF
(9.87 KiB) Downloaded 1437 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: adc voltage sample program

Post by kersing »

Could you post your actual FCF file, not a screen shot?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

ctesla75
Posts: 25
Joined: Sat May 03, 2014 7:27 am
Has thanked: 5 times
Been thanked: 4 times
Contact:

Re: adc voltage sample program

Post by ctesla75 »

here are the fcfx files
adcvoltage.fcfx is the matrix multimedia sample written for a pic16f877a
adcvoltagerework.fcfx is the same file rewritten for an avr at90s8535
i had originally used only the flowcode and used new components but this time i copied all components as well

adcvoltagerework.fcfx
(7.61 KiB) Downloaded 248 times
ADCVoltage.fcfx
(7.28 KiB) Downloaded 275 times

User avatar
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: adc voltage sample program

Post by Benj »

Hello,

The problem seems to be related to the chip definition file. Here is an updated file that should resolve the issue.

Simply pop the file into your "C:\Program Files (x86)\Flowcode 6\FCD\AVR" folder and restart Flowcode and then it should all work correctly.

Let me know how you get on.
Attachments
AT90S8535.fcdx
(11.06 KiB) Downloaded 213 times

ctesla75
Posts: 25
Joined: Sat May 03, 2014 7:27 am
Has thanked: 5 times
Been thanked: 4 times
Contact:

Re: adc voltage sample program

Post by ctesla75 »

Hi Benj ,
Thanks for the help that solved the problem.

ctesla75

jimyxt
Posts: 3
Joined: Sat Oct 11, 2014 7:48 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: adc voltage sample program

Post by jimyxt »

Hello
Benj,

I have a similar problem I am testing flowcode before purchase, I have a program that uses two Pots, one is adquiring using get byte and works fine but the other is using GetString but it does not work only store 0.000000. You you have a definition chip file update for AVR arduino Mega 2560? it is really urgent. I need to know flowcode is a very efficient program builder for my purposes before to buy it.

Thanks in advance.
Attachments
AVR-Arduino-2560.fcfx
program pot called Tension no retrieve any data
(23.7 KiB) Downloaded 170 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: adc voltage sample program

Post by dazz »

Hi

Run the sim and dragf the speed slider to the right a bit this will then show all the variables, by doing this tension was displaying

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

jimyxt
Posts: 3
Joined: Sat Oct 11, 2014 7:48 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: adc voltage sample program

Post by jimyxt »

Hello,
I wrote an example, and there is a Snapshot too, the previous file is the big project to avoid confusion I wrote the attached Flowcode program that has the same problem.
It is not able to capture the analog value using GetString component macro. the variable is always 0.00000
The property "Conversion Speed" in each pot component is empty and it is not able to fill it. The target device is AVR-Arduino-Mega-2560.
Thanks in advance for any help.
Attachments
snapshot from POT component property
snapshot from POT component property
HlpMtrxFrm.jpg (80.92 KiB) Viewed 8805 times
HelpFrom MatrixForum.fcfx
This is the Problem I have, no value in the variable when you use GetString component macro.
(12.71 KiB) Downloaded 130 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: adc voltage sample program

Post by dazz »

Hi
ran your chart and had the following results, are you using V6.1 as i think other versions had an adc issue on the arduino 2560. if not download v6.1 and try again
Regards
Dazz
check1.jpg
(221.84 KiB) Downloaded 1190 times
check2.jpg
(126.08 KiB) Downloaded 1190 times
check3.jpg
(125.42 KiB) Downloaded 1190 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

jimyxt
Posts: 3
Joined: Sat Oct 11, 2014 7:48 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: adc voltage sample program

Post by jimyxt »

"Solved"
Hello.
Thank you very much, Now it is known that Version 6.0 does not adquire ADC values using GetString when Arduino Mega 2560 is the Target Chip. It need to be upgraded to Version 6.1. Now my program is working.
Thanks again.

Post Reply