Help with PIC12F675

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

Moderator: Benj

Post Reply
RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times

Help with PIC12F675

Post by RLOPES780 »

All good friends.
I am using pic 12F675 which has a 10-bit ad converter.
I need to write and read the drive reading the ad pic eeprom. For example a reading of 636. When I record and do the reading, I noticed that the simulation of Flowcode he recorded only 8 bits in the EEPROM. How do I write and read the 10-bit ad converter in eeprom pic 12F675 which has only 8 bits.
I have attached a copy of the program. Can someone help me
Attachments
Flowcode1.fcfx
(10.05 KiB) Downloaded 337 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: Help with PIC12F675

Post by STibor »

Hello!
Download it. http://www.matrixtsl.com/resources/getr ... php?id=596

Look at the following example:
Flowcode_v5_Examples\Components\EEPROM\2. Storing and retrieving INT variables.fcf

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Help with PIC12F675

Post by medelec35 »

Hi RLOPES780,
In future can you please stop using all Caps for subject as its classed as "SHOUTING"
I have changed subject to lower case where necessary.

Martin
Martin

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times

Re: Help with PIC12F675

Post by RLOPES780 »

Hi Martin,
I'm sorry for the uppercase letters, I did not pay attention.
I looked at the examples I went and made a change to a part of the program.
If in comparing "VALOR_INSTANTANEO > VALOR_MAXIMO_OUT" continues to error. It seems that he can compare right up to 255 and not until 1023.
When I do the simulation by Flowcode he understands the variable only up to 255.
What can I be doing wrong?
I am attaching a copy of the program.
Can you please help me?

Grateful.

Ricardo.
Attachments
Flowcode1.fcfx
(12.72 KiB) Downloaded 310 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

Re: Help with PIC12F675

Post by kersing »

VALOR_MAXIMO_OUT is a data type that can hold only 8 bits which means the maximum value it can hold is 255. Change it to (un)signed integer if you need larger values.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times

Re: Help with PIC12F675

Post by RLOPES780 »

Hi Kersing !!
VALOR_MAXIMO_OUT is already as whole.
Still does not make the comparison with VALOR_INSTANTANEO (VALOR_INSTANTANEO> VALOR_MAXIMO_OUT). I could show it to me in code. Flowchart?

Grateful;

Ricardo.
Attachments
Flowcode1.fcfx
(12.76 KiB) Downloaded 321 times

Post Reply