Multiple one wire example DS1820

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

Moderators: Benj, Mods

Post Reply
armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Multiple one wire example DS1820

Post 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
Attachments
1-W JPG.jpg
1-W JPG.jpg (87.9 KiB) Viewed 11218 times
Multiple One Wire Example.msg.txt
(4.43 KiB) Downloaded 424 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: Multiple one wire example DS1820

Post 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.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post 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
Attachments
Multiple One Wire Example.msg.txt
(1.74 KiB) Downloaded 405 times

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post by armagon29 »

Dear Sir:

Do you have any comment ??

Thanks

ARMAGON

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Multiple one wire example DS1820

Post by Steve »

Please post your "c" and "fcf" files here and we'll have a look.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post by armagon29 »

Dear Sir:

FC File, C File and error file are included please check

Thaks

Armagon
Attachments
Multiple One Wire Example.msg.txt
File 1
(1.82 KiB) Downloaded 407 times
Multiple One Wire Example.fcf
File 2
(9 KiB) Downloaded 572 times
Custom_Code_OneWire.c
File 3
(16.82 KiB) Downloaded 472 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: Multiple one wire example DS1820

Post 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.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post 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)
Attachments
One Wire Example.msg.txt
(1.77 KiB) Downloaded 337 times
One Wire Example.fcf
(7.5 KiB) Downloaded 428 times
Custom_Code_OneWire.c
(16.82 KiB) Downloaded 355 times

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post by armagon29 »

see previus post / Part B:

(See files)
Attachments
Multiple One Wire Example.msg.txt
(1.87 KiB) Downloaded 307 times
Multiple One Wire Example.fcf
(6.5 KiB) Downloaded 427 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: Multiple one wire example DS1820

Post 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.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post 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
Attachments
Multiple One Wire Example.msg.txt
(3.43 KiB) Downloaded 269 times
One Wire Example.msg.txt
(3.72 KiB) Downloaded 243 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: Multiple one wire example DS1820

Post 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.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times

Re: Multiple one wire example DS1820

Post 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

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: Multiple one wire example DS1820

Post by Benj »

Hello

Please refer to this forum topic regarding the DS18B20 devices.

http://www.matrixmultimedia.com/mmforum ... =29&t=6714

Post Reply