
Overview
========
	This project incorporates CapSense module(SmartSense) and a 16 bit timer to achieve an 
	average current consumption less than 50uA by the device with one sensor.

	The following changes were made to the default settings in the Device Editor:
 
    	Select User Modules
    	    o Select SmartSense & Timer16 user modules. 
    	    o In this example, these UMs are renamed as SmartSense & ScanRate_Timer respectively. 
    	Place User Modules
    	    1. The User Modules will occupy the space in dedicated system resources.

Operation
=========

	Upon program execution all hardware settings from the device configuration are loaded 
	into the device and main.c is executed.First SmartSense UM is initialised and 
	timer is initialised in one shot mode.Scanning of the Capsense button and the device 
	entrance into sleep happen alternately.Scan rate is the sum of sensor scan time and sleep 
	time of the device.Timer interrupt is used to wake up the device from sleep.

	Power consumption for different scanrates is given in the table below
				
		ScanRate(ms)  Average current(uA)
		---------------------------------			
			250			  	47
		
			500			  	31	
		
			1000			        27
  
   NOTE:The LED should not be driven while measuring power consumption.

Pin Assignment
==============

	P0[3] - Cmod		(Connect Capacitor, 10nF between Pin P0[3] & Gnd)
	P0[5] - SW0			(CapSense button 0)
  	P0[1] - LED0        (General purpose output activated by SW0)

Project Settings
================

A.	Global Resources
	IMO Setting    = 24MHz			System clock is set to 24MHz
  	CPU_Clock      = SysClk/1      		CPU clock set to 24 MHz


	User Module parameter Settings
	-----------------------------------------------------------------------------------------------------------------------------------
 	UM			     Parameter 				Value 			Comments   
	-----------------------------------------------------------------------------------------------------------------------------------

	SmartSense		Sensors Autoreset		Disabled		When the parameter is set to disabled, the baseline is updated only when raw count 
											& baseline difference is below the noise threshold parameter.

				Debounce			3			If the Difference count is more than Finger Threshold for less than 'Debounce' number 
											of samples, it will not be taken as a Button Press.

	     			ShieldElectrodeOut		None			Shield electrode is not used in this project.
														
				ScanRate_Timer  Period          16000                   This parameter is a 16-bit value that ranges from 1-65535 to determine the countdown period.
      							         			It is set to 16000 to get 500ms time period.

				Mode				Oneshot			This parameter sets the mode of the Timer.It is set to One shot mode in which the timer 
											completes one full count cycle and terminates.

				Clock Select			32KHz			Selects the input clock.
	-------------------------------------------------------------------------------------------------------------------------------------------- 

B. 	Pin Drive modes
	
    	Pin	    Select	            Drive
    	----------------------------------------------
    	P0[5]	   SW0	    	HIGH Z Analog
		P0[1]	   LED0			Strong
		P0[3]	   Cmod			HIGH Z Analog
      ----------------------------------------------
