The programmer uses the code api calls associated with the components (in PSOC language
a component is an onchip resource), dragging and dropping does not install code.
You drag and drop a component, dbl click and config it, like the digital filter example
I showed earlier, eg. frequency, stages, type, BW, and then at minimum write a single
line start instruction. The compiler then auto generates setting f() calls to handle that initial
configuration. The APIs facilitate user controlled configuration for real time control,
also configuration (should you decide to do it that way) , like control phase and or freq
in DDS, or Gain in a PGA, or COM buffers or whatever. Just like you do in any processor.
Think of the APIs as precoded optimized drivers done for you. So you use them versus
writing and configuring a ton of HW registers to control the component. But you can get in
the weeds if you want to, typically not the case or needed.
The only additional auto generated code is when build is run there are basic config
instructions created to config stuff like system clocks for CPU, V trim values,......which normally
you do not touch but can should you so desire. So majority of code work is done with f()
calls, and only under unusual cases do you get into the weeds.
So like writing in Fortran or Basic, where you told machine to multiply but not write the ASM,
you code in C, mostly with these API calls.
Here is a partial summary of calls in a PWM component for example you would use :
So your main() looks like main() in basically any C processor IDE, and the compiler adds a file of
C functions for that component in a separate file (you dont touch this) and uses just the calls user
invoked. Generally speaking you do not wade thru a doc looking for register names to set/clear/load
to make a component work.
Additional beauty of approach is you can start/stop a component, so if power focused, can minimize
power when a component not needed.
Regards, Dana.