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

Code Example Criticism

Level 2
Level 2
First like received First like given Code Expert

I spent several hours looking here and on the Internet for a simple example that shows how to write a byte to EEPROM and then how to get it back.  I need to save setup information so a restart can retrieve it and use the latest settings.  I found many examples that involve EEPROM as well as LCDs, thermocouples, ADCs, arrays, vectors, and so on.  These examples ARE NOT helpful.  They contain too much "clutter" that confuses nonexperts like me and others.  I often wonder if some people post examples simply to display their programming expertise rather than to educate others.

This criticism extends to other PSoC Creator devices in the 5LP chip I often work with.  I spent a lot of time trying to get simple examples for Timers, PWMs, quadrature encoders, and other building blocks.  For the most part, basic examples don't exist.  The "Code Examples" section of the Cypress site could use a way to rate examples, perhaps as appropriate for beginners, moderately experienced users, long-time users, experts, and Cypress staff people.  And every device should have a "beginners-level" example.

I looked at the example for a quadrature decoder this morning.  It uses PWMs, and other components.  But people would be better served if the example used a simple $3 incremental encoder and explained ways to use the APIs to do useful things.  If someone wants to go beyond that more-advanced examples might help.

I like the PSoC devices, but lack of basic "start up" examples will point me to other MCU manufacturers.

2 Replies
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted


I am a yet another clutter maker,

I've been trying to make it easy to understand the point though.

Have you noticed that recently there is a code example page?

Community Code Examples

May be, you can post a request for a particular sample,

then others may be able to help you by showing a pointer to existing sample(s),

or may be someone will prepare a simple sample.

Meantime, as for EEPROM, I posted EEPROM example to

Using EEProm

and Emulated EEPROM example to

Emulated EEPROM what does ..._Write() function exactly do?

Do you think they are too much ?


Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted


for simple Quad Decoder you may consider custom community component

Quad Decoder with Button Switch component for rotary shaft encoders

It comes with many examples, App Note, Datasheet and a video.