Page 1 of 1
Help with PIC12F675
Posted: Mon Aug 29, 2016 12:34 am
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
Re: Help with PIC12F675
Posted: Mon Aug 29, 2016 5:35 am
by STibor
Hello!
Download it.
http://www.flowcode.co.uk/old_site/resources/getr ... php?id=596
Look at the following example:
Flowcode_v5_Examples\Components\EEPROM\2. Storing and retrieving INT variables.fcf
Re: Help with PIC12F675
Posted: Mon Aug 29, 2016 11:09 am
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
Re: Help with PIC12F675
Posted: Tue Aug 30, 2016 2:29 am
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.
Re: Help with PIC12F675
Posted: Tue Aug 30, 2016 6:59 am
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.
Re: Help with PIC12F675
Posted: Tue Aug 30, 2016 10:04 am
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.