Page 1 of 1

Experimental 2-1/2digit lcd component macro

Posted: Wed Feb 19, 2014 1:39 am
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.

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

Posted: Wed Feb 19, 2014 11:05 am
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 8738 times
Moving the background object from -0.12500 to -0.12600 seems to fix it.
ZFight2.jpg
ZFight2.jpg (53.91 KiB) Viewed 8738 times

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

Posted: Wed Feb 19, 2014 9:52 pm
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?

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

Posted: Sun Feb 23, 2014 9:37 pm
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