Hello
Is it possible to design a PSoC 4 circuit using just C code? Could you share a minimal example (blinking led)?
Thanks
Hernan Sanchez
Hello
Is it possible to design a PSoC 4 circuit using just C code? Could you share a minimal example (blinking led)?
Thanks
Hernan Sanchez
I believe the answer is yes. For the blinking LED, you can configure an GPIO pin to output the value of a Data Register (PRT_DR) bit instead of routing from digital hardware using the Digital System Interconnect. Take a look at Chapter 7: "I/O System" in the PSoC 4 Architecture TRM and the PRT_* registers in the PSoC4 Registers TRM (Tech Ref Manual).
Sorry, I don't have source code.
However, to do really fun things with PSoC you do need to use Digital and/or Analog resources. For those, you need PSoC Creator to configure the internal routing.
The PSoC4 can be used as normal MCU, but then you cannot (easily) make use of all its hardware features. Writing to pins can be done directly via the CyPins API. The hardware can be configured by writing the right values into the right registers (look at the 'PSoC4 register TRM'), but this is tedious and error-prone...
I too wish to design using only C code and no GUI. In most of the documents it is mentioned that, you cannot do component connection in C code. That means you cannot write a net-list. But you can configure a component. For example, for the blinking LED you can leave the PWM unconfigured mode in the GUI and then you can write the code for configuration. Advantage is you can dynamically change the configuration.
I too wish to design using only C code and no GUI. In most of the documents it is mentioned that, you cannot do component connection in C code. That means you cannot write a net-list. But you can configure a component. For example, for the blinking LED you can leave the PWM unconfigured mode in the GUI and then you can write the code for configuration. Advantage is you can dynamically change the configuration.