Page 1 of 1
issue when use thermometer and adreesH & addresL
Posted: Wed Aug 15, 2007 6:25 pm
by Pascal13
Hi ,
I m a french so sorry for my mistakes in english.
I use Flowcode V2( upgrade from V1)
and i have an issue with AddressH & Address L when i use thermoter.
Both addressH & addressL are incremented simultaneously so i can't undersdand how i use 10 bits register.
for exemple
for very low input in ADC0 , i have for addressH "009" abd addressL "192".
Thanks for your help
Best regards
Pascal
Posted: Thu Aug 16, 2007 9:25 am
by Benj
Hello
Because Flowcode V2 does not have 16 bit variables it is easier to just an 8 bit variable.
The High byte of the returned value contains the 8 most significant bits and the low byte contains the 2 least significant bits.
You can simply use the high byte on its own without loosing much precision.
Posted: Thu Aug 16, 2007 9:52 am
by Steve
Flowcode forces the ADC result to be "left-shifted". This means that the most significant 8-bits of the 10-bit value are "addressH". The remaining 2-bits are in "addressL", but these occupy the 2 most-significant bits (so addressL can take the values 0x00, 0x40, 0x80 or 0xC0 - i.e. 0, 64, 128 or 192).
Flowcode v3 allows signed 16-bit numbers and has an improved ADC component that can return a result as 8-bits or 10-bits. This should make things easier. It also has many other improvements over v2.
You can install a free/demo version of v3 without affecting your existing v2 installation so you can see for yourself:
http://www.matrixmultimedia.com/Flowcode3a-X.php
And your English is very good - certainly better than my French!
Posted: Thu Aug 16, 2007 6:15 pm
by Pascal13
Hi ,
Thanks for your fast answer Steve and Benj.
I all understand

.
If i upgrade flowcode V2 to V3, does my program V2 run on V3.
When i upgraded V1 to V2 i have to rewritte all my prog.
Best regards
Pascal
Posted: Fri Aug 17, 2007 8:39 am
by Steve
Hello Pascal,
V2 programs usually upgrade ok when opened in V3. The major problem occurs when you have your own C code enbedded within the flowchart.
But we will help to sort out any upgrade problems you have.
Also, you can have V2 and V3 running on your PC at the same time. So if you find they don't work in V3, you can open them instead in V2.
Posted: Fri Aug 17, 2007 1:58 pm
by Pascal13
thanks for all, i think to upgrade to V3
best regard
Pascal