SPI component in Schmatic implementation

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted
        I am wanting to make a component for real time clock driver using SPI. When I create a library and add a schematic implementation, there is no SPI components showing up in the component catalog. Most of the other components are there. If I instead create a project, all components are visible. Is there some limitation to using SPI as part of a schematic implementation for new components?   
0 Likes
3 Replies
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

 I found the issue. I was trying to create a schematic cmponent using a library project instead of normal project.

   

I have created my component ok and saved and added to my own folder in the catalog but have a couple of questions.

   

1. Do you have to go set a dependency for the component evry time you start a new project to get it to view in the catalog, or is there a default setting that will add the component to the catalog atomatically when a project is created? ie. As I build up a library of commonly used components under a catalog page (say "Orbit") it would be efficient to have this available automatically on new project creation.

   

2. How do I create code for component created using schematic? The tutorial video did not show this.

   

I want to make a Real Time Clock component that will have API's "SetTimeDate" "GetTimeDate" and communicate with the hardware via SPI bus.

   

The code then needs to set up a structure for the time/date info and the underlying SPI functions. Then at design time I can simply drop the RTC component, allocate the port pins and in code Start_RTC() and then I can get or set the time and date.

   

The schematic method of component creation appears the simplest as I do not know Verilog language.

   

Thanks

0 Likes
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

 I love being able to answer my own post. I found what I was looking for  (just did not understand the terminology I needed to find the answer). What I need to do is add API header with the prototypes of my custom API and in the API header write the implementation using the $INSTANCE as the placeholder for the component name when a project using the component is built. This is rather cool 

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

An off-topic question: since you answer your own question (kudos to finding the right answer - sometimes writing about a problem helps in solving it), are you allowed to verify your answers? Or this only allowed with posts from other users?

0 Likes