Experimental 2-1/2digit lcd component macro

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

Post Reply
Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Experimental 2-1/2digit lcd component macro

Post by Kenrix2 »

I made an experimental simulating component macro for a 2 1/2 digit lcd display and a 16LF1936 and thought I would share. The display is described here:
http://www.mouser.com/ProductDetail/Lum ... kcPQ%3d%3d
The component macro is untested and may contain errors so use at your own risk.
This component macro can not be used for commercial use. You also can not sell the component macro.

To use the component macro, drag it (the .fcpx file) into the Flowcode 6 components folder. Start Flowcode 6 and the macro will be in the Outputs tab. To remove it, drag it out of the Flowcode 6 components folder.

Also included is an example program using this component macro. It will only work if you put the component macro into the components folder. The example program has some descriptive text explaining in more detail on how to use the component macro.

After creating this component macro I am quite impressed with Flowcode V6. Having the ability to create simulating macros is a big plus to me.

Lastly, there is a small program on how I made the component macro simulate if you are curious. You don't have to download the component macro to run it.
Attachments
how_it_was_done.fcfx
(6.71 KiB) Downloaded 374 times
lcd_2andHalfDigit.fcpx
(10.59 KiB) Downloaded 358 times
lcd_2andHalfDigit_example.fcfx
(5.43 KiB) Downloaded 347 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: Experimental 2-1/2digit lcd component macro

Post by Benj »

Very nice work, looks great and seems to work well.

I would maybe move the objects that draw the segments slightly off the base object and this way when you rotate the panel etc you don't get the Z fighting issue as shown here.
ZFight.jpg
ZFight.jpg (42.83 KiB) Viewed 8733 times
Moving the background object from -0.12500 to -0.12600 seems to fix it.
ZFight2.jpg
ZFight2.jpg (53.91 KiB) Viewed 8733 times

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: Experimental 2-1/2digit lcd component macro

Post by Kenrix2 »

Great tip. So simple but it solves a lot of drawing problems. In the program I used to create the component macro I just selected the display segment group and typed in the z axis field 1 mm (so the segments are above the background) and all the 3d drawing issues magically went away. I have never used a 3d drawing program before but this one is very easy to use. Thanks for including it in Flowcode V6. I am not going to bother uploading an update to the component macro since it does work just as it is. It was more of an exercise to learn how to create a component macro that simulates. I was surprised how easy it is was to make.

I do have a question on use restrictions for component macros. Since I am a Chip Pack user, any component macro I create might carry the same use restriction even if a Pro user installed it. However, I can only see this to be true (perhaps wrongly) if a component macro has compiled code inside of it. I can not look inside of a .fcpx file to check. So it would seem to me (again perhaps wrongly) that if a component macro has compiled code inside of it then the use restriction would follow. If it does not, then the use restriction would not follow. Does a component macro have compiled code inside of it? Any comments on this?

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Experimental 2-1/2digit lcd component macro

Post by JonnyW »

Evening.

A FCPX file is essentially a bits of an FCFX file (just XML) but with compression applied to it. This means that users can not look inside the compiled program.

There is no compiled code inside the FCPX file, Flowcode will dynamically generate the C code as required whenever the user of your component clicks compile.

As far as licenses go, for pro-pack components we apply an extra layer of encryption to pro-only components. If you use these in your project then only users with a similar license can use your component. If there is not, there is no restriction on using your component - it does not matter what license it was created with.

Cheers,

Jonny

Post Reply