circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 145 August 2002
Driving the NKK Smartswitch
Part 2: Graphics and Text


SWITCH INPUT

All of the above ignores the fact that the Smartswitch has a single, normally open contact. There isn’t code to configure the microcomputer input (which could use the on-board pull-up resistors), debounce the signal, or present it to an application through a RAM bit. But that should not be a problem.

DOCUMENTATION

When you use the PSoC Designer to construct a new project, the program wisely creates a new folder with all the necessary code and setups. Therefore, your modifications will be restricted to this project. One disadvantage to this approach is that when you transfer projects you have to use source files, and then the entire folder has to be zipped.

You can download the zipped file along with the Excel file for graphics creation. I have also included the PSoC datasheet created specifically for this project.

A SMART FINISH

The NKK Smartswitch is relatively expensive, so it would probably be in your best interest to minimize the number of switches per system. You can achieve this by using the backlight and timeouts. For instance, to invoke a setup menu, you could hold the button in until the software (after a period) changes the backlight from on to flashing. Answers to yes/no could be achieved through one or two activations of the switch or by a single push for yes and a 5-s default for no. The projects I design don’t require frequent setup, so my user interface doesn’t have to be quick. I hope to implement it using only one switch.

Note that in the time it has taken to publish this article, Cypress has released several new versions of the PSoC Designer. The latest version, 3.10, has implemented a lot of the changes that I’ve mentioned in these two articles.