Page 1 of 1
Multiple one wire example DS1820
Posted: Thu Sep 17, 2009 3:51 am
by armagon29
Dear All:
I download the test file called β€Multiple one wire exampleβ€, to connect and test 2 DS1820 sensors, but when I tried to compile, the Flowcode v3.6 show me a list of errors (see annex) I saw into the FC file some macros are empty, may this is the reason, I’m not sure how to complete the macro requirements, it show options from Funct1 to 4 and variables, Could you be so kindly to explain me how to complete the macros?
Thanks
Re: Multiple one wire example DS1820
Posted: Thu Sep 17, 2009 9:18 am
by Benj
Hello
The file you downloaded probably contained a file named custom_code.c. Copy this file into your Flowcode V3/Components directory and then try opening the example again.
Re: Multiple one wire example DS1820
Posted: Thu Sep 17, 2009 3:39 pm
by armagon29
Dear Benj:
I did it, but I cant compile the file, the FC show me 3 errors (See anex)
What I should I do?
Thanks
Re: Multiple one wire example DS1820
Posted: Tue Sep 22, 2009 3:41 am
by armagon29
Dear Sir:
Do you have any comment ??
Thanks
ARMAGON
Re: Multiple one wire example DS1820
Posted: Tue Sep 22, 2009 7:36 am
by Steve
Please post your "c" and "fcf" files here and we'll have a look.
Re: Multiple one wire example DS1820
Posted: Tue Sep 22, 2009 3:06 pm
by armagon29
Dear Sir:
FC File, C File and error file are included please check
Thaks
Armagon
Re: Multiple one wire example DS1820
Posted: Wed Sep 23, 2009 8:37 am
by Benj
Hello
You are using the V3 OneWire example that used the Beta custom component. To allow this to work you must take the Custom_Code_OneWire.c file and rename it to Custom_Code.c Once you have done this copy the file into your Flowcode V3/Components folder and restart Flowcode. Your code should now compile correctly.
If you need to change the one wire pin from port D0 then you can do this via the custom component properties in Flowcode.
Re: Multiple one wire example DS1820
Posted: Thu Sep 24, 2009 3:03 am
by armagon29
Dear Sir:
1.- I re-install the FC program ver 3.6.11
2.- I download the file Custom_Code_OneWire.c from Web and re-name it to Custom_code.c and copy the file into Flowcode V3/Components folder as your instructions
3.-I download and test the file called 1 Wire Example, the FC still show me errors see file attached
4.- 3.-I download and test the file called Multiple_one Wire Example, the FC still show me errors see file attached
What Can I do?
(See al file included Part A)
Re: Multiple one wire example DS1820
Posted: Thu Sep 24, 2009 3:04 am
by armagon29
see previus post / Part B:
(See files)
Re: Multiple one wire example DS1820
Posted: Thu Sep 24, 2009 9:23 am
by Benj
Hello
Sorry the custom code was updated and it seems the examples were not. To get the code to compile correctly open up the properties of the custom component and in the %e row insert Delay into the Label Column and 5 into the Value column. 5 is the number of no operation instructions required to create a delay of approx 1 micro second running at a clock speed of 19.6608MHz.
Let me know if you have any further problems.
Re: Multiple one wire example DS1820
Posted: Thu Sep 24, 2009 3:20 pm
by armagon29
Dear Sir:
The FC files are already compiled (OneWire and MultiOneWire), but FC show me some warnings
Warning unreferenced functions removed:
FCD_Custom0_GetDefines in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_Custom0_oo_get_pad_byte in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_Custom0_DS1820_read_scratchpad in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_LCDDisplay0_GetDefines in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_LCDDisplay0_PrintASCII in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_LCDDisplay0_Command in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
FCD_LCDDisplay0_RawSend in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
CUSTOM_Dummy_Function in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
LCD_721576_Dummy_Function in: C:\Documents and Settings\Propietario\Mis documentos\Ds1820\DS1820 Multiple\Multiple\Multiple One Wire Example.c
Building CASM file
Re: Multiple one wire example DS1820
Posted: Thu Sep 24, 2009 4:08 pm
by Benj
Hello
These warnings are simply saying "hey your not using these functions in your program, is that correct". They do not stop or effect the compilation and you should still get the hex output file and be able to program devices.
Re: Multiple one wire example DS1820
Posted: Fri Sep 25, 2009 3:25 am
by armagon29
Dear Sir:
Finaly the C Code Works OK, I had to chage from DS1820 to DS18B20, I tested the circuit but when the temp. donw under 0.0Β°C , shows doble β€-β€ example -05.-45Β°C or -15.-74Β°C, one for units and second for decimals.
what can I do
Thanks
Re: Multiple one wire example DS1820
Posted: Fri Sep 25, 2009 9:16 am
by Benj
Hello
Please refer to this forum topic regarding the DS18B20 devices.
http://www.matrixmultimedia.com/mmforum ... =29&t=6714