Page 1 of 1

Creating a component for HT711

Posted: Sun Aug 05, 2018 4:25 pm
by CamargoF
I would like to transform my HT711 code on component for FC8 and I would like to request some help:
  • Is the best reference the wiki https://www.matrixtsl.com/wiki/index.ph ... Components?
  • What is the CAL to be used since I am addressing the bit ports directly?
  • Is it possible to convert my current implementaion to component inside my current project or I must create an independent project for it?
  • How this port can be simulated?
  • How can be create something on console to allow the simulation? (Defining a value to be read)
  • How to test if the component is properly written for FC8?
Thank you for any help.

Best regards,

Fernando

Re: Creating a component for HT711

Posted: Mon Aug 06, 2018 10:32 am
by Benj
Hello,
The best reference is this section of the wiki.
https://www.matrixtsl.com/wiki/index.ph ... t_Creation
What is the CAL to be used since I am addressing the bit ports directly?
For I/O you simply need to make single digital pin type properties and then reference the properties using a calculation icon. No CAL is required for I/O.

https://www.matrixtsl.com/wiki/index.ph ... a_Property

I've put together this page for you which should also help.

https://www.matrixtsl.com/wiki/index.ph ... Properties
Is it possible to convert my current implementaion to component inside my current project or I must create an independent project for it?
Your current project should be fine, unless you want to clean up the code and keep the component source separate.
How can be create something on console to allow the simulation? (Defining a value to be read)
You can add data to the console by using the console simulation API. e.g. simulation icons.
https://www.matrixtsl.com/wiki/index.ph ... PI_Console

Here is a walk through guide.
https://www.matrixtsl.com/wiki/index.ph ... ta_Console
How to test if the component is properly written for FC8?
Main way is to test it well once exported. Try and include some corner case conditions such as compiling with different target devices.