PSoC Insiders Blog - Cypress.com: Blog Posts http://www.cypress.com/?id= Pressure Sensing with PSoC3 – Part 4/4 http://www.cypress.com/?rID=72988 In this part, we ll see how to interface an amplified compensated pressure sensor with PSoC3 and evaluate the system performance. This type of pressure sensor is very expensive as it performs both amplification and temperature compensation. The Honeywell SSCDANN015PGAA5 will be used for interfacing with PSoC3. The important specifications of SSCDANN015PGAA5 are listed below

Important specifications:

Supply Voltage: 5V

Accuracy: +/-0.25%

Total error band: +/-2% FSS

Sensor Operation:

This sensor has an amplified and temperature compensated output and is driven by a voltage supply. The output curve and equation are shown below.

 

Design:

The design is very simple as both amplification and temperature compensation are done within PSoC.  Resolution should be 1/1000th of full scale, hence a 10-bit ADC is required. The sensor output voltage goes to 90% of the supply voltage, so the ADC range should be vssa vdda. The ADC should operate with the rail-rail buffer enabled. Sensor output is ratiometric and the ADC reference should be Vdda/4.

 

PSoC Top Design and ADC configuration:

 

List of all errors:

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Total error

0.2

2

Non-linearity

0.022

Signal Chain

5

Offset

0

6

Gain error

0.02

7

Offset drift (at 50°C)

0

8

Gain drift (at 50°C)

negligible

9

INL

negligible

 

PSoC Value:

Although not as many analog resources are required when interfacing a pressure sensor with an amplified output, integrating a sensor with other PSoC features such as capsense, segment LCD drive and communication protocols, etc, will lower overall system costs.

Conclusion:

PSoC3 and PSoC 5LP can sense pressure accurately while reducing BOM cost and board space by integrating the analog front-end, ADC, reference and MCU. PSoC ADC inputs can be multiplexed with many inputs (limited only by the GPIO count) allowing interfacing to multiple pressure sensors or other analog sensors. The PSoC Creator design environment makes it easier for you to design and debug, reducing the design time and your time to market.

By Praveen Sekar

]]>
Thu, 06 Dec 2012 08:56:39 -0600
Pressure Sensing with PSoC3 – Part 3/4 http://www.cypress.com/?rID=72816 In part 3, we ll see how to interface an unamplified compensated pressure sensor with PSoC3 and evaluate the system performance. Measurement Specialties MEAS 1210 standard is used for interfacing with PSoC3. The important specifications of MEAS 1210 standard are listed below.

Supply current = 1.5 mA

Pressure Range:  0 -15 psi (Gage)

Sensitivity (max): 10 mV / psi

Sensitivity (min): 5 mV / psi

Temp error - span (max): 0.5 % FSS

Offset (max): 2 mV

Temperature error - offset: 0.5% FSS

Specified temp range: -40 to 125 °C

Bridge resistance (max): 6.4 k (50°C)

Accuracy: +/-0.1 % FSS BFSL

 

Sensor Operation:

The sensor is a piezo-resistive sensor excited by a current and has an output voltage proportional to the pressure and the current. The output voltage has a 50% tolerance and the sensor provides a gain set resistor to calibrate it to 1%. When the sensor is excited by proper current excitation levels specified in the datasheet, the temperature coefficient of span and offset will cause only a very small error in the final measurement (temperature compensated).

 

Design:

The design requires an excitation current of 1.5mA and an ADC to measure the output voltage. With a bridge resistance of 6.4k (max) and excitation current of 1.5mA (current level prescribed in the datasheet for proper temperature compensation), the load voltage of the current source is 9.6V. This means PSoC IDAC cannot directly be used for supplying bridge current because of very high load voltage. To limit external components and get maximum value out of PSoC we can use circuit below.

 

By controlling the VGS of this circuit, the ID can be controlled. VGS is controlled by changing the current of the sinking IDAC. RB ensures the IDAC output voltage is within compliance and optimum. The current sense resistor (0.1%), RSENS,aids in setting the current to 1.5mA. The voltage across RSENS is read by PSoC ADC (0.2%) and the IDAC current is adjusted until ID becomes 1.5mA. With this circuit, we can ensure that the current is accurate to 0.3%. A current accuracy of 2% is the requirement so the temperature error due to offset and span are within datasheet limits.

 

Sensor Common mode output voltage:

With this design the sensor common mode output voltage is given by;

(1.5 * 6.4)/2 + 0.150 /2 + (1.5mA * 0.05)/2 = 4.8 + 0.075 + 0.0375 = 4.91 V

Here, 1.5mA is the sensor current, 6.4k is the max bridge resistance and 0.150 V is the maximum span, 0.05 is the sense resistance.

The sensor common mode voltage is very high to directly feed into PSoC. The ADC with input buffer can accommodate only to within 200 mV of Vdda. The ADC without buffer can t be used because it has low input impedance. The PGA can allow input voltage all the way to the voltage rail, but we ll be limiting the design to supplies with very strict tolerance levels. This is not desirable as various designers might want flexibility in their power supply design (at least support 5% supplies).

Hence to lower the common mode voltage we can use a charge pump that generates a negative voltage. The generated voltage is about -3V using a negative charge pump. The ripple voltage (of <10%) on the charge pump output doesn t have a major effect as long as we set the ADC input sampling frequency as an integral multiple of the ripple frequency (the charge pump clock frequency).

 

ADC input range:

The sensor span is 150mV (max). The ADC input range should be > +/- 0.256V.  

Resolution:

Resolution required in 1/1000th of full scale. At minimum span of 75mV, we require 75uV of voltage resolution. At 15-bit level, the ADC resolution is 64uV. With a gain of 4, the ADC resolution is < 16uV.

At +/-1.024V range, we require 15-bit resolution

At +/-0.256V range, we require 13-bit resolution

Reference:

This measurement requires an absolute reference. The final pressure accuracy depends on the reference accuracy, therefore the internal 1.024 V reference is a good choice.

 

The ADC has four channels:

0.  Sense resistance channel: This channel is used to set the current to 1.5mA

1.  Sensor Channel: Senses the sensor output

2, 3.  Calibration channels: Measures the gain set resistance for calibration

The IDAC has two channels:

1. Passes current through the calibration resistance

2. Passes current through the sensor

The ADC configuration for the pressure sensing channel is shown below.

 

 

 

Pressure Equation:

The pressure is computed from the measured voltage using the following equation.

P = A* (Vo / Si) * Pr

P Pressure (in psi)

V0 Bridge output voltage in mV

Si Span of pressure sensor output in mV

Pr Rated Pressure (in psi)

A I/1.5. I is the actual current flowing into the pressure sensor

 

Calibrations required:

Span Calibration:

The Span of the pressure sensor is calibrated using the gain set resistance provided in the sensor. Using the gain set resistance, r, the span can be calibrated. The gain set resistance is trimmed such that when it s used in conjunction with a differential amplifier, it ll give a 2V span. Working the equations back, you can find that the gain set resistance.

r = (2 * Rf * Si)/ (So Si)

Here, Rf is feedback resistor of the differential amplifier, Si is the span of the pressure sensor output (differential amplifier input) and So is the span at the differential amplifier output. By looking at the datasheet of the part, Rf and So can be found. For MEAS 1210, Rf = 100k and S0 = 2V.  By measuring r, we can find the span,

Si = 2/(1 + (200/r))

 

Performance measures:

Offset:

The sensor has a 2mV offset (max). This can be calibrated out to zero.

Span error:

The gain set resistor can provide an interchangeability accuracy of 1%. In addition, the gain set resistor can be found with 0.1% accuracy only (limited by calibration resistor accuracy. If the calibration resistor is very accurate (0.01%) or calibrated, then the span error will be 1%.

Temperature Error offset:

This has a maximum error of 0.5% FS. This is 0.075 psi.

Temperature Error span:

This has a maximum error of 0.5% FS. This is 0.075psi.

Pressure non-linearity + hysteresis:

Together they contribute 0.15% FS. This is 0.022 psi.

 

Signal Chain:

Offset error:

The offset error of PSoC ADC is <100uV, which can be cancelled by Correlated Double Sampling (CDS).

Offset drift:

Offset drift of PSoC is 0.55uV/°C. At 50°C, this is 11uV. It is 1/7th of minimum resolution (0.015psi). It can be cancelled by Correlated Double Sampling (CDS).

Gain error:

PSoC ADC s calibrated accuracy is 0.2%. There are 2 measurements, 1 voltage measurement and 1 current measurement (current set to 1.5mA). This can contribute to 0.4% error in total.

Gain drift:

Drift is 50 ppm/°C. For 25°C change, it ll be 0.125%.

List of all errors:

 

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Offset

0.2 (Can be calibrated)

2

Span error

 0.1 (best case)

3

Temperature coefficient of offset (50 °C)

0.075

4

Temperature coefficient of span (50 °C)

0.075

5

Non-linearity

0.022

Signal Chain

5

Offset

0

6

Gain error

0.06

7

Offset drift (at 50°C)

0

8

Gain drift (at 50°C)

0.018

9

INL

<0.015

 

PSoC Value:

Apart from integrating the analog front end, ADC, 0.1% precision reference, Op-Amp, IDAC and the MCU and providing a separate channel for accurate temperature measurement, PSoC can integrate miscellaneous features suchascapsense, segment LCD drive and communications protocols. Designing with PSoC creator reduces the design time considerably. The BOM cost and board size can also be significantly reduced.

In the next part we ll see how to interface unamplified compensated pressure sensor with PSoC3.

By Praveen Sekar

]]>
Mon, 03 Dec 2012 10:51:02 -0600
Is there 3rd party mass programming support for PSoC devices? http://www.cypress.com/?rID=72706 Cypress works with a number of third party programming vendors around the world to ensure mass programming support for all PSoC devices. We provide a list of these programming vendors on our general programming landing page:

www.cypress.com/go/programming

Many customers choose to purchase PSoC devices through a Cypress partnered distributor. These distributors will often support programming services for customers. Customers will be able to purchase devices and have those devices programmed prior to delivery or manufacturing. Since our distributors provide these programming services we have ensured that we are working with mutual third party programming companies in order to ensure timely support for our customers. Distributors often support multiple programming vendors for their programming services. We work to ensure that we have qualified at least one programming vendor for each of the Cypress distributors.

www.cypress.com/?app=distiInventory&source=buy

If one has questions or requires additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support

]]>
Fri, 30 Nov 2012 00:17:57 -0600
Pressure Sensing with PSoC3 – Part 2/4: http://www.cypress.com/?rID=72659 In part 2, we ll see how to interface an unamplified uncompensated pressure sensor with PSoC3 and the system performance. We ll use the Honeywell NBPMANS015PGUNV for interfacing with PSoC3. The important specifications of Honeywell NBPMANS015PGUNV are listed below.

Supply voltage = 5V

Pressure Range:  0 -15 psi (Gage)

Sensitivity (max): 6.9 mV / psi (25°C)

Sensitivity (min): 3.3 mV / psi (25°C)

Temp Coefficient of sensitivity (max): -3.8 %

Offset: 35.6 mV (50°C)

Temperature coefficient of offset: 1.5%

Specified temp range: -40 to 125 °C

Bridge resistance (max): 5.9 k (50°C)

Accuracy: +/-0.25 % FSS BFSL

Sensor operation:

This type of pressure sensor is a piezo-resistive sensor (Wheatstone s bridge) driven by a voltage supply. The bridge output voltage is directly proportional to the applied pressure and the supply voltage. The primary sources of error to be factored in while designing with this type of sensor is the sensor offset error, span error and temperature coefficient of span and offset (since the sensor is temperature uncompensated, temperature coefficient of span and offset play a major role in the final error).

Design:

The design parameters of concern are the ADC resolution, input range and reference.

ADC input range:

This parameter is dependent on the maximum voltage output, V0, from the pressure sensor. At 5V supply and using the maximum offset and sensitivity possible, we get;

V0 (max) = 6.9 * 15 + 35.6 = 139.1 mV

ADC input range should be greater than +/-0.256 V.

 

Resolution:

1/1000th of the full scale resolution is sufficient in pressure sensing applications.

Pressure resolution = 15 psi/1000 = 0.015 psi

Voltage resolution = 49.543 mV/1000 = 49.543uV

 

This requires a 16-bit ADC in +/-1.024V range or 14-bit ADC in +/-0.256V range.

Reference:

A ratiometric reference should be used in this case. Hence PSoC reference should be configured for internal vdda/4 , where vdda = 5 volts.

 

PSoC Creator Top Design:

 

The ADC has three channels, one for sensing pressure and the other two used for temperature measurement. The RTD temperature is measured as described in AN70698.  ADC configuration for the pressure sensing channel is shown below.

Note that +/-Vref/4 range can also be used for this configuration in 14-bit mode.

 

Pressure Equation:

From the measured ADC voltage, the pressure is calculated from the equation below;

P = (Vo / S) * Pr

P Pressure (in psi)

V0 Bridge output voltage in mV

S Span in mV

Pr Rated Pressure (in psi)

 

Calibrations required:

 

Room Temperature calibration:

Since span has a very high tolerance, we have to calibrate span before using it. Pressure sensor offset should also be calibrated before use.

 

Offset Calibration:

Offset of the pressure sensor has to be corrected by giving a zero pressure input and measuring the ADC output voltage, Voff.

Voff  = Voffp + Voffs

Voffp Pressure sensor offset

Voffs signal chain offset

 

Span/Gain Calibration:

The span of the pressure sensor is calibrated by applying a full scale pressure input to the pressure sensor and measuring the ADC output voltage, Vfs.

S = Vfs

(Where S is the Span)

By doing span calibration we are calibrating both the span error of the sensor and gain error of the ADC.

 

Temperature calibration:

Both the pressure sensor offset and span varies with temperature and they have to be calibrated. But the sensor datasheet doesn t provide information on the span or offset calibration. It provides only the limits of the error. If the characteristic curve is found by experiment, we can correct for both span and offset temperature coefficient accurately.

 

List of all errors:

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Offset

0 *

2

Span error

0 *

3

Temperature coefficient of offset (50 °C)

1.5  (Can be calibrated)

4

Temperature coefficient of span (50 °C)

-0.6 (Can be calibrated)

5

Non-linearity

0.0375

Signal Chain

5

Offset

0

6

Gain error

0 *

7

Offset drift (at 50°C)

< 0.004

8

Gain drift (at 50°C)

0.01 (can be calibrated)

9

INL

0.02

 

*Note:  Assumes calibration source has zero error.

ADC INL and the sensor non-linearity are the only factors that can t be calibrated and will affect the final measurement.

PSoC Value:

Apart from integrating the analog front end, ADC and the MCU, providing a separate channel for accurate temperature measurement, PSoC can integrate miscellaneous features suchascapsense, segment LCD drive and communications protocols. Designing with PSoC creator can reduce the design time considerably. The BOM cost and board size can also be significantly reduced.

In the next part we ll see how to interface unamplified compensated pressure sensor with PSoC3.

By Praveen Sekar

]]>
Wed, 28 Nov 2012 09:26:55 -0600
Pressure Sensing with PSoC3 – Part 1/4 http://www.cypress.com/?rID=72573 Pressure sensors can come in a variety of technologies, such as piezoresistive, capacitive, electromagnetic etc. Piezoresistive pressure sensors are the most commonly used of this group.

In this four part series, piezo-resistive pressure sensing basics and the PSoC circuits for three types of pressure sensors will be examined. The first part covers piezo-resistive pressure sensor basics and introduces three categories of pressure sensors

Piezo-resistive Pressure sensor basics

 A piezo resistive pressure sensor has a silicon diaphragm whose resistance depends on its tension. The diaphragm undergoes tension whenever there is a pressure. It can be modelled by a Wheatstone s bridge where all the resistors change with pressure. When pressure is applied to the diaphragm, resistance of the two arms (diametrically opposite to each other) increases and the resistance of the other two arms decreases.

 Pressure sensor equations

 The change in resistance can be converted to voltage by voltage or current excitation. The equations involved in voltage and current excitation are shown below.

Voltage Excitation Mode:

In this case, the Wheatstone s bridge is excited by a voltage. Span is defined as the bridge output voltage for rated pressure (full pressure). Span( S) is given by

S = V * R/R

R Change in resistance for rated pressure

R - Bridge resistance

V Excitation voltage

 

R = P * Ps

P Rated Pressure

Ps Pressure sensitivity (Change in resistance for unit change in pressure)

Ps = R * k

k - Normalized pressure sensitivity i.e. Pressure sensitivity for 1ohm resistor

S = V * P * k

Span is independent of bridge resistance. The temperature coefficient of span primarily results from the temperature coefficient of pressure sensitivity which is dependent on the diaphragm material.

 

Current excitation:

In this case, the bridge is excited by a current source. In this case span is given by,

S = I * R * P * k

Where I is the excitation current.

In this case, the span depends on the current source and bridge resistance.  

The temperature coefficient of span results from the temperature coefficient of resistance and the temperature coefficient of pressure sensitivity.  By proper design, the two can be made close to each other. Hence current excited pressure sensors have the design advantage of tweaking the process parameters so as to reduce the effect of temperature on span.

 

Pressure sensor types

The pressure sensor span is generally around 50-150mV. Depending on whether the pressure sensor output is amplified and on whether the pressure sensor is compensated for temperature variations of span and offset, we can have the following categories of pressure sensors

  1. Unamplified uncompensated pressure sensors
  2. Unamplified compensated pressure sensors
  3. Amplified pressure sensors/transmitters.

The next three parts explains interfacing each type of pressure sensor with PSoC and the system performance measures.

 

By Praveen Sekar

]]>
Mon, 26 Nov 2012 09:41:56 -0600
Let PSoC Brighten Your Holidays http://www.cypress.com/?rID=57336 If you have used microcontrollers as long as I have, you have most likely bit-banged a serial protocol a couple of times.  For those of you new to microcontrollers, bit-banging is when you write 1s and 0s to a GPIO port to simulate hardware you controller doesn't have.  It is almost always a pain, it takes excessive CPU cycles and is even worse if you are on the receiving end, like an I2C slave.  If anyone ever asks you to bit-bang an I2C slave, just say NO!  Just trust me on this one!

Anyway, it is impossible for your microcontroller to always have every serial interface that may come along.  For example, I read about a string of 50 Christmas lights that had red, green, and blue LEDs in each bulb and here comes the best part, each bulb is addressable.  Yes, you can control each individual bulb for color and intensity, four bits for each color (red, green, and blue) and 8 bits for intensity.  Of course the string of lights came with its own controller that could generate 12 different patterns, but I wanted to create my own patterns.  With a little Google searching I found that someone had already hacked the asynchronous protocol and bit-banged an IO port to control the lights with some microcontroller.  Nobody had actually created hardware to make this easier or less CPU intensive, you know why? Because nobody else used a PSoC3 or PSoC5 with their powerful UDBs!  Yes a PSoC3/5 can bit bang with the best of them, but why bother when you have extremely flexible hardware, plus bit banging is so 90's. 

The protocol was a 26-bit packet with one start and three stop bits. Each data bit was divided into three 10uS periods.  The first period is always low, the second period was low if the data was a 1 and high if the data bit was a 0 .  The last period is always high.  See images below for bit and packet formats.

 

The packet format is pretty straight forward with the address, brightness level and three colors packed into 26 bits.  See figure below.

I had a choice, be lazy and use a 32-bit wide shifter or use a single 8-bit wide shifter with a slightly more complicated state machine. The 32-bit wide implementation would be easier but would be a bit wasteful in hardware.  The 8-bit wide implementation would take a bit longer, but much more efficient. I choose to go with the 8-bit wide design.  One other nice feature in the UDBs, is that you can create two 4 byte FIFOs for data flowing into or out of an interface.  This turned out to be perfect since it took 4 bytes to transfer the full 26-bit packet.

The string of lights is 50 bulbs long and if you want to update all the bulbs at one time, it would take 200 bytes (50 bulbs * 4 bytes per packet). Since you don t want the processor to just sit and wait for an interface to move data, DMA is the perfect solution. This way I was able to update the entire string using DMA with almost no CPU overhead!  Where the other guys are wasting their CPU cycles toggling bits, the CPU in the PSoC could concentrate on generating cool interactive patterns, converting DMX commands to the light string format, or any other task.  What is even better, I could implement 8 of these interfaces in a single PSoC3 or PSoC5 at the same time.  

Making this interface into a PSoC Creator component, provides a way to setup all the hardware and DMA with a single start command as with all Creator components.  More APIs are added to generate cool lighting patters.  The video below is an example of version 1.0 controlling three strings of light on my house.

This second video shows four strings on the floor in our lunch room.

 

This third video demonstrates yet another use for the lights.

 

Just think of the possibilities interfacing a string of lights to anything that can be measured with a PSoC!

 

Here are a few other images of the actual box the string came in, the string that I modified, my interface board, and a close up view of one of the bulbs.

 

 

 

Stay tuned for an upcoming video with the details of what it took to make the lighting component and how easy it is to interface the string with the Cypress PSoC3 First Touch Kit.

Mark Hastings

]]>
Sun, 18 Nov 2012 11:37:48 -0600
What can you do with PSoC 3 and PSoC 5LP UDBs http://www.cypress.com/?rID=72191 If you have used PSoC 3, PSoC 5 or the up and coming super cool PSoC 5LP, you have probably heard or and most likely made use of the internal UDBs, whether you knew it or not.  UDBs are digital blocks that allow you to make custom digital gadgets. There are a couple of new application notes that were mentioned before in this Blog, that describe the UDBs in detail and teach you how to use them.  See Cypress application notes AN82250 and AN82156.  Many of the standard digital components in Creator s library are actually constructed with UDBs. Below is a list of some of the components that are constructed mainly of UDBs.

I2C, I2S, LIN, SM Bus, SPDIF, SPI, UART, Counters, CRC generator, Glitch filter, Quadrature Decoder, Shift register, Timer, Logic gates, Flops, Digital multiplexers and de-multiplexers, control and status registers, etc. 

You get the picture, but what is currently in the library is by no means the limit of what can be created.  Recently I sent an email to our application and field application engineers and asked what they had created with UDBs.  Here is a list of some of the components people have created with PSoC UDBs.

  • 60Hz Grid Lock PLL
  • Numerically Controlled Oscillator (Used for DDS)
  • Forward Error Correction (FEC) decoder
  • No clock stretch I2C slave
  • Simple components (8bit adder, PWM, digital compares etc )
  • Complex Counters 
  • ADC mux sequencers
  • Holiday Light controller
  • Square root calculator
  • First order IIR filter
  • Hardware state machines
  • Delta sigma modulator
  • UDB discrete Fourier transform
  • Byte packer (sticks two 12-bit values into 3 bytes for RF transmission)
  • 7-Segment Display controller
  • Remote control servo controller
  • Manchester Encoder/Decoder
  • 1-Wire communication interface
  • ClipDetect,  Monitors 16-bit audio and over rides output if value exceeds a certain limit.
  • Audioclkgen,  Creates a factional N reference for the on-chip PLL.  Used in digital audio designs.

Notice that this list contains some pretty weird stuff that you would never find standard in any microcontroller.  You won t even find most this stuff in the standard PSoC Creator library, yet!  The point is, that it doesn t matter.  You can create your own  custom interface or component, that makes your project unique without adding extra external glue logic or a CPLD.

Cypress does have a Community Components page where people can post any component they have created.  Unfortunately it has been a very well kept secret until now.  Do yourself a favor and check out the Community Components page.

Also, if you want to get more training on creating components, read the app notes I mentioned above or look at the community components guidelines on this this page.

If you have created a cool component (or even a weird one), don t be afraid to share it with the Cypress community for your 15 minutes of fame. 

By Mark Hastings

]]>
Thu, 15 Nov 2012 19:30:58 -0600
Making PSoC talk to your computer. http://www.cypress.com/?rID=70889 Let's face it, when you create a USB device, you will want it to communicate with some form of a host interface. Using a UART-USB interface is one way to go about this and COM ports are among the more familiar interfaces. But have you ever tried to develop a device that uses a USB COM port in a custom application, that functions across multiple operating systems, while not running into difficulties?

It used to be with creating host applications for a computer, you only needed to create one application for Windows. In today's world, operating systems such as Mac OS X and Linux are growing in popularity. Additionally, mobile devices running Android are increasing in numbers with the continuous  production of smart phones and tablets. With so many different operating systems available, the need for cross platform functionality is ever so more important.

What if I told you there was a way to develop a PSoC 3 or PSoC 5 application to easily stream general data across USB and provide the foundation for cross platform functionality?  Using the Human Interface Device (HID) class makes this possible. Yes, the same class that is used for mice and keyboards is breaking free from the stereotype that it is limited to a device that requires some form of human interface, such as a button press, to function.

The truth is that the HID protocol provides the perfect foundation to shuttle data back and forth between a PSoC and computer, in applications where high speed data transfer is not required. Best of all is that implementing a generic HID on PSoC is easy to do and creating Graphical User Interfaces (GUIs) on various operating systems such as Windows, Mac OS X, and Linux is fairly straightforward.  AN82072: PSoC 3 / PSoC 5 USB General Data Transfer with Standard OS Drivers will guide you through all the steps required to do so. You will have your PSoC streaming data to a host operating system of your choice in no time! 

You can download this application note from the following link.
AN82072 - PSoC® 3 / PSoC 5 USB General Data Transfer with Standard OS Drivers

 

By Robert Murphy

]]>
Thu, 18 Oct 2012 09:28:47 -0600
PSoC Creator 2.1 Component Pack 4 Released http://www.cypress.com/?rID=70692 PSoC Creator 2.1 Component Pack 4 (CP4) adds 6 new components to Cypress growing library of inbuilt virtual chips or components. To those not familiar with Component Packs they are component-only enhancements to PSoC Creator. So what are these new components?

1.       SMBus and PMBus

These complete Cypress power supervision portfolio for PSoC 3 and PSoC 5, by adding SMBus and PMBus slave communication capability to PSoC. Learn more about PSoC Power Supervision solution at http://www.cypress.com/go/PowerSupervision.

2.       Debouncer

This is probably going to be the most-used component out of all six new releases because it is the easiest and best way to debounce and edge-detect switch inputs to your system, without using your CPU.

3.        Glitch Filter

The hardware glitch filter removes unwanted pulses from a digital signal, and is a frequently used function in digital designs. The Glitch Filter v2.0 is a complete re-design from its previous version which was available as a PSoC Creator concept component.

For more information on switch-debouncing and glitch-filtering, see AN60024.

4.       RTD Calculator

5.       Thermistor Calculator

6.       Thermocouple Calculator

These three new components add easy-to-implement temperature-sensing capability to PSoC Creator s component library. Find out more about temperature-sensing with PSoC 3 and PSoC 5 through the suite of application notes available:

·         AN70698 - Temperature Measurement with RTDs

·         AN66477 - Temperature Measurement with Thermistor

·         AN75511 - Temperature Measurement with Thermocouples

In addition, you may be interested in:

·         AN60590 - Temperature Measurement Using Diode

·         AN65977 - Creating an Interface to a TMP05/TMP06 Digital Temperature Sensor

CP4 also provides an update to the I2C Master/Multi-Master/Slave component, with the addition of an I2C bus multiplexing feature, besides for some minor tweaks.

I have already installed CP4 on my system especially for the debouncer. Many of you may want one or more of these new components, or the more robust I2C. To get all of these, please download Component Pack 4.

]]>
Mon, 15 Oct 2012 09:49:35 -0600
Creator Components Aren’t Just For Hardware http://www.cypress.com/?rID=70445 Often I write programs that can have multiple modes based on a constant or I just want to vary a parameter and rerun the program.  Since the schematic is the main view of the project, it is often beneficial to see the current constants or parameters right on the schematic.  This is done for components such as the DelSig ADC where the resolution of the first configuration is displayed.  This same concept can be used for software only constants as well.

The Constants component is a very simple way to display constants used by the firmware on the schematic.  Also this allows you to change firmware parameters without changing actual source code.  I have created an example component that allows the user to assigns names and values to up to four constants.  The component consists of just a symbol and a header file. Below is what the component would look like on the schematic.  The four constants have already been assigned names, DEBUG, LOOP, DELAY, and COUNT, as well as values.

Figure 1 Example Project Constants Component

 

The configuration is very simple.  The user simply assigns a name and value.  The header file is automatically generated.  The constants defined below will have the instance name pre-pended on the name.  For example, the LOOP constant name will be MyConstants_LOOP .

Figure 2 Configuration dialog of Project Constants Component

 

The generated header file would look like this using the configuration in Figure 2.

 #defineMyConstants_DEBUG   0

#defineMyConstants_LOOP   100

#defineMyConstants_DELAY   95

#defineMyConstants_COUNT   5

 

 

The constants can then be used throughout the firmware, just by including the MyConstants.h header file.  Below is an example of a code snippet that makes use of the constants provided in MyConstants.h.

 

 for(i = 0; i < MyConstants_LOOP; i++)

{

      LCD_Position(1,5);  
   
      LCD_PrintHexUint8(i);

      CyDelay(MyConstants_DELAY);

}

  

The same concept could be used for user created components for a specific application. For example a project phase component that displays on the schematic whether the project is in the release or debug phase.  The header file would contain the #define statements for the different mode.

 

 

Figure 3 Project Phase Component

 

Other similar components can easily be generated by the user, with just some simple basic knowledge of how to create components. For example if you wanted a waveform generator to change the waveform without changing code.

 

Figure 4 Application Mode Example

 

The header file would contain the following:

 

 #defineAppMode_Mode     2

#defineAppMode_SINE     0

#defineAppMode_SQUARE   1

#defineAppMode_TRIANGLE 2

 

 

The firmware would look at the AppMode_Mode constant to determine which waveform to generate, requiring no code changes.

This is just one simple trick to make a project more flexible and easier to change its operation without editing code.  It is also a good way to demo an application to a customer.  The user can then try different operations without editing code.  The MyConst component is generic and can be used with any project.  The ProjectPhase and AppMode components can easily be created by the user in a matter of minutes.

 

By Mark Hastings

]]>
Wed, 10 Oct 2012 16:56:55 -0600
New application Note: AN82250 - Introduction to PSoC PLD Design http://www.cypress.com/?rID=70089

Do you want to use the Programmable Logic Device (PLD) capability of PSoC, and don t know where to start? Or need to create your own custom digital components in PSoC Universal Digital Blocks (UDBs)? Then look no further.

AN82250: PSoC® 3 and PSoC 5 Implementing Programmable Logic Designs An Introduction provides you with an ideal start towards digital mastery with PSoC UDBs. By introducing the PLD architecture, and then walking through an example project, AN82250 teaches you how to create Verilog components in PSoC Creator. For those interested in advanced features of PSoC PLDs and PSoC Creator, these are touched upon in the additional reading material in the appendices.

This application note is actually the second of a three-part series of application notes written to help you learn and exploit PSoC s powerful digital capabilities. This series begins with the introductory AN81623: Digital Design Best Practices, continues with the PLD-centric AN82250, and culminates with the datapath-focused AN81256: Designing PSoC Creator Components With UDB Datapaths.

After reading AN82250, you will be able to implement moderately complex PLD-based components in PSoC Creator. AN82250 also provides a good gateway to building more complex Datapath-based designs dealt with in AN82156. So what are you waiting for? Download AN82250 now!

 

By Antonio De Lima Fernandes

]]>
Wed, 03 Oct 2012 09:25:42 -0600
Designing PSoC Creator Components With UDB Datapaths http://www.cypress.com/?rID=69959 New Application Note AN82156: 

AN82156 - Designing PSoC Creator Components With UDB Datapaths


Have you ever wondered how PSOC Creator manages to pack so much functionality into its components? Chances are the component uses the UDBs in PSoC 3 and PSoC 5 to perform calculations, comparisons, and data management.  The "secret sauce" in the UDBs is the datapath - a configurable 8-bit ALU designed to offload tasks from the CPU. The datapaths, when chained together across UDBs and/or combined with PLD logic, are powerful tools to have at your disposal. Understanding how to use them is an essential part of creating optimized PSoC 3 and PSoC 5 solutions.

AN82156 explains how the datapaths work and teaches you how to develop PSoC Creator components that use the UDB datapaths. It contains step-by-step instructions for creating your first datapath component. The appendices also review the Datapath Configuration Tool and the Verilog code it generates.


If you are planning to create a custom component, you should become familiar with the datapath and the advantages it can offer. AN82156, its example projects, and related on-demand training videos are available today from the Cypress.com website.

AN82156 Landing Page:

On-Demand Videos:

By Greg Reynolds

 

]]>
Mon, 01 Oct 2012 13:17:28 -0600
Getting the most out of the PSoC 3 and PSoC 5 Internal Oscillators http://www.cypress.com/?rID=68138 AN80248 "PSoC 3/PSoC 5 Improving the Accuracy of Internal Oscillators" application note was recently released. This application note is in response to many requests for PSoC Creator components that can trim the Internal Main Oscillator (IMO) and Internal Lo-speed Oscillator (ILO) at run-time.

Trimming simply means adjusting register values to achieve better accuracy be it for offset of a comparator or the frequency of a clock. For clocks, trimming means calibration with respect to a higher accuracy reference clock.

 

 

In the example project associated with the application note (schematic shown above), the IMO is trimmed with a 32 kHz crystal as reference and the ILO is trimmed with the IMO as reference. This enables the IMO to achieve near MHz crystal accuracy (±0.05%) at kHz crystal cost. The ILO performance is also considerably improved with a post-trim accuracy of ±6.5% with respect to the IMO. This means that the respective trim components improve ILO accuracy by a factor of 16, and the IMO accuracy by up to a factor of 140. Moreover, the accuracy can be easily verified on the character LCD (an example is shown below) with a simple API call to check IMO and ILO errors!

 

I really enjoyed developing these two components. Once you program the example project on the PSoC, zap it with freeze-spray or a heat gun and have fun watching the component correct the IMO and ILO frequencies!

In conclusion, having an accurate MHz clock is important for a wide range of applications, and particularly for high-speed communication. An accurate kHz clock also has many applications, especially in low power modes when MHz clocks are switched off.

The IMO and ILO Trim components really enhance the already-flexible clocking structure in PSoC 3 & PSoC 5, and I hope that they help you out in your specific applications as well. You can download the application note and the components at AN80248's landing page.

By Antonio De Lima Fernandes

]]>
Wed, 22 Aug 2012 17:48:12 -0600
Digital Design Best Practices http://www.cypress.com/?rID=68069 For me, one of the most fascinating aspects of PSoC 3 and PSoC 5 is the Universal Digital Blocks (UDBs). They greatly enhance the computational capabilites of PSoC 3/5, to the point where in many cases you can offload most if not all of the CPU's functionality, sometimes leaving the CPU with literally nothing to do after initialization. They contain as many as 24 8-bit datapaths for simple computations - add, subtract, increment, decrement, bitwise AND, OR, XOR, and shift.They also contain as many as 48 small PLDs which can be used to implement combinatorial logic and state machines. The UDBs add a whole dimension to MCU programming that may be new to many designers.

To help you learn about and effectively use the UDBs, we're launching a series of new application notes that cover the topic in great detail. The first one, AN81623, PSoC 3/5 Digital Design Best Practices, is intended to introduce designers, especially firmware engineers, to the field of digital design and how it is done with PSoC 3/5.  Forthcoming application notes will give detailed instruction on the use of PLDs, datapaths and other UDB features.

AN81623 gives a brief introduction to digital hardware design theory and then describes the digital subsystem in PSoC 3 and PSoC 5. It also describes best practices for digital design using PSoC Creator, and shows how to use static timing analysis (STA) report files.

So this application note should help you more effectively use the digital components available to you right now - Counter, Timer, PWM, Shift Register, Quadrature Decoder, and more.  And with the Lookup Table (LUT) component you should easily be able to build simple state machines. Then watch for more advanced application notes, coming soon, that will show how to implement your own complex digital designs in the PSoC 3/5 UDBs.

To download this new application note "Digital Design Best Practices" click on this link, AN81623.

By Mark Ainsworth

]]>
Tue, 21 Aug 2012 17:25:33 -0600
Not just another pretty Waveform Generator http://www.cypress.com/?rID=67707 The WaveDAC8 component and application note (AN69133) was released about a year ago.  I found that many people see the title Easy Waveform Generation with the WaveDAC8 Component and think that it just generates a simple waveform.  The component is far more flexible than that.  The application note AN69133 contains four example projects to show the flexibility and ease of use.  Granted the first project generates a simple sine wave but the other three projects go further. 

The second project, 2_WaveDAC8_TwoWaves shows how you can alternate between two waveforms and easily switch right at the end of each wave.  The project schematic is rather simple, and the source code can t get much simpler.

Project source code.


 

#include<device.h>

void main()

{

 /* Initialize WaveDAC8 */

   WaveDAC8_1_Start();

   for(;;);  /* Loop forever */

}


This is the waveform output, notice it is not just a simple sinewave.

The third project "3_WaveDAC8_UART_FSL" shows how to generate a simple FSK output when you combine the WaveDAC8 and UART components.  Note the simplicity of the schematic below.  By changing the two clocks you can generate any two frequencies you want.

The scope screen shot below shows the output of the UART and the WaveDAC8 output.

Again the code can t get much simpler to send out Hello World .


#include<device.h>

void main()

{

   /* Initialize WaveDAC8  */

   WaveDAC8_1_Start();

   UART_1_Start();  /* Initialize UART */

   Clock_1_Start(); /* Start both clocks */

   Clock_2_Start();

   for(;;)

   {

      /* Send "Hello World"  */

      UART_1_PutString((uint8 *)"Hello World");

      CyDelay(250);   /* Wait 500 mSec */

      CyDelay(250);

    }

}


The forth project was probably the most fun.  Who doesn t enjoy dialing their phone with their own custom made PSoC controlled DTMF dialer.   This project used two WaveDAC8 components, a couple of counters, an opamp to buffer the DAC outputs, and a single clock.

This project demonstrates another cool feature of PSoC.  Since the WaveDAC8 component uses standard internal DACs to generate the output,  connecting the two DAC outputs together is not a problem.  When the DAC is in the voltage DAC mode, it is simply a current DAC with an internal resistor.  Now the coolest thing about this project is that it gives you a good chance to use that FFT feature in your digital scope.  I had the DTMF dialer project dial the sequence 159D which causes all of the eight tones to be exercised.  Using the Tek MSO 2024 FFT mode I can see the frequency spectrum of the output, cool eh?

 

You can find the full application note, example projects, and WaveDAC8 component library on the AN69133 Application Note web page. The application note contains details about the design of the WaveDAC8 and information on sampling theory.

 

So just remember, although the WaveDAC8 maybe pretty, it has some brains as well.  Since it does all it's work with DMA, it does not require any of the valuable PSoC 3 or PSoC 5 CPU cycles.

By Mark Hastings

]]>
Tue, 14 Aug 2012 12:51:43 -0600
AN54439: PSoC 3 and PSoC 5 External Crystal Oscillators Updated http://www.cypress.com/?rID=67353 AN54439, our PSoC 3 and 5 ECO app note, just received a massive overhaul.

 

  • The update includes:
  • A description of the updates to the PSoC Creator 2.1 ECO interface.
  • Descriptions of ECO performance metrics, and how to measure them.
  • An "Advanced Topics" section for ECO experts.
  • A table of recommended MHz resonators with manufacturer specifications, reccomended configurations and typical performance metrics. (Shown below)

Check it out now, and let us know what you think in the comments!

By Max Kingsbury

]]>
Mon, 06 Aug 2012 18:33:17 -0600
Announcing Qualified PSoC 3 JTAG Programming Support Through Goepel: http://www.cypress.com/?rID=66813 Cypress Semiconductor has completed the JTAG programming qualification for Goepel Electronic (http://www.goepel.com/). The qualification covered all electrical requirements, algorithm support, and verification of multiple device packages. Cypress has qualified the 48-SSOP, 48-QFN, 68-QFN, and 100-TQFP packages.

The vendor has released their software update, CASCON GALAXY 4.6.0a 1266, which contains JTAG programming support for the entire PSoC 3 device family. All testing was conducted on the SCAN FLEX SFX/ASL1149 programmer. Prior to programming PSoC 3 devices via JTAG or through a JTAG chain, users will need to ensure they have the latest Cypress supporting software via Goepel and the Goepel JTAG programmers.

Existing CASCON GALAXY users will be able to download the PSoC 3 device support as part of the normal updates.  For new users they will need to purchase the VarioTAP device library when purchasing a CASCON GALAXY license. For more information on device programming capabilities and software pricing please contact the Goepel Sales office:

sales@goepel.com

For more information on PSoC programming please see the following web page for more details:

www.cypress.com/go/programming

If one needs additional device support please file a tech support case so that your request can expedited.

www.cypress.com/go/support

]]>
Thu, 26 Jul 2012 03:24:57 -0600
More Good “Analog” Stuff in PSoC Creator 2.1 http://www.cypress.com/?rID=66715 PSoC Creator 2.1 has just been released and has even more good stuff to help the user design and debug his or her application.  I know that many of you at times wanted more information on just how your signal was routed from a GPIO pin to the DelSig ADC or how an internal signal was connected between a VDAC and Comparator.  Well, wait no more!  Now you can look at any analog route, lock it down and even change it if you have a preference.  Even better, you can do all this graphically.  Here are a couple slides that I created a few months back for an internal training class.  This should be just enough to peak your interest about PSoC Creator 2.1. 

The following is an actual screen shot of the Analog Device Viewer/Editor.  If you look close, note that all the resources used, including routes are highlighted.  You can click on the nets on the right or the graphical routes on the left to examine the nets and routes.

 

Example Circuit

Below is an example circuit and the analog viewer s representation.  Note how AMux_1 consist of the light blue traces.  It is easy to understand just how the signals are routed and exactly the resources used to create the circuit, no more guess work!

 

Lock down signals and component placements graphically

Many of you at times wish you could easily lock down blocks that are used for a specific component implementation.  You may have learned to use the constraints editor but found it a real pain trying to remember the syntax.  I know I did.  Now you can graphically lock down or move blocks right in the analog editor.  I can almost hear the cheers in the background from you seasoned users.

 

Analog Mux and Simulation

Ever asked yourself I wonder exactly how my analog mux is implemented?   I know I have.  Now you can go into the tool and connect the analog mux one channel at a time and see the actual signal path.  No more laying awake at night wondering if your signal took AGL[6] or AGL[7] on its way home to the ADC.

 

View analog switch names, registers, and masks.

This feature is for the real hard core guys that want to know the actual register and mask to control each analog switch.  Now just by hovering over a switch you can get all that information.  No more digging into that big 1000+ page document to try and figure out how to control that one switch.

Measure typical route resistance with an Ohm Meter

This is another cool tool.  The Ohm Meter tool lets you measure the route resistance between any two endpoints of a signal.  Of course the measurement is not exact, but it gives you a ballpark number of what to expect. ( Please ignore the significant digits of the ohm meter reading in the figure below, it has been rounded off in the current version.)

 

 

 

Toggle analog switches interactively in the debugger

This feature is really powerful.  While in the debugger, you can view the state of almost any switch.  The only ones you can t monitor is the state of any switch that is controlled by hardware, such as the hardware mux.  All other analog switches that are part of a route, or controlled by software can be examined interactively.  So each time you halt the operation in the debugger, you can actually view the current state of the switches.  But wait, there s more!  You can actually toggle the state of each switch as well.  This means you can debug any route you want and interactively see what happens when you open or close a switch.  I often use a spare route and pin to internally probe signals.  Yes you heard me, this allows you to probe internal nodes while the chip is running.  If you don t like this feature, you shouldn t call yourself an engineer!

Set breakpoints when a switch opens or closes

OK one more amazing feature.  Just think of being able to click on an analog switch and set a breakpoint when that switch opens, closes, or just changes states.  Yes not kidding!  I dare you to find another vender s tool and MCU that will let you do that!

I hope this was just enough information to give you a taste of some of the new features in PSoC Creator 2.1.  So don t delay, go download PSoC Creator 2.1 and play with some of the new analog debug and design features.   If this isn t enough there are even more features to help you get your design to market faster.  You can download the new feature packed PSoC Creator 2.1 here.  So don t delay, go checkout all the good stuff!

 

By Mark Hastings

 

 

 

 

 

 

]]>
Tue, 24 Jul 2012 19:17:15 -0600
PSoC 3/5 Low-Power Application Note Released http://www.cypress.com/?rID=64726 Power consumption can mean the difference between a good idea and a great product. The proliferation of portable electronics and the growing focus on green technology has increased the importance of reducing a design's power consumption. The PSoC 3 and PSoC 5 low-power modes allow you to reduce average current draw without limiting functionality, especially when implemented with other power-saving features and techniques. A new application note, AN77900 (http://www.cypress.com/?rID=64554), has just been released to help you become familiar with the power-saving features available in the PSoC 3/5 devices.

AN77900 is available on the Cypress website today, contains:

  • An introduction to the low-power features of the PSoC 3/5 devices.
  • Information on reducing power consumption in Active and Alternate Active modes.
  • Examples, tips, and tricks for success with the Sleep and Hibernate low-power modes, including example code.
  • Descriptions and explanations of the registers and API associated with low-power operation.
  • Step-by-step instructions for performing accurate power measurements using the Cypress DVK boards.

Example projects for both the PSoC 3 and PSoC 5 are also included with the application note:

  • Low-power modes and wakeup source examples for PSoC 3.
  • Low-power modes and wakeup source examples for PSoC 5.
  • A simple example project with no low-power optimizations.
  • The same simple example using low-power techniques.

In addition to the application note and example projects, we're pleased to be able to provide you with a spreadsheet that can be used to perform rough "back of the napkin" type estimates for the average power consumption and battery life of your design. The spreadsheet lets you use up to ten different PSoC 3/5 configurations, with selectable settings for various subsystems and components. Based upon those configurations, the spreadsheet will calculate the average power consumption and show an estimated battery life.

AN77900 is a good starting point for anyone who wants to become more familiar with the PSoC 3/5 low-power features. As with all our documentation, we're happy to hear back from you regarding any additional topics that you'd like to see covered in this application note.

By Greg Reynolds

]]>
Fri, 29 Jun 2012 12:28:51 -0600
PSoC 3 8051 Code Optimization http://www.cypress.com/?rID=50833 Have you noticed that sometimes your C code for the PSoC 3 8051 can use up a lot of flash memory?  If you structure your C code to use some unique 8051 features you can use a lot less flash and your code will execute faster too.  And, you don’t have to write any 8051 assembler, you can do it all in C.

 

For more information about 8051 Code Optimization, see application note AN60630.

By Mark Ainsworth

]]>
Mon, 07 May 2012 07:58:20 -0600
Running code in RAM using PSoC5 and the GCC compiler http://www.cypress.com/?rID=61932 Firmware engineers are always looking for ways to write more efficient code.  Often this means executing functions as fast as possible.  One way to improve the execution time of your code when developing for PSoC5 is to place your code into RAM.

Placing code in RAM using GCC

Gcc supports the use of the __attribute__ keyword which allows you to apply special attributes to your code.  There are many attributes you can apply; the one we are interested in is section .

The section attribute places code in a specific memory section as defined in the cm3gcc.ld file.  RAM is defined as the .data section.  So, for example, if you wanted to place a function in RAM the code for the function prototype would look like this:

void foo (void) __attribute__ ((section(".data")));

This method can be used for variables as well.

Interrupt Example

A great use of this feature is to place interrupt handlers in RAM for faster execution time.  If you define your own ISRs you can do this by placing __attribute__ ((section .data ))) after the ISR prototype like a normal function declaration.

If you are using the Cypress generated ISR code you can add a declaration statement to the section of code at the top of the .c file which is provided for the user to include modules and declare variables.

Here is an example:

// place interrupt in SRAM to improve speed

externCY_ISR_PROTO(isr_1_Interrupt) __attribute__ ((section(".data")));

for an isr named isr_1.

Linker Warning

When you place code into the .data section you will get the following warning:

Warning: ignoring changed section attributes for .data

This is because the .data section does not, by default, expect to have code attributes associated with it.  In this case you can ignore the warning, because you intend to add attributes to the .data section.  Even though the warning indicates that the linker is ignoring your attribute, it will still place your code in RAM.  You can verify this in the map file by checking which section your code has been placed in.

To clear this warning you would need to modify the cm3gcc.ld file.  The best approach would be to add a custom section located in RAM for you code.  However, since this is Creator generated source code, changes you make to this file will be overwritten when generating the project APIs.

RAM vs Flash execution

The following table provides some sample data taken to show the code execution speed from flash vs RAM.  There is about a 30 % improvement in execution time when executing out of RAM vs flash.  This data was taken by toggling a pin in an ISR with a varying amount of code, measured in bytes.  The Cortex M3 was running at 24 MHz. There was no difference in the time it took to get into the interrupt.

Code Size (bytes)

Flash Execution Time

RAM Execution Time

% Difference

400

9.8 usec

7 usec

- 29 %

800

19.4 usec

13.4 usec

- 31 %

1600

38.4 usec

26.8 usec

- 30 %

3200

76.8 usec

53.4 usec

- 30 %

 

By Keith Mikoleit

]]>
Thu, 12 Apr 2012 16:42:11 -0600
Using ceramic resonators with PSoC 3 and PSoC 5 http://www.cypress.com/?rID=61516 Did you know that in addition to supporting 4 - 25 MHz crystals, PSoC 3 and 5's MHz ECOs also support ceramic resonators? Although they tend to have more frequency error, resonators are cheaper, come in smaller packages, start up faster, and are more mechanically robust than crystals. They also often have their load capacitors built-in to the resonator package. And, because they have no maximum drive level rating, they can be used without the need for an automatic gain control circuit.

To configure the PSoC 3 and 5 ECO for use with a ceramic resonator, simply use the PSoC Creator Design Wide Resources interface to configure the oscillator as you normally would, then add the following lines in your main.c initialization code:

/* Configure MHz XTAL */

/* Turn automatic gain control off (AGC not necessary for resonators */

CY_SET_REG8(CYREG_FASTCLK_XMHZ_CSR, 0x05);

/* Set the XTAL feedback and watchdog voltages to a reasonable value */

CY_SET_REG8(CYREG_FASTCLK_XMHZ_CFG1, 0x55)

 

Also, be sure to check out AN54439 - PSoC® 3 and PSoC 5 External Oscillator to learn more about using PSoC 3 and 5's powerful ECO circuit.

 

Max Kingsbury

Applications Engineer

]]>
Thu, 05 Apr 2012 13:23:38 -0600
CapSense (R) Button Example - PSoC3 and PSoC5 http://www.cypress.com/?rID=53008 This short video explains how to create PSoC Creator project for CapSense designs

 

 For more information, see the Code Example "CapSense® Button and Slider Example - PSoC® 3 / PSoC 5".

By Jaya Kathuria

]]>
Mon, 02 Apr 2012 18:14:00 -0600
New Qualified Volume Programming Vendors for TrueTouch and PSoC 5 http://www.cypress.com/?rID=59498 RPM Qualified Production Programming for PSoC 5:

Cypress Semiconductor has completed the production programming qualification for all PSoC 5 devices for RPM Systems (http://www.rpmsys.com). The qualification covered all electrical requirements and algorithm support.

RPM has released their software update, revision V1.18.1, which contains the qualified PSoC 5 support. Prior to programming any Cypress PSoC 5 devices the customer, distributor, or vendor must update to the latest revision of software from RPM.

RPM programmers support in-system programming and do not supply sockets for qualification.

Leap Qualified Production Programming for TrueTouch Devices:

Cypress Semiconductor has completed the production programming qualification for Leap Electronic ( www.leap.com.tw). The qualification covered all electrical requirements, algorithm support , and verification of device sockets. Cypress has qualified 68-QFN and 48-QFN sockets from Leap for programming TrueTouch devices.

Leap Electronic has released their software update, revision V1.41.1, which contains the qualified TrueTouch support. Prior to programming any Cypress TrueTouch devices the distributor or vendor must update to the latest revision of software from Leap.

The following table details the Leap adapter Support

PSoC 3 Device MPN

PSoC 3 Device Package

Adapter Part Number

          CY8CTMA395-LTI-00

68 QFN

AH-400A-CYXXX-QFN68

          CY8CTMA395-LTI-01

48 QFN

AH-400A-CYXXX-QFN68

For more information on PSoC production programming and programming in general please see the following web page for more details:

www.cypress.com/go/programming


If one needs additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support

]]>
Mon, 20 Feb 2012 03:53:31 -0600
USB HID Bootloader for PSoC® 3 and PSoC 5 http://www.cypress.com/?rID=58807 Bootloading is one of the basic features that a microcontroller architecture is expected to have. Bootloading is a process by which you can upgrade a device firmware in field via standard communication protocols such I2C,SPI, USB and CAN. USB is one of the preferred protocols to bootload PSoC devices due to its robustness and omnipresence. Moreover PSoC3 bootloader is implemented using the standard USB HID interface. Most of the embedded host which has USB Host capability come with HID driver. The support for HID devices available in most operating systems is even more encouraging having a USB HID based solution.

AN73503 USB HID Bootloader provides a complete USB HID Bootloader solution for PSoC3 and PSoC5. The App Note explains,

  • Procedure to create a USB Bootloader project

  • Procedure to create a USB Bootloadable project

  • Create your own Graphical User Interface (GUI) to Bootload via USB

Each of the above is explained with a working example. A precompiled stand alone GUI is also available with the application note that can be used to perform Bootloading. This App Note can be used as a starting point to develop your own USB Bootloader GUI and add additional features as desired.

]]>
Thu, 02 Feb 2012 15:14:33 -0600
Using PSoC®3 / PSoC 5 GPIO Pins http://www.cypress.com/?rID=58708 Gone are the days of restrictive pin-out selection with microcontrollers. The any-signal-to-any-pin routing available with the PSoC 3 and PSoC 5 GPIOs can help optimize PCB layout, shorten design time, and even allow for a large degree of solder-less rework. However, with this freedom comes a steeper learning curve than with a traditional microcontroller. The topics presented in AN72382 introduce readers to PSoC 3 and PSoC 5 GPIO basics and demonstrate techniques for their effective use in a design, including:

  • GPIO Pin Basics physical structure, internal routing, startup and low-power behavior.
  • GPIO Pins and PSoC Creator using APIs, placing pin component symbols and macros, manual pin assignment.
  • API and Register Reference component API, per-pin API, GPIO registers, nonvolatile latches.
  • Examples, Tips, and Tricks a dozen examples from Hello World to controlling analog switching with hardware.

 

Application note AN72382 is a great starting point for anyone looking to become more familiar with the possibilities available when using PSoC 3 and PSoC 5 GPIO pins. The examples include step-by-step instructions and sample code that can be integrated into your project.

]]>
Mon, 30 Jan 2012 12:40:22 -0600
Accurately Measuring Temperature Using PSoC3/PSoC5 http://www.cypress.com/?rID=58448 There are four types of sensors that are commonly used for temperature measurement: Thermocouple, Thermistor, Resistance Temperature Detector (RTD) and diode. Of these, RTD has the best linearity and repeatability and is the sensor of choice when it comes to accurate temperature measurement in -200°C to 850°C range.

The resistance of an RTD varies with temperature in the following manner.

Once we find the resistance of the RTD, the temperature can be found using (inverse of) the above equations. But finding the inverse equation is very math intensive. The optimal approach is to determine the polynomial fit to find resistance from temperature. Using a higher order polynomial is computation intensive while using a lower order polynomial may not yield accurate results. AN70698 Temperature Measurement with RTDs provides a PSoC Creator Component for RTD where you can easily choose an appropriate polynomial based on your temperature range and accuracy required.

 

The PSoC Creator Component solves one part of the puzzle: converting the measured resistance accurately to temperature. The bigger part is finding the resistance accurately. AN70698 discusses the pros and cons of some circuits commonly used for measuring resistance and describes a method (shown below) where the resistance can be measured accurately using PSoC3/PSoC5 s IDAC, 20-bit delta sigma ADC and one precise external resistance.

 

 

The application note lists all significant sources of error so you know beforehand what accuracy to expect at a certain temperature.

Error Source

Error Value at 150 °C (0.1% Reference Resistor, class B RTD)

Error Value at 150°C (Both Reference Resistor and RTD Calibrated)

Offset Error/drift

0 °C

0 °C

Gain Error/drift

0 °C

0 °C

ADC INL*

0.79 °C

0.79 °C

Error due to reference resistor (Ambient Temperature = 25 °C)

0.43 °C

limited only by calibration accuracy and reference resistor temperature coefficient(very accurate)

Error due to RTD interchangeability (Class B RTD)

1.05 °C

Limited only by calibration accuracy (very accurate)

Polynomial fit error (fifth-order polynomial)

0.0003 °C

0.0003 °C

RTD self-heating error

< 0.01 °C

<0.01 °C

Note(*): This error indicates the worst-case limit. The actual temperature error will be much lower, depending on the INL at that point. In most cases, the error will be < 0.1 °C.

Integrated 20-bit Delta Sigma ADC and IDAC combined with the RTD component simplifies designing with RTDs and gives you an experience no other design platform provides. PSoC3/PSoC5 also provides direct segment LCD drive for displaying temperature and a host of communication peripherals (I2C, SPI, UART, USB, SMBus, PMBus) for inter-IC communication or communication to a PC for data logging.

]]>
Fri, 27 Jan 2012 01:09:26 -0600
Single-Cell Lithium-Ion Battery Charger using PSoC 3 http://www.cypress.com/?rID=58567 Li-ion batteries are used in a wide range of systems such as cameras, cell phones, electric shavers, and toys. The charging circuit for the batteries can either be an integral part of the system (online charging) or an external plug-in circuit (offline charging). With its wide range of devices, PSoC 3 offers a cost-effective solution in both segments. And with its configurable digital and analog features, PSoC 3 enables implementation of other critical tasks required in the system.

PSoC 3 Implementation

Figure below shows the overall block diagram for implementation of the Li-ion battery charger with a PSoC 3 device. The implementation is broken down into three blocks:

  • Battery parameter measurement
  • Charging algorithm
  • External current control

Additionally, a protection block is provided for additional features related to the battery protection. The external current control can be either linear or switching type of implementation. For more information on each of these blocks and the components used, and detailed information about their implementation using PSoC 3, please refer AN73648 PSoC3 Single Cell Lithium Ion Battery Charger. The application note also provides a PSoC Creator project, which includes a charge display tool and demonstrates Li-ion battery charging.

]]>
Tue, 24 Jan 2012 18:53:12 -0600
Programming PSoC 3 / PSoC 5 Using External Microcontroller http://www.cypress.com/?rID=57991 PSoC 3 / PSoC 5 device programming refers to the programming of the nonvolatile memory in PSoC 3 / PSoC 5 using an external host programmer. The host can be the MiniProg3 Programmer supplied by Cypress; a third-party programmer; or a custom-made programmer, such as an on-board microcontroller.

MiniProg3 is used during the prototype stage of application development to program and debug PSoC 3 or PSoC 5 target devices on a development board. Third-party programmers are used for production programming of PSoC 3 or PSoC 5 in large numbers. Those programmers are used after the design is completed and the application goes for mass production. In addition, custom-developed host programmers, such as external microcontrollers, can perform in-system programming of PSoC 3 or PSoC 5 devices.

The application note AN73054 - PSoC® 3 / PSoC 5 Programming Using an External Microcontroller (HSSP) will enable in the rapid development of in-system programmers by providing a portable, modular C code that can be easily ported to any host programmer development platform with minimal changes. The following are the broad changes required while porting the code to a specific host programmer.

  • SWD physical layer routines to access (read, write) the programming pins. These routines will have to be modified based on the method of accessing  an I/O pin state in the host programmer
  • The method of getting the data to be programmed to the target PSoC 3/5. Some host programmers might use the on-chip memory to store the data to be programmed; other host programmers might use a communication interface like USB, SPI to get the programming data

Refer to the application note AN73054 - PSoC® 3 / PSoC 5 Programming Using an External Microcontroller (HSSP) for complete details on creating an in-system programming solution for PSoC 3/5. The example project provided with the application note uses a PSoC 5 as a host programmer to program the target PSoC 3/5 device.

]]>
Fri, 06 Jan 2012 19:24:49 -0600
PSoC® 1 Segment LCD Direct Drive http://www.cypress.com/?rID=57848

Segment LCDs are available in two forms - segment LCD glass and the segment LCD module, which comes with inbuilt driver. Many times, it is difficult to get all the required display features on a LCD module. One possibility is to use a custom LCD glass and an external driver. But this increases the cost of the system. Cypress PSoC chip can do segment LCD glass drive besides executing some other major tasks with its configurable digital/analog hardware and with its 8-bit MCU. It integrates multiple functions of the system within a single chip offering significant BOM savings.

Segment LCD Drive in PSoC 1

PSoC Designer provides SLCD user module (UM) that can directly drive a multiplexed segment LCD. The SLCD UM has the following features:

  • Drives LCD with ½ bias
  • Supports 2, 3, and 4 common LCD
  • 30 150 Hz refresh rate
  • Supports Type A waveform
  • Contrast control Feature

Support for Numeric (7 segment), alphanumeric (14 and 16 segment) and special symbols

SLCD is a firmware based module where the CPU generates the ½ bias waveforms by configuring the pins and associated registers. To time the refresh events, periodic interrupts are generated to the CPU using a timer. This timer is embedded within the module.

SLCD module provides two unique techniques to drive the LCD:

1.     AMUX Drive

2.     GPIO Direct Drive

Application note AN56384 PSoC1 Segment LCD Direct Drive provides more information on these techniques to drive segment LCDs and explains how to create Segment LCD based PSoC project using PSoC Designer IDE tool.]]>
Tue, 03 Jan 2012 15:52:05 -0600
PSoC Designer 5.2 Software Release http://www.cypress.com/?rID=57659 I want to announce the release of PSoC Designer 5.2 which is available through the PSoC Designer web page:

www.cypress.com/go/psocdesigner

PSoC Designer 5.2 is a minor release and will coexist with existing PSoC Designer 4.4, 5.0 and 5.1 installations.

The PSoC Designer 5.2 release has added the notable new features:

  • Updated ImageCraft compiler
  • Boot.tpl update to support custom code merge sections
  • Support for CY8C20xx6L Device Family
  • New SmartLED User Module
    • CY8C20xx6L Devices Only
  • New CSDe User Module
    • CY8C20xx6L Devices Only
  • Ovation ONS II LP Device Support
  • Update to PowerPSoC SREG Sleep settings
  • LINS user module support on new CY8C29xxx Automotive Devices
  • New Wireless-NL User Module for all Encore II devices
  • Update to SmartSense_EMC User Module
  • Update to ADC10 and CSDADC User Modules
  • New Device Package Support for CY7C638xx devices
  • Co-existence with past PSoC Designer releases


We are also pleased to announce the PSoC Designer Youtube page. The Designer Team will post new videos announcing new features and walk users through example projects. Currently we have a tutorial walkthrough for “Your First PSoC Designer Project.” This video can be found directly on the Youtube channel or linked on the PSoC Designer landing age.

http://www.youtube.com/user/PSoCDesigner
http://www.cypress.com/go/psocdesigner


Thank you and Cypress appreciates your continued support of PSoC Designer.

]]>
Thu, 29 Dec 2011 01:51:14 -0600
Hilo Qualified Production Programming for PSoC 5: http://www.cypress.com/?rID=57653 Cypress Semiconductor has completed the production programming qualification for Hilo Systems (http://www.hilosystems.com.tw/). The qualification covered all electrical requirements, algorithm support (SWD protocol only), and verification of device sockets. Cypress has qualified 100-TQFP sockets from Hilo for programming PSoC 5 devices.

Hilo has released their software update, revision V3.06B, which contains the qualified PSoC 5 support. Prior to programming any Cypress PSoC 5 devices the distributor or vendor must update to the latest revision of software from Hilo.

The following table details the Hilo adapter Support

PSoC 5 Device MPN

PSoC 5 Device Package

Adapter Part Number

CY8C5588AXI-060 100TQFP ADP-CY8C3X-QF-100

CY8C5588LTI-114-ES1

68 QFN

ADP-CY8CTMA395-QN68

Hilo Systems currently supports the device listed above and will add additional Marketing Part Numbers and support the entire PSoC 5 family.

For more information on PSoC production programming and programming in general please see the following web page for more details:

www.cypress.com/go/programming

If one needs additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support

]]>
Thu, 29 Dec 2011 00:39:11 -0600
Miniprog3 *B Revision Update: http://www.cypress.com/?rID=57318 Cypress Semiconductor has completed a hardware update to the Miniprog3 to address hardware issues seen with programming, ESD, and power management. The Miniprog3 *B programmer will be available through the Cypress Online Store and the Miniprog3 web page:

www.cypress.com/go/CY8CKIT-002

The Miniprog3 revision, either *A or *B, is indicated using sticker on the back of the programmers. PSoC Programmer software has also added the ability to detect which revision is connected. The following are a list of updates made to the Miniprog3 *B programmer.

Updated Hardware to Improve Power Cycle Programming:

The Miniprog3 hardware has been updated to better improve power cycle programming for all PSoC devices. It was discovered that the Miniprog3 *A programmer revision did not correctly implement the power cycle programming methodology. Due to this issue the Miniprog3 *A programmer could not correctly support power cycle programming for PSoC 3 and PSoC 5 devices. This specifically impacts customers who do not route out the XRES line to the programming connector or disable the optional XRES line on certain devices. The *B revision of the Miniprog3 will support power cycle programming for all PSoC 3 and PSoC 5 devices.

Over-current and Non-Polarized Connection Issues:

There are known electrical risks to the Miniprog3 *A revision that have been addressed with the *B update. To address the electrical issues the Miniprog3 *B programmer has added ESD over-current protection to the USB lines and has added electrical protection to the 5 and 10-pin connectors in case of a reverse polarity condition.

Improved Voltage Detection Capabilities:

The Miniprog3 *B programmer has been updated to improve the voltage detection capabilities. The Miniprog3 will measure the target voltage within an accuracy of 20 mV for a range of 1.8V – 5.0V.

Supported Software:

The Miniprog3 *B programmer is supported on the latest release of PSoC Programmer. To download the latest release, please navigate to the PSoC Programmer web page:

www.cypress.com/go/psocprogrammer

 If one needs additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support
 

]]>
Wed, 21 Dec 2011 05:26:04 -0600
Elnec Qualified Production Programming for PSoC 5: http://www.cypress.com/?rID=57246 Cypress Semiconductor has completed the production programming qualification for Elnec (http://www.elnec.com). The qualification covered all electrical requirements, algorithm support (SWD protocol only), and verification of device sockets. Cypress has qualified 100-TQFP sockets from Elnec for programming PSoC 5 devices.

Elnec has released their software update, revision V2.84k/12.2011, which contains the qualified PSoC 5 support. Prior to programming any Cypress PSoC 5 devices the distributor or vendor must update to the latest revision of software from Elnec.

The following table details the Elnec adapter Support

 

PSoC 5 Device MPN

PSoC 5 Device Package

Adapter Part Number

CY8C5588AXI-060

100TQFP

DIL 48/QFP100 ZIF CY-2

Elnec Systems currently supports the device listed above and will add the remaining PSoC 5 device support before the end of the quarter 2011.

For more information on PSoC production programming and programming in general please see the following web page for more details:  

www.cypress.com/go/programming

If one needs additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support

PSoC Programmer 3.13.4 Release:

We are pleased to announce the release of PSoC Programmer 3.13.4 which is available at the following web page:

www.cypress.com/go/psocprogrammer  

PSoC Programmer 3.13.4 provides the following updates:

Defect fixes to support Ovation II devices

  • Updated PSoC 3 and GEN4 device support list
  • Supports PSoC Designer and PSoC Creator releases

For more information on the software update please see the PSoC Programmer release notes and user guide linked on the PSoC Programmer web page.

]]>
Tue, 20 Dec 2011 06:25:01 -0600
PSoC3 and PSoC5 Interrupts http://www.cypress.com/?rID=57217 Interrupts are an important part of any embedded application. They free the CPU from having to continuously poll the occurrence of a specific event and, instead, notify the CPU only when that event occurs. In system-on-chip (SoC) architectures, such as PSoC 3 and PSoC 5, interrupts are frequently used to communicate the status of the different on-chip peripherals to the CPU.

Unique Features of PSoC 3 and PSoC 5 Interrupts

PSoC 3 and PSoC 5 provide the following enhanced interrupt features that are not supported by the other traditional microcontrollers:

  • Configurable Interrupt Vector Address: In PSoC 3 and PSoC 5, you can dynamically configure the interrupt vector address. The CPU execution can be directly branched to any ISR code when the interrupt occurs. In traditional microcontrollers, the interrupt vector address is fixed for each interrupt line. Typically, a JUMP instruction is placed in that fixed address to branch the CPU execution to the actual ISR code. This unique feature reduces the interrupt execution latency in PSoC 3 and PSoC 5 compared to the traditional microcontrollers.
  • Flexible Interrupt Sources:In traditional microcontrollers, the interrupt source is fixed for each interrupt line. PSoC 3 and PSoC 5, give you the flexibility to choose the interrupt source for each interrupt line. This flexible architecture enables any digital signal to be configured as an interrupt source.

Interrupt Support in PSoC Creator

PSoC Creator supports interrupts by providing them as a component. The Interrupt component is available under the System tab in the Component Catalog window as shown infigure below. Each instance of the interrupt component is an interrupt line. The interrupt source should be connected to the interrupt component in the schematic.

 

For more information on interrupts in PSoC3 and PSoC5, please refer Application note AN54460 PSoC3 and PSoC5 Interrupts, which introduces you to the interrupt architecture, and explains the support for interrupts in the PSoC Creator Software, the development tool for PSoC 3 and PSoC 5. Advanced interrupt concepts such as handling re-entrant functions and fixed function interrupts are also explained in detail. Code examples are provided to explain the different use cases of interrupts. Please access the application note webpage for document and zip file containing the example projects.

]]>
Mon, 19 Dec 2011 16:56:24 -0600
ADC Data Buffering using DMA in PSoC3 and PSoC5 http://www.cypress.com/?rID=57094 The DMA controller in PSoC® 3 and PSoC 5 is used to handle data transfer without CPU intervention. AN52705 - PSoC® 3 and PSoC 5 - Getting Started with DMA provides an overview of DMA in PSoC3/5 and information on different ways to configure the DMA channels o perform data transfers.

The DMA can be very useful in applications that require ADC data buffering and allows the CPU to do other tasks simultaneously.  The Delta-Sigma ADC has programmable resolutions from 8-bits to 20-bits. This ADC output is available in 32-bit format consisting of four 8-bit registers: OUTSAMP, OUTSAMPM, OUTSAMPH, and OUTSAMPS registers. The OUTSAMPS register gives sign extension of the data if OUTSAMPH is read as a 16-bit register. In the default ADC configuration, the output is aligned to the least significant bit (LSB). Hence for an n bit resolution, the ADC result is always available in the least n bits starting from OUTSAMP.

8-Bit ADC Data Buffering Using DMA

For 8-bit ADC data buffering, the contents of OUTSAMP register should be moved to memory buffer on each EoC (End of Conversion) signal. The ADC generates an EoC signal at the end of each conversion, which can be used as the DMA channel trigger to buffer the ADC data. The block diagram illustrating 8-bit transfer is as follows.

AN61102 PSoC3 and PSoC5 ADC Data Buffering using DMA provides a detailed example project implementing the above block diagram. The application note also explains basics of 16-bit, and 20-bit Delta-Sigma ADC data buffering using DMA with example projects. The 20-bit example project accompanying this application note demonstrates problems with data buffering using DMA and how to tackle this using multiple DMA channels. The application note also includes an example project on 12-bit SAR ADC data buffering for PSoC 5 device.

Please access the application note webpage to download the document and zip file containing the example projects. Note that these are all updated to work with PSoC Creator 2.0, the latest edition of our PSoC Creator software.

]]>
Thu, 15 Dec 2011 13:20:30 -0600
Direct Memory Access in PSoC®3 and PSoC®5 http://www.cypress.com/?rID=56045 PSoC®3 and PSoC®5 devices feature a Direct Memory Access (DMA) engine, which can used for data transfer between on-chip elements without any CPU intervention. The DMA engine is part of a high performance bus known as the peripheral hub (PHUB). The PHUB is a programmable and configurable central bus backbone within PSoC3/PSoC5 devices that ties the various on-chip system elements together. It consists of multiple spokes; each spoke is connected to one or more peripheral blocks.

The DMA with the help of Transaction Descriptors (TD) can move data from a source to destination at very high speeds. The TDs can be chained together to perform complex data transfers. The following diagram illustrates a simple data transfer using DMA.

The key features of PSoC® 3 and PSoC® 5 DMA are:

  • 24 DMA channels
  • Each channel has one or more Transaction Descriptors (TDs) to configure channel behavior. Up to 128 total TDs can be defined
  • TDs can be dynamically updated
  • Eight levels of priority per channel
  • Any digitally routable signal, the CPU, or another DMA channel, can trigger a transaction
  • Each channel can generate up to two interrupts per transfer
  • Transactions can be stalled or canceled
  • Supports transaction size of infinite or 1 to 64k bytes
  • TDs may be nested and/or chained for complex transactions

Please refer AN52705 - PSoC® 3 and PSoC 5 - Getting Started with DMAfor information on different ways to configure the DMA channel and TD to perform data transfers. The application note also has example projects and a brief video.

 

By Kaushik Subramanian

]]>
Wed, 14 Dec 2011 09:50:50 -0600
Getting Started with I2C in PSoC1 http://www.cypress.com/?rID=56732 The Cypress PSoC 1 product family offers several choices for implementing I2C in a design. These choices come in the form of user modules (UMs) that are found in the PSoC Designer IDE. The I2C communication itself is handled by a dedicated I2C hardware (HW) block which removes much of the I2C processing burden from the CPU, freeing the CPU to do more important real-time tasks.

Figure 1: I2C Hardware Block

The HW block is a serial to parallel processor designed to interface the PSoC 1 to an I2C bus. The HW block takes the burden off the CPU by providing support for HW detection of I2C status and generation of I2C signals.

EzI2Cs

The first user module to consider is the EzI2Cs UM. The EzI2Cs UM operates exclusively as a slave; there is no master version of EzI2C. The EzI2Cs UM is a firmware layer on top of the I2C hardware block. It requires minimal user knowledge of how the I2C bus works by allowing you to setup a data structure in user code, and exposing that structure to the I2C master. All I2C transactions happen in the background through interrupts. You need not worry about any of the I2C functionality once the user module is started in the main code.

I2CHW

This user module is a firmware layer on top of the I2C HW bloc and can be used as a slave, master, or multi-master slave. Unlike EzI2Cs, this user module requires more designer interaction. Status bits must be checked to see if an I2C transaction occurred. The main firmware also needs to check for error conditions on a transaction. Finally, user code must clear the status bits that are set.

For a detailed overview of the I2C block in PSoC1 and example usage of the user modules described above, please refer application note AN50987 - Getting Started with I2C in PSoC® 1.

]]>
Wed, 14 Dec 2011 09:49:23 -0600
PSoC® 1 - Implementing Hysteresis Comparator http://www.cypress.com/?rID=56941 The comparator is the most fundamental building block of a mixed-signal design. It is essentially a differential amplifier with an extremely high open loop gain. In order to improve the stability of the output with noisy inputs, hysteresis is used in the design, by creating two thresholds - one threshold for the output to switch from low to high and another for the output to switch from high to low.

Hysteresis comparator in PSoC1 can be implemented using either of the following types of analog blocks:

1.    Continuous time (CT) analog block

2.    Switched capacitor (SC) analog block

The CT block in PSoC1 includes an opamp and a resistor array. This makes the analog block useful for functions such as programmable gain amplifier (PGA) and comparators. The SC block of PSoC1 includes an opamp with a switched capacitor network around it. This architecture is useful in the design of integrator, differentiator, filter, amplifier, DAC and comparator.

Hysteresis Comparator using SC Block

The COMP user module in PSoC Designer can be used to design hysteresis comparators using the CT block. It is also possible to make an SC block comparator with the hysteresis. The SC block comparator s threshold level is determined by the ratio of two internal capacitors. This produces a comparator with the hysteresis that:

  • Has no external components
  • Allows the hysteresis thresholds to be easily changed in firmware

Figure below shows an SC block configured as a programmable threshold comparator.

 

AN2108 PSoC1 Impementing Hysteresis Comparators describes a detailed example to show how SC blocks can be used for such a design in PSoC1. In addition, two other design examples are also shown, along with commented firmware projects:

Design 1 shows a hysteresis comparator implementation using a CT block and external resistors. This architecture allows precise setting of the hysteresis.

Design 2 shows a unique technique to implement a comparator with independently controllable hysteresis thresholds.

Please access the application note webpage to download the document and zip file containing the example projects. 

]]>
Wed, 14 Dec 2011 09:47:43 -0600
Annotation Components now in Creator 2.0! http://www.cypress.com/?rID=57047 Have you ever wanted to add components to a schematic in Creator just to make it clearer to understand? Creator 2.0 now has Annotation components to allow significantly better documentation and readability of your PSoC Creator based schematics.

A view before:

Creator 2.0 with anotation components:

Checkout www.cypress.com/go/creator for more cool stuff about Creator 2.0!

]]>
Tue, 13 Dec 2011 18:48:20 -0600
Elnec Qualified Production Programming for PSoC 3 http://www.cypress.com/?rID=56971 Cypress Semiconductor has completed the production programming qualification for Elnec (http://www.elnec.com). The qualification covered all electrical requirements, algorithm support (SWD protocol only), and verification of device sockets. Cypress has qualified all 48-SSOP, 48-QFN, 68-QFN, and 100-TQFP sockets from Elnec for programming PSoC 3 devices.

Elnec has released their software update, revision V2.83n/11.2011, which contains the qualified PSoC 3 support. Prior to programming any Cypress PSoC 3 devices the distributor or vendor must update to the latest revision of software from Elnec.

The following table details the Elnec adapter Support

PSoC 3 Device Package

Adapter Part Number

48 SSOP

48SSOP:ZIF-CS CY-1

48QFN

48QFN:ZIF-CS CY-2

68QFN

68QFN:ZIF-CS CY-2

100TQFP

100TQFP:ZIF-CS CY-2

 
Elnec Systems supports all PSoC 3 marketing part numbers.

For more information on PSoC production programming and programming in general please see the following web page for more details:

www.cypress.com/go/programming 

]]>
Mon, 12 Dec 2011 00:03:20 -0600
RPM Systems Qualified Production Programming for PSoC 3 http://www.cypress.com/?rID=56970 Cypress Semiconductor has completed the production programming qualification for RPM Systems (http://www.rpmsys.com). The qualification covered all electrical requirements and algorithm support (SWD protocol only). RPM Systems programmers are analogous to the Miniprog3 and provide in-system programming for PSoC Devices. RPM Systems does not sell programming sockets like other volume manufacturers.

Cypress has qualified 48-QFN, 48-SSOP, 68-QFN, and 100-TQFP devices from RPM Systems for programming PSoC3 devices.

RPM Systems has released their software update, revision V 1.17.4, which contains the qualified PSoC 3 support. Prior to programming any Cypress PSoC 3 devices the distributor or vendor must update to the latest revision of software from RPM Systems.

RPM Systems supports all PSoC 3 marketing part numbers.

For more information on PSoC production programming and general programming please see the following web page for more details:

www.cypress.com/go/programming 

]]>
Mon, 12 Dec 2011 00:00:26 -0600
Dynamic Reconfiguration with PSoC http://www.cypress.com/?rID=56889 Every programmable semiconductor device, including PSoC has limited resources. Cypress PSoC devices feature dynamic reconfiguration that enables designers to reuse analog and digital resources and achieve greater levels of functionality.

Interrupts and Dynamic Reconfiguration

Dynamic reconfiguration allows digital and analog blocks to be shared between different user modules, performing different functions at different times. This requires designers to handle interrupts differently from normal PSoC usage and choose the ISR to execute, based on which user module is loaded at any given time. For example, a digital block may share functionality between a Timer and SPI user module. Each of these UMs have a unique interrupt service routine, however, they share the same interrupt vector.

Therefore, the interrupt vector must be routed to the ISR for the user module that is loaded when the interrupt occurs. It is best to place user modules in such a way that the number of shared interrupt vectors is minimized.

The code excerpt below is taken from the interrupt vector table located in boot.asm file.

org   2Ch    ;PSoC Block DCB03 Interrupt Vector

ljmp  Dispatch_INTERRUPT_11

reti

Normally this interrupt vector would have jumped to a routine with a name specific to the user module. The vector now jumps to a routine called Dispatch_INTERRUPT_11 instead of the user module s ISR. This interrupt handler consecutively checks each configuration that shares the block to determine the active one. When it finds the active configuration, it jumps to the appropriate ISR for the loaded user module. If many configurations share the same block, this function may take longer to execute. This also causes different interrupts to have different latencies.

For more information about setting up dynamic reconfiguration in PSoC along with an example project, please refer AN2104 Dynamic Reconfiguration using PSoC Designer.

]]>
Thu, 08 Dec 2011 12:07:45 -0600
Making Waves with the WaveDAC8 PSoC Creator Component http://www.cypress.com/?rID=54769 This video is a brief overview of the just released application note AN69133.  It explains how the WaveDAC8 PSoC Creator component works and provides four example projects that can be used to explore its many uses.  The WaveDAC8 is compatible with both PSoC3 and PSoC5 using PSoC Creator 1.0 SP2 or greater.

For more information on how to use the WaveDAC8 component and download the example projects, go to the AN69133 page.

 

By Mark Hastings

]]>
Tue, 06 Dec 2011 11:27:56 -0600
PsoC1 Power Savings Using Sleep Mode http://www.cypress.com/?rID=56620 The importance of system power consumption management cannot be overstated. The use of PSoC s sleep mode is a simple and efficient way to reduce overall current draw without limiting the functionality. Significant power savings can be realized if attention is given to the proper entry, use, and exit of sleep mode. When implemented in conjunction with other power-saving features and techniques, sleep mode can be extremely effective in reducing  the  overall power consumption in a PSoC-based design. Below are two examples of techniques to reduce the power consumption in sleep mode by disabling PSoC features that may remain active when the SLEEP bit is set.

Disable Analog Block References

PSoC Analog Blocks have individual power-down settings that are controlled by the firmware. The Analog Block References can be disabled  by a  write to the PWR bits [2:0] of the  ARF_CR register, similar to the code below:

ARF_CR &= 0xf8; //Turn off analog reference

Disable CT/SC Blocks

The continuous time (CT) blocks are powered down individually with a write to each ACBxxCRy or ACExxCRy register corresponding to the block s column. The switch capacitor (SC) blocks are similarly controlled by the ASCxxCRy or ASDxxCRy registers. The example below shows how to disable the CT and SC blocks for column zero.

ACB00CR2 &= 0xfc; // Disable CT Block

ASC10CR3 &= 0xfc; // Disable typeC SC block

ASD20CR3 &= 0xfc; // Disable typeD SC block

The CT blocks can remain in operation because they do not require a clock source. However, the SC blocks do not operate because there is no clock source for the switches.

Application Note AN47310 PSoC1 Power Savings Using Sleep Mode provides an overview of PSoC1 sleep mode basics and information on power-saving methods, and other sleep related considerations.

]]>
Wed, 30 Nov 2011 15:45:55 -0600
EzI2C Slave Component in PSoC 3 and PSoC 5 http://www.cypress.com/?rID=53181

This video is a short tutorial on how to use the EzI2C Slave Component for PSoC 3 and PSoC 5.

 To download the example project see the code example CE56296

By Rajiv Badiger

]]>
Tue, 29 Nov 2011 04:24:38 -0600
Introduction to PSoC® 3 Interrupts http://www.cypress.com/?rID=51233 This video provides a walkthrough of PSoC 3 basic Interrupt architecture. It demonstrates how the PSoC Creator software supports Interrupts by using a simple example project.

 

 

 For more information on PSoC3 interrupts, see application note AN54460

By Vivek Shankar

]]>
Fri, 25 Nov 2011 01:57:02 -0600
New to PSoC3? http://www.cypress.com/?rID=55885 If you have not looked at PSoC 3 before, take a look at AN54181 Getting Started with PSoC3 Design Project. It will get you started quickly on a very simple project. And it will also link you to other documentation if you are looking for more information.

]]>
Fri, 11 Nov 2011 13:06:27 -0600
PSoC 3 Code Optimization http://www.cypress.com/?rID=55829 Are you running out of 8051 code space in your PSoC 3, even after applying all of the Keil C51 compiler's optimizations? If you're using PSoC Creator's default mode, you're probably not taking advantage of many features of the 8051 architecture, which can greatly increase your code efficiency.
 
One common misconception when programming the 8051 is that the only way to get optimal code is to use 8051 assembler. This is not true, mainly because of the high performance capabilities of the Keil C51 compiler. Most if not all PSoC 3 8051 code can be written in C, and it can be made to be small, fast, and efficient. The cost is that you must use Keil-specific keywords, and C code containing these keywords may not be easily portable to other processors such as the Cortex-M3 in PSoC 5. However, PSoC Creator offers equivalent macros that make porting easier.
 
In any case, by using these keywords or macros, and with knowledge of some code architecture issues, you can make your 8051 code faster and smaller, and avoid using the PSoC 3 8051 in its slowest and least efficient mode.
 
The 8051 core is a 256-byte address space that contains 256 bytes of SRAM plus a large set of registers called Special Function Registers (SFRs). A lot of functionality is packed into this “internal space” and the 8051 is most efficient when it works in this space.
 
 
The Keil C compiler defines three memory models—small, compact, and large. The default model for PSoC Creator is large (to maintain compatibility with PSoC 5), but that default can be overridden for individual variables, functions, and even entire modules. The following code illustrates how this works.
 
 
 
 
The keywords ‘data’, ‘idata’, and 'pdata' are used to designate other models besides the (default) large model. In the above code, you can see that successively larger models require more flash bytes and more CPU cycles. So one of the most important methods to reduce code size if to place your most often-used variables in one of the internal data spaces.
                                                                                                   
In addition to the above tip, AN60630 provides a wealth of information on how to further reduce your code size by using the 8051 to its fullest capability.
 
By Mark Ainsworth
]]>
Thu, 10 Nov 2011 16:03:15 -0600
Hilo Systems Qualified Production Programming for PSoC 3: http://www.cypress.com/?rID=55804 Cypress Semiconductor has completed the production programming qualification for Hilo Systems (http://www.hilosystems.com.tw/). The qualification covered all electrical requirements, algorithm support (SWD protocol only), and verification of device sockets. Cypress has qualified all 48-QFN, 48-SSOP, 68-QFN, and 100-TQFP sockets from Hilo Systems for programming PSoC3 devices.

 

Hilo Systems has released their software update, revision V3.06, which contains the qualified PSoC 3 support. Prior to programming any Cypress PSoC 3 devices the distributor or vendor must update to the latest revision of software from Hilo Systems.

 

The following table details the PSoC 3 device package and the respective Hilo Systems adapter.

 

PSoC 3 Device Package

Adapter Part Number

48QFN

ADP-CY8CTMA395-QN48

48SSOP

ADP-CY8C3XXX-SS48

68QFN

ADP-CY8CTMA395-QN6

100TQFP

ADP-CY8C3X-QF100

 

Hilo Systems will be adding additional marketing part number support through the rest of the year. The following is a list of Marketing Part Numbers currently supported by Hilo Systems:

CY8C3245LTI-139

CY8C3246LTI-162

CY8C3446AXI-099

CY8C3446LTI-073

CY8C3446PVI-076

CY8C3866AXI-040

CY8C3866LTI-030

CY8C3866LTI-068

CY8C3866PVI-021

CY8CTMA395-LTI-00

CY8CTMA395-LTI-01

 

For more information on PSoC production programming and programming in general please see the following web page for more details:

 

www.cypress.com/go/programming 

]]>
Thu, 10 Nov 2011 04:58:20 -0600
PSoC3/PSoC5 bootloader http://www.cypress.com/?rID=55745  

Have you ever tried upgrading the firmware on your mobile phone, MP3 player, camera or tablet? The seamless process by which you can do this is facilitated by a bootloader, eliminating the need for an external programmer or disassembling the product. A bootloader is an absolute necessity in consumer technology today, to keep pace with rapidly evolving competition and keep customers excited about your product everyday! For embedded system designers, it also opens up a door to fix bugs in a shipped product.
Figure below shows a typical bootloader system in PSoC3/PSoC5. A PSoC3/PSoC5 bootloader allows you to reconfigure the on-chip hardware as well as to upgrade the application firmware. The devices support I2C and USB as standard communication protocols for bootloading.
A typical PSoC 3/PSoC 5 bootloader system has the following elements:
  1. Bootloader host: It can be a PC or an embedded host capable of communicating with the target device.
  2. Bootloader: This is a piece of code that resides in the target device and capable of communicating with the host, re-flashing the device and handing control to the application. The bootloader is usually factory programmed onto the device.
  3. Bootloadable project: This is the actual application in the target device. It can be changed using the bootloader.
 
To modify or upgrade the bootloadable project in the device, the host sends the new project and data over a communication interface. The bootloader receives this new project code and data, and writes it to the bootloadable flash. It passes control to the bootloadable project once the new project/application is successfully bootloaded.
Here are some facts that you may want to know about PSoC3/PSoC5 bootloaders:
  • PSoC3/PSoC5 bootloader allows you to reconfigure both hardware resources as well as firmware.
  • The bootloader is created as a separate project. The bootloadable project is linked to the bootloader project using the dependency option in PSoC Creator IDE.
  • You can build your own custom communication interface for bootloading.
  • A typical PSoC3 I2C bootloader project only consumes 7 kB of flash.
  • It is possible to protect the security settings of the bootloader flash to prevent any accidental rewrites to the bootloader itself.
  • PSoC3/PSoC5 bootloaders are fail-safe. The bootloadable project checksum is validated during power-up. When the checksum is invalid, the bootloader will wait for a valid image to be bootloaded. This is useful in situations where power fails during bootloading.
Are you looking for a fast and easy way to add an I2C bootloader to your PSoC 3 or PSoC 5 project? Please refer application note AN60317! Please let us know your feedback in the comments section below.
 
By Anu MD
]]>
Tue, 08 Nov 2011 18:44:34 -0600
PSoC1 Application Note Finder http://www.cypress.com/?rID=55686 The Cypress website has over 50 application notes (AN) on PSoC1 covering a wide range of topics. We have taken several steps to enable you to quickly and easily find a relevant AN. For example – all AN titles contain the addressed PSoC family (PSoC1, PSoC3 or PSoC5); thus helping you to quickly narrow down your search based on the target device. Another useful feature is a unique landing page for every AN, which provides a one-stop location to find related content such as videos, code examples/firmware, device compatibility matrix and related resources.
 
As a next step in this direction, we are launching a PSoC1 Application Note Finder tool, which will help you to identify a relevant AN based on domain tags, document complexity, supported devices, availability of example project, supported software version and hardware kit.
 
The tool is provided as a Microsoft Excel file. The first four columns provide different types of tags for the document based on its content domain, application function, type of PSoC building blocks or IP, and document complexity. You can filter and sort based on these tags and list relevant application notes available for download. Information on attached example project, supported PSoC Designer version and hardware platform used to test the project is also provided for each application note. The last few columns list the supported PSoC1 device family addressed by each application note. You can sort and filter on any combination of these columns to quickly narrow down to a desired application note.
 
 
You can easily access the tool from the application note listings page, as shown in Figure 1 above. Additionally, every PSoC1 AN landing page also has a link to the tool. We hope you will find this useful while searching for application notes on PSoC1 topics. Please feel free to provide your feedback through the comments section below.
]]>
Fri, 04 Nov 2011 09:38:19 -0600
Serial Ports are so 1990! http://www.cypress.com/?rID=55628  

Let’s face it, serial ports on designs are fading away which is causing many embedded developers headaches when they want to add a reliable method to transfer data from the PSoC to the PC. Many people shy away from USB because it appears intimidating. In reality, once some basics of USB are understood, it really isn’t that difficult to understand and use.

In a nutshell, a USB system consists of a host, which is typically a personal computer (PC) and multiple peripheral devices connected through a tiered-star topology. This topology may also include hubs that allow additional connection points to the USB system. The host itself contains two components, the host controller and the root hub. The host controller is a hardware chipset with a software driver layer that is responsible for the following tasks:
  • Detect attachment and removal of USB devices
  • Manage data flow between host and devices
  • Provide and manage power to attached devices
  • Monitor activity on the bus
 
At least one host controller is present in a host and it is possible to have more than one host controller. Each controller allows the connection of up to 127 devices with the use of external USB hubs. The root hub is an internal hub that connects to the host controller(s) and acts as the first interface layer to the USB in a system. Currently on your PC, there are multiple USB ports. These ports are part of the root hub in your PC. For simplicity, look at the root hub and host controller from the abstract view of a “black box” that we call the host.

USB devices consist of one or more device functions, such as a mouse, keyboard, or audio device for example. Each device is given an address by the host, which is used in the data communication between that device and the host. USB device communication is done though pipes. These pipes are a connection pathway from the host controller to an addressable buffer called an endpoint. An endpoint stores received data from the host and holds data that is waiting to transmit to the host. A USB device can have multiple endpoints and each endpoint has a pipe associated with it.
There are two types of pipes in a USB system, control pipes and data pipes. The USB specification defines four different data transfer types. Which pipe is used depends on the data transfer type.

  • Control Transfers Used for sending commands to the device, make inquiries, and configure the device. This transfer uses the control pipe.
  • Interrupt Transfers Used for sending small amounts of bursty data that requires a guaranteed minimum latency. This transfer uses a data pipe.
  • Bulk Transfers Used for large data transfers that use all available USB bandwidth with no guarantee on transfer speed or latency. This transfer uses a data pipe.
  • Isochronous Transfers Used for data that requires a guaranteed data delivery rate. Isochronous transfers are capable of this guaranteed delivery time due to their guaranteed latency, guaranteed bus bandwidth, and lack of error correction. Without the error correction, there is no halt in transmission while packets containing errors are resent. This transfer uses a data pipe.
 
Every device has a control pipe and it is through this pipe that control transfers to send and receive messages from the device are performed. Optionally, a device may have data pipes for transferring data through interrupt, bulk, or isochronous transfers. The control pipe is the only bidirectional pipe in the USB system. All the data pipes are unidirectional. Each endpoint is accessed with a device address (assigned by the host) and an endpoint number (assigned by the device). When information is sent to the device the device address and endpoint number are identified with a token packet. The host initiates this token packet before a data transaction.

When a USB device is first connected to a host, the USB enumeration process is initiated. Enumeration is the process of exchanging information between the device and the host that includes learning about the device. Additionally, enumeration includes assigning an address to the device, reading descriptors (which are data structures that provide information about the device), and assigning and loading a device driver. This entire process can occur in seconds. Once this process is complete, the device is ready to transfer data to the host. Two files are affiliated with enumeration and the loading of a driver. These files are the INF and SYS file, and they exist on the host side.

 
After a device has been enumerated, the host directs all traffic flow to the devices on the bus. When implementing USB in a PSoC, all you need to do is configure the USB Full Speed component as described in the component data sheet, and then use the Cypress provided API’s to load data into an IN endpoint and take data out of an OUT endpoint.
 
Since the host manages the traffic, it will handle everything else in conjunction with the dedicated USB hardware in the PSoC. Most of the intimidating factors regarding USB are on the host side, and in most USB applications users will not need to worry about the host side of things. That aspect is reserved for the most advanced of USB applications. 

 All the user needs to do is determine what data they want to transfer between the PSoC and the PC, and what type of transfer they want to initiate (Control/Interrupt/Bulk/Isochronous). 
Once you get a USB project working, you will wonder why you ever used serial ports in the first place.

For more information about USB pertaining to the following topics, along with links to other Cypress PSoC USB application notes refer to AN57294- USB 101: An Introduction to Universal Serial Bus 2.0.

  • USB History
  • USB Architecture
  • USB Physical Interface
  • USB Speeds
  • USB Power
  • USB Endpoints
  • USB Communication Protocol
  • USB Descriptors
  • USB Class Devices
  • USB Enumeration and Configuration Process
  • USB Compliance and Windows Logo Testing


 
By Robert Murphy
Stay Thirsty for PSoC my Friends!

 

]]>
Thu, 03 Nov 2011 15:01:23 -0600
Manchester Code http://www.cypress.com/?rID=55345

Manchester Code:

 

 
Manchester Code is a digital encoding format in which symbol ‘1’ is represented by a falling edge (high followed by low) and symbol ‘0’ is represented by a rising edge (low followed by high). Both the high and low pulses have equal width which is equal to half the bit period.
 
Figure 1
 
The advantages of Manchester code are:
  • Single signal conveys the data and clock information
  • Self synchronization
A Manchester encoder embeds the clock information with data in a simple way: each bit is transmitted with a transition at the middle of bit time. For ‘1’, it is 1 to 0 and for ‘0’ it is from 0 to 1.
An example of a Manchester Code is shown in Figure 2.
Figure 2
 
 

Manchester Encoder:

 

 
There are several ways of designing a Manchester Encoder. But doing it “The PSoC Way” requires just an SPI Master and an XOR Gate.
 
When the SPI Master is configured to operate in Mode 0 where the data is setup on falling edge of the clock and data is latched on the rising edge. The idle state of the clock output is low.
The MISO pin of SPI Master is set to low so that the idle state of the MOSI is low.
 
The MOSI of SPI Master is XORed with the clock to obtain Manchester Encoded data.
  • When the MOSI is “low”, the XORed output follows the clock. Hence there is a transition from low to high (rising edge = ‘0’).
  • When the MOSI is “high”, the XORed output is an inverted version of clock. Hence there is a transition from high to low (falling edge = ‘1’).
The output thus obtained is in Manchester encoded format.
The waveform shown in Figure 3 demonstrates the same.
 
Figure 3
 
The schematic shown in Figure 4 represents the implementation in PSoC 3.
 
Figure 4
 
The encoded output is to be fed to the Manchester Decoder unit.
 
 
 

Manchester Decoder:

 

 
The decoder implementation used here is not based on the direction of the mid bit edge (rising or falling edge), but it is based on the fact that the bit value is present during the first half of bit time, prior to the transition edge. If a delay of 3/4th bit is triggered by the incoming mid bit transition, the value captured at the end of the delay represents the next bit value.
 
Figure 5
 
The clock has to be recovered from the incoming Manchester encoded data signal. As mentioned before, a delay unit is used to obtain the actual data signal. This signal when XORed with the Manchester encoded data gives the Clock.
 
The waveform is shown in Figure 6.
 
Figure 6
 
In the figure above, Polarity_invert represents the decoded data, and the XORed value shown as the last waveform is the recovered clock.
It can be observed that the Manchester Decoded data can be read upon sampling the data on rising edge of the Recovered Clock. This is demonstrated in the Figure 7.
 
 
Figure 7
 
A Manchester Decoder block diagram is as shown below:
 
 
Figure 8
From the block diagram, it can be seen that the main functional units are:
  • An XOR Gate – Used to derive the Clock which in turn triggers the Delay unit.
  • A Delay Unit – Produces a delay of 3/4th bit period.
  • A D Flip-Flop – Used to hold the Serial data out.
The schematic of the Manchester Decoder implementation in PSoC 3 is shown in Figure 9.
 
Figure 9
 
A PWM Component is used to generate a delay of 3/4th of the bit period. When this period has elapsed, a pulse is generated which is fed to the clock input of the D Flip-Flop. The Flip Flop is updated upon this clock input.
 
 

Working:
To demonstrate the process of Manchester Encoding and Decoding, the project was built on PSoC 3.
 
The Manchester encoder was used to send an 8-bit sequence 0x34. The Manchester decoder unit was able to recover clock from the encoded data and also decode the value.
The oscilloscope snap-shot is shown in Figure 10.
 
Figure 10
 
Yellow = Manchester encoded data
Blue = Decoded Serial data (0x34)
Pink = Recovered Clock
 
From the waveform, it can be seen that when the serial output data is sampled on the rising edge of the recovered clock, the output obtained is 0b00110100 which is 0x34.
 
However, it should be noted that the first bit transmitted should be 0. Hence, the encoded sequence should be appended by 0 in its first position.
This is used for providing the synchronization to determine the second bit (which is the beginning of the actual sequence).
If the first bit is ‘1’, then the decoded output will be in 1’s complement format of the expected output.
 
 

PSoC Value:
The advantages of using PSoC for this design are:
  • Simplicity in designing of the encoder - Just an SPI Master with an XOR Gate are the only requirements.
  •  Implementation of Decoder in Hardware – Manchester decoder uses a D Flip-Flop and an XOR which are implemented in hardware. The PWM Component has to be initialized at the beginning of code. Then, no CPU intervention is required for its further operation.
The snap-shot of the code looks like this:
 
 
 

Summary:

 

 
Manchester encoder / decoder was implemented in PSoC 3. The output obtained was as expected.
 
By Gautam Das

 

]]>
Thu, 20 Oct 2011 12:00:13 -0600
PSoC Creator Debugger Watch Memory Location http://www.cypress.com/?rID=55104 This blog post tells you how to observe memory locations in the debugger watch window. This is useful if you want to group together and view separate memory locations that are linked by functionality such as DAC configuration, DAC routing and DAC trim.

To observe memory in the XDATA space, use the following in the watch window: 

*((char*)0x01yyy)

Where YYYY is a 2 byte address. This limits the addressable range for XDATA to 64KB. The char designator restricts it to a single byte, which for most debugging purposes is sufficient.

*Note: There are no spaces in the name.

Other observable memory locations:

The address spaces are limited based on address type through the watch window (Keil limit), and everything must be addressed via the 24 bit address.

XDATA: 0x01YYYY    64k limit

DATA:  0x0000YY    128 byte limit

CODE:  0xFFYYYY    64k limit

PDATA: 0xFE00YY    256 byte limit

Other types: Char is not the only allowable type. For larger values (16 and 32 bit) you can also use int and long:

*((int*)0x01YYYY)

*((long*)0x01YYYY)

Be aware though, Keil is a big endian compiler, so it will interpret memory differently than if you read it out of the memory window. For example:

In the memory map:

0x7000   0x7001   0x7002    0x7003

FE           00            00             1F

The result of the watch window:

Watch window expressions:

You can also create interesting expressions in the watch window:

In the memory map:
0x4690    0x4691
77        02


(int)(*((char*)0x014690)+(*((char*)0x014691)<<8))

This generates the following value -> 0x0277

   
For PSoC 5 (GCC), there are no memory restrictions for PSoC 5 so the entire register space can be accessed in the debugger.

The same techniques apply for PSoC 5 when setting up watch variables for memory locations, although the compiler is little endian oriented, so the int and long values will look different from PSoC 3 to PSoC 5 for the same value:

In the memory map:
0x7000    0x7001    0x7002     0x7003
FE        00        00         07


The result of the watch window:

 Quick Reference (PSoC 3):

XDATA: *((char*)0x01YYYY)

*Limited to 64 KB, no spaces in name

CODE: *((char*)0xFFYYYY)

*Limited to 64 KB, no spaces in name

DATA: *((char*)0x0000YY)

*Limited to 128 B, no spaces in name


Quick Reference (PSoC 5):

ALL MEMORY: *((char*)0xYYYYYYYY)


* no spaces in name

 

By Chris Keeser

 

]]>
Wed, 12 Oct 2011 16:13:54 -0600
When Vref is not equal to Vref http://www.cypress.com/?rID=54571

Over the last couple of years I have been asked several questions about the reference system in PSoC3 and PSoC5.  The common assumption is that when you place a Vref component in your schematic and set the reference to 1.024 volts, you will get 1.024 volts +/-0.1% at room temperature. Unfortunately this is not true.  What you will actually get is a voltage that is not exactly 1.024 volts, but with an offset of several mVolts.  But the PSoC datasheet says that the Vref is trimmed to within +/- 1mV, what's the deal? To understand this, you need to first understand the PSoC3/5 Reference Tree.  Below is a simplified version. 



Notice that on the upper left hand side there is a bandgap voltage reference that generates about 1.2 volts.  Its output is buffered then fed into a resistor network to create a voltage near 1.024 volts.  This output is connected to the input of several reference buffers that drive different analog blocks including comparators, opamps, the DelSig ADC (Upper Right), and the SC/CT blocks.  During calibration, the output of the DelSig ADC’s reference buffer is measured to get exactly 1.024 volts +/- 0.1%, while the bandgap voltage is adjusted.  This means that only the DelSig ADC’s reference is the only true calibrated reference.  The input to the other reference buffers may be off by several mVolts to start with.  Each reference buffer will also have its own input offset as well.  If the input offset of all the references buffers were the same, then all the references would match, but this is unlikely.  The input offset of all the buffers will most likely vary from buffer to buffer.  This is why a reference may not be exactly 1.024 volts and why references will not all be the same. 

By Mark Hastings

]]>
Fri, 23 Sep 2011 18:54:40 -0600
DMA DRQ Itchy Trigger Finger http://www.cypress.com/?rID=54302 How to prevent unwanted DMA transactions after enabling a DMA channel with queued transaction requests.

Summary:
If a disabled DMA channel receives a request to perform a transfer, the request will be queued up similar to a pending interrupt.  When the channel is enabled, the pending transfer request will be executed, resulting in a transaction that may not be desired.

The workaround is to queue up a “terminate channel” request.  This request takes precedence over the transfer request.  As soon as the channel is enabled, the terminate request is executed instead of the transfer request.  This clears the pending transfer requests and disables the channel.  The channel must be re-enabled afterward to function as intended.

Details:
This problem was discovered when an ADC End Of Conversion (EOC) was connected to the DMA ReQuest (DRQ) terminal of a DMA channel.  The DMA channel was only really needed during a brief high speed sampling window.  The ADC would be used normally other times, with software requesting a start of conversion and the "conversion done" bit being polled by the CPU to determine when the conversion was complete.

It was observed that when the ADC was disabled and the DMA channel was turned on (enabled), a sample would mysteriously appear in RAM.  This was occurring even though it was guaranteed that the EOC signal was not asserted when the channel was enabled.

It was determined that when the ADC was used normally, the EOC was asserting the DRQ of the disabled DMA channel. This request was remembered by the DMA channel, even though the DMA channel was disabled.  When the channel was enabled, this "remembered" DRQ was being executed immediately, resulting in an unexpected DMA transfer.

The fix is to assert a CPU request to terminate the chain before enabling the channel.  By doing this, both requests (the transfer request and the terminate request) will be queued up in the DMA channel, waiting for the channel to be enabled.  When the channel is enabled, the terminate request will take precedence over the transfer request and the DMA channel will terminate immediately, erasing the pending transfer request.  The channel needs to be re-enabled after being enabled the first time since the terminate request will also disable the channel.

Below is example code, showing how the terminate request should be made before enabling the channel:

// Your DMA configuration code goes here
// --->
// ....
// <---
// End DMA config code

// To clear unwanted transfer requests (DRQ), issue a CPU terminate chain request
CyDmaChSetRequest(DMA_Channel, CPU_TERM_CHAIN);

// Enable the DMA channel, This enable kills the spurious DMA transaction if there is one
// and disables the channel, must re-enable
CyDmaChEnable(DMA_Channel, 1);

// re-enable the DMA channel
CyDmaChEnable(DMA_Channel, 1);

 

By Chris Keeser

]]>
Thu, 15 Sep 2011 17:10:37 -0600
PSoC 3 and PSoC 5 USB Features and Basics http://www.cypress.com/?rID=50681 This video will walk users through the many features and capabilities that the PSoC 3/5 USB block is capable of, as well as how to harness those features in PSoC Creator. The video will also give users an inside look at the core of the USB component such as generated device descriptors, request handlers, and API. This video is the starting point for users who are new to using USB with PSoC Creator and PSoC 3/5, and will teach them capabilities of the USB component to make developing with it as easy as possible.
 
For more information about PSoC 3 and PSoC 5 USB Features, see application note AN57294. Robert Murphy - "PSoC Does" ]]>
Sun, 21 Aug 2011 13:51:20 -0600
PSoC®3 and PSoC5 Correlated Double Sampling http://www.cypress.com/?rID=53628 The following video explains the correlated double sampling technique that can be used to reduce a low frequency signal and eliminate DC offset in slow changing signals.

For more information on how to implement and use correlated double sampling, see Cypress application note AN66444 for PSoC 3 and PSoC 5 or  AN2226 for PSoC 1.

By Archana Yarlagadda

]]>
Tue, 16 Aug 2011 11:22:15 -0600
Design Idea - Analog Gain controlled Digitally http://www.cypress.com/?rID=53408 Many of you may know that both PSoC1 and PSoC3/5 devices have PGAs (Programmable Gain Amplifiers).  These are handy devices allowing you to either select the system gain during design time or during run time.  The gain for these PGAs is controlled by calling one of the API function calls.  Sometimes it would be nice to be able to control the PGA's gain with a digital signal.  With PSoC 3 and 5, there is a way to do this by making use of the handy internal opamps.  There are a couple of ways to do this using different combinations of pins and analog muxes. 

This first option is the simplest, using the internal opamp, a couple of external resistors, and some GPIO pins.  If the signal you want to amplify is referenced to Vss, you can use GPIO pins in the open-drain, drive low mode to select one of N resistors.  The diagram below shows an example of how to use three GPIO pins and four external resistors to provide eight selectable gain combinations.  The LUT (Look Up Table) controls the the gain selection by what ever means that is required by your application.

Another option is to use a hardware mux to select the feedback resistor.  This allows you to select a reference other than Vss.  In the diagram below, the VDAC8 is used to generate the reference voltage which is then buffered with another opamp.  The disadvantage for this design, is that to maintain gain accuracy the resistors should be as large as possible to wash out the affect of the analog mux switch resistance.  Each analog switch in the hardware analog mux is about 200 ohms, so the external resistors should be above 10K or more. The gain for this option is the same as the first, it provides 2^N gain combinations where N is the number of pins and resistors used for gain control.

A third topology eliminates the issue with switch resistance.  The analog mux is used to select the tap point along a string of external series resistors.  Since the current through the mux switches is just that of the opamp input, the 200 ohm switch resistance can be ignored.  The disadvantage, is that one pin is required for each gain setting you want to select, therefore using more pins.  As with the other two options the gain can be controlled purely with digital signals.

 


If we add a window comparator to one of theses examples, a simple AGC (Automatic Gain Control) can be implemented.  The LUT in this example  uses the comparator outputs to determine if the gain should be increased, decreased, or remained the same.

This is just another example of the flexibility of PSoC3 and 5.  This example makes use of two of my favorite components, the opamp and the LUT.  I am sure many of you can come up with even more cool examples mixing analog and digital components to make a better super component.

Mark Hastings

]]>
Thu, 04 Aug 2011 13:23:23 -0600
Hiking and Electronics http://www.cypress.com/?rID=53280 These days it is unbelievable the amount of electronics technology that we carry with us, even for what many think of non-technological forms of recreation.  On my hike up to Vesper Peak last weekend I started to think about the affordable electronics that I carry in my pack that didn't even exist 10 or 20 years ago.

Smart phone     $600           
GPS             $200 - $400         
Digital Camera  $500 - $1000 (depending on the camera I take)
PLB             $250 - $400              
LED Headlight   $30 
        

I never really added it up before, but we are talking about $2000, almost 3 lbs, and 100s of MIPs and only the Headlight counts as one of the 10 hiking essentials. So how do I justify carrying all this stuff anyway?

So let's start with the PLB (Personal Locater Beacan).  It is a one-time use device for when you get really hurt or lost.  You pull off the top, the antenna pops out and it relays you location and serial number to a satellite.  My wife "prefers" I don't hike solo without the PLB, so yes I do need it in order to hike.  The LED headlight is one of the 10 essentials so that's a no brainer.  The digital camera is a must.  It is my proof that I actually did the hike, plus my wife enjoys looking at the pictures when I return.  You may question this one, but it makes my wife happy.  If she is happy I get to hike, therefore I need the camera to hike.  GPS is just a good idea in case you get lost.  I leave it in track log mode and record my entire hike.  I can then upload the data to Google Earth and see where I have been.  So rather I need it or not, the GPS coolness factor is just too high to leave it at home.  

That leaves the smart phone (iPhone). There is seldom cell phone service where I hike so it really doesn't do me much good during the hike. I always carry a phone in the car for all the same reasons most of you do.  If I get back to the trail head late, I call the wife as soon as I am in the service area so no one (wife)  panics.  I don't really need a "smart phone" for this, but around the office, the younger engineers think you are a fuddy duddy if you don't have one.  If you use the term "fuddy duddy" it probably counter acts having the smart phone in the first place.  Since I don't leave anything of value in my car at the trail head, in the pack it goes.

So how does this all relate to PSoC?  Lets take a look at the technology in my pack and see what solutions PSoC has to enhance it.


Smart phone     -- TrueTouch on several Andriod phones and some iPods.
GPS             -- Not sure if PSoC is in any GPS devices, but we have developed software for decoding GPS sentences for a customer.
Digital Camera  -- One model of digital camera,  a PSoC1 was used to drive the image stabilizing motors.
PLB             -- PSoC1 was designed into an Eperb (Marine locater beacon) by an Australian company a few years ago.
LED Headlight   -- Power PSoC does do LED lighting, not sure if anyone has used one for a headlamp.


So you see PSoC can enhance almost any electronics that you "must" carry with you.

Well since I mentioned hiking, I know you are all dieing to see a couple pictures from my hike to Vesper Peak last Sunday.

Heading up the Wirtz basin.

Up the narrows to Headlee Pass

From Headlee pass just another 1500 vertical feet to the Vesper Peak Summit.

Getting closer...


I made it.

 

The view from the top of Vesper Peak


Now the big question, where am I going to pack all that electronics stuff around next weekend?

Mark

 

 

 

 

 

 

 

 

 

 

]]>
Sun, 31 Jul 2011 21:53:32 -0600
PSoC3/5 VDACs, a bit more flexible than you think http://www.cypress.com/?rID=53052 Remember way back when you were learning about voltage and current sources, you were told it was bad to put voltages sources in parallel and current sources in series.  These are good rules, but often a voltage source is not exactly and “idea” voltage source.  Take the PSoC 3/5 VDACs.  At first glance they seem like a typical voltage source and you would never think about putting them in parallel.  If you look under the hood, you will find that this voltage source is really a current source with a resistor.  When the VDAC range is selected to be 1 volt, it is equivalent to an IDAC in the 256uA range with a 4K resistor connected between the output and Vss.

 

So you might say “so what?”  This means we can actually put two VDACs in parallel and not violate the law of parallel voltage sources.  In the diagram below you can see that two parallel VDACs in parallel really look like a single IDAC with double the current output with a 2K load to Vss.  The 2K resistor is the result of two 4K resistors in parallel.

 

 

If each of the VDACs (VDAC8_1 and VDAC8_2) generate a separate waveform and the VDAC outputs are connected, we simply get the average of those two signals.  Take a look at the scope image below where the two upper traces are the two individual VDAC output. The third signal on the bottom is the output of these two signals when the DACs are connected in parallel.

Just to have a bit more fun, do you remember when you learned about Fourier series?  I remember how cool I thought it was the first time we looked at the FFT of a square wave and learned the relationship of the harmonics to input square wave.  Looking at just the first four harmonics we get the equation below.

We then had to write a program to prove this and display it graphically.  With PSoC you can prove it just by connecting four VDAC8s in parallel.  As you can see in the image below, the upper four sine waves are averaged together to create the pseudo square at the bottom.  Wish I had a PSoC back in school about 30 years ago.

This is just a handy trick when you need to average two or more individual signals in hardware and don’t want to use any external components.


Note:  VDACs can be used to generate periodic waveforms by making use of RAM/ROM lookup tables that are transferred to the VDAC either with the CPU or with DMA.
 

Mark Hastings

]]>
Thu, 21 Jul 2011 17:41:26 -0600
Introduction to PSoC 3/5 VDACs http://www.cypress.com/?rID=52914 This video is brief introduction to the PsoC 3 and 5 VDACs. Topics covered:

  • The structure of the VDACs
  • Simple usage examples are given
  • On chip buffering of the VDAC output for driving loads with higher current demands (less than 20 mA)

By Chris Keeser

]]>
Wed, 13 Jul 2011 17:26:48 -0600
Introduction to PSoC®3 Low-power Modes ( Part 1 ) http://www.cypress.com/?rID=52806 This video is a brief introduction to the low-power modes available in the PSoC 3 family of devices.

 

By Greg Reynolds

]]>
Mon, 11 Jul 2011 09:59:50 -0600
Introduction to PSoC®3 Low-power Modes ( Part 2 ) http://www.cypress.com/?rID=52829 This video is a brief introduction to the low-power modes available in the PSoC 3 family of devices (Part 2 or 2).

 

By Greg Reynolds

]]>
Mon, 11 Jul 2011 09:59:12 -0600
Getting Started with PSoC3 (Part 2) http://www.cypress.com/?rID=52676 This video is a quick introduction of the PSoC3 architecture (part 2).

 

For more details on the PSoC 3 architecture and a simple starter project, see the Cypress AN54181 web page.

By Ross Fosler

]]>
Fri, 01 Jul 2011 15:03:26 -0600
Getting Started with PSoC3 (Part 1) http://www.cypress.com/?rID=52612 This video is a quick introduction of the PSoC3 architecture.

For more details on the PSoC 3 architecture and a simple starter project, see the Cypress AN54181 web page.

By Ross Fosler

]]>
Wed, 29 Jun 2011 10:52:30 -0600
PSoC Creator Introduction http://www.cypress.com/?rID=52484 This video introduces a new user to the interface and features of PSoC Creator design application. PSoC Creator is used to enter all parts of a design for the Cypress PSoC 3 and PSoC 5 family of parts.

By Ross Fosler

]]>
Tue, 28 Jun 2011 17:34:22 -0600
Creating State Machines Using Look Up Tables in PSoC® 3 and 5 http://www.cypress.com/?rID=52365  This video details the basics of the PSoC Creator Look Up Tables (LUTs).  It will demonstrate how users can use the LUT component, and how to construct simple state machines with them.

 

By Stuart Owen

]]>
Tue, 21 Jun 2011 17:50:43 -0600
SIO Pins in PSoC3 and PSoC5 http://www.cypress.com/?rID=52219 The following video is a quick overview of functionality and configuraton of the  SIO pins found on the PSoC 3 and PSoC 5 devices.

 

 

 

For more information on cool ways to make use of SIO pins, see Cypress application note AN60580.

By Pavan Vibhute

 

]]>
Thu, 16 Jun 2011 09:37:08 -0600
Using DMA on PSoC® 3 and PSoC 5 Video http://www.cypress.com/?rID=52087 The video gives the user a brief description of how to use the DMA on PSoC3 and the different parameters related to it.

 

 

For more information on using DMA with PSoC® 3 and PSoC 5, see Cypress Application Note AN52705.

By Kannan Sadasivam

]]>
Mon, 13 Jun 2011 13:19:15 -0600
Low Power with PSoC 3 & PSoC 5 Webinar This Week http://www.cypress.com/?rID=51932

Cypress is continuing to host weekly webinars for PSoC.  These webinars are presented by the PSoC experts, our Applications Team.  

This week's webinar is on Thursday, June 9th at 9:00am PDT.  The topic is on low power designs with PSoC 3 and PSoC 5.  You can access the webinar from this link.  In case anyone has problems with the link, they can always access the meeting by going to http://cypress.webex.com and entering meeting number 498 741 435.  These are VoIP meetings, so all you need is speakers or headphones.

We've had positive feedback on these webinars to date, so I hope you can join.

 

]]>
Tue, 07 Jun 2011 19:59:05 -0600
PSoC®3 and PSoC5 PCB Layout Considerations (Shared Return Paths) http://www.cypress.com/?rID=51784 The following video introduces the designer to shared return paths and how to avoid them when designing a circuit board.

 

 

For more PCB layout tips, see application note AN57821.

By Mark Hastings

]]>
Tue, 07 Jun 2011 17:53:44 -0600
AM Modulation and Demodulation in PSoC® 3/5 http://www.cypress.com/?rID=51710 This video explains briefly how to implement amplitude modulation (AM) and demodulation using PSoC3 or PSoC 5 controller.

 

 

 For more information on AM modulation and demodulation using PSoC3 or PSoc5, see application note AN62582.

By Anup Mohan

]]>
Tue, 07 Jun 2011 17:52:00 -0600
PSoC 3 and PSoC 5 - ADC Data Buffering Using DMA http://www.cypress.com/?rID=51709 The video describes the case of using a DMA to buffer ADC data. Buffering of 20 bit ADC data is taken as an example and discussed. The video also gives a preview of the project implementing the 20 bit data buffering and explains the DMA configuration in code.

 

 

 

 For more informaton using DMA with the ADC in PSoC3 or PSoC5, see application note AN61102.

By Kannan Sadasivam

]]>
Tue, 07 Jun 2011 17:50:16 -0600
Implementing CAN Bus Communication in PSoC3/5. http://www.cypress.com/?rID=51281 This is a short video that talks about how to transmit and receive messages using CAN controller available in PSoC3/5.

 

 

 For more infomation on using the CAN Bus with PSoC3 or PSoC5, see application note AN52701.

By  Anup Mohan

]]>
Tue, 07 Jun 2011 17:47:53 -0600
PSoC 3/5 Bulk USB Example http://www.cypress.com/?rID=51140 This video walks users thought the process of creating a vendor specific USB device that uses bulk transfers to send and receive data. The video will also show users how to use the cyusb.sys drive and edit the cyusb.inf for their project. The video will then show the device function as a loopback example that will echo data it receives from the host back to the host.

 

 

For more information on using USB bulk transfers with PSoC3 or PSoC5, see application note AN56377.

By Robert Murphy

]]>
Tue, 07 Jun 2011 17:43:10 -0600
PSoC 3/5 Creator Bootloader Overview Video http://www.cypress.com/?rID=51139 Cypress's PSoC Creator IDE enables a method to easily create highly flexible and customizable bootloaders for PSoC 3 and PSoC 5.  Here's an overview of the PSoC Creator bootloader system and its features.

 

For more information about PSoC 3 and PSoC 5 bootloader, see application note AN60317.

By Mark Ainsworth

]]>
Tue, 07 Jun 2011 17:29:14 -0600
Increasing PSoC®3 and PSoC 5 DAC Resolution http://www.cypress.com/?rID=51137 This video discusses multiple ways in which you can increase an 8-bit DAC’s resolution to as much as 12-bits. PSoC3 and PSoC5 have unique features that make it easy to combine analog and digital blocks to create hybrid components. See Cypress application note AN64275 for the full details.

 

 

 For more information on increating DAC resolution for PSoC 3 and PSoC 5, see application note AN64275.

By Mark Hastings

]]>
Tue, 07 Jun 2011 17:27:06 -0600
PSoC® 3 and PSoC 5 kHz External Crystal Oscillator http://www.cypress.com/?rID=51138 The following video is a quick overview of the PSoC 3 and PSoC 5 kHz external crystal oscillator (ECO). It covers the most important details of the kHz ECO, which is described in detail in AN54439 – PSoC 3 and 5 External Oscillator.

 

For more information on the PSoC 3 and PSoC 5 external kHz crystal oscillator, see application note AN54439.

By Max Kingsbury

]]>
Tue, 07 Jun 2011 17:24:56 -0600
PSoC® 3 and 5 MHz External Crystal Oscillator http://www.cypress.com/?rID=51067 The following video is a quick overview of the PSoC 3 and 5 MHz external crystal oscillator (ECO). It covers the most important details of the ECO, which is described in detail in AN54439  - PSoC 3 and 5 External Oscillator.

 

 

For more information on the PSoC 3 and PSoC 5 external crystal oscillator, see application note AN54439.

By Max Kingsbury

]]>
Tue, 07 Jun 2011 17:24:02 -0600
PSoC 3 USB Human Interface Device http://www.cypress.com/?rID=50438 This video provides a detailed walkthrough of how to configure the PSoC 3/5 USBFS component for a HID device, focusing on each configuration parameter and describing its purpose. The video will also show the required device settings and the minimum required code to enumerate the PSoC device.

 

 

Robert Murphy - "PSoC Does"

For more information about USB Peripheral Basic, see application note AN57294.

]]>
Tue, 07 Jun 2011 17:18:36 -0600
Simple I2C Bootloader for the PSoC 3 and PSoC 5 http://www.cypress.com/?rID=50735  Do you need a fast, easy way to add an I2C bootloader to your PSoC 3 or PSoC 5 project? Here are some simple instructions to do so.

 

 

 For more information about the PSoC 3 and PSoC 5 I2C Bootloader, see application note AN60317.

Mark Ainsworth

]]>
Tue, 07 Jun 2011 16:04:36 -0600
PSoC3 and PSoC5 Internal Analog Routing Structure http://www.cypress.com/?rID=50435 The following video is a quick overview of the PSoC 3 and PSoC 5 analog routing structure.  It references the analog routing diagram found in each of the data sheets and the technical reference manual (TRM).

 

For more information about the internal analog routing in PSoC3 and PSoC5, see application note AN58827.

]]>
Tue, 07 Jun 2011 15:55:44 -0600
PSoC3 Segment LCD Direct Drive Demo http://www.cypress.com/?rID=51511  This video explains how to create projects using Segment LCD component of PSoC3.

 

By Rajiv Vasanth Badiger

]]>
Sat, 21 May 2011 09:51:36 -0600
Welcome to the PSoC Insiders Blog http://www.cypress.com/?rID=49923 Welcome to the PSoC Insiders Blog.  Instead of a single engineer, this blog will be supported by the entire PSoC applications team.  We would like to provide you with a wide range of design ideas, tips, and some informal training on PSoC devices, development kits and design tools.  The end goal is to empower you to create successful products using PSoC.  The blog entries will consist of short articles and videos that concentrate on specific topics, allowing you to more efficiently look for just what you need.  We will start with some of the basic PSoC architecture and tools topics then work up to the more advanced topics as time goes by.  At the beginning we may sprinkle in a few advanced topics just so some of your more experienced users don’t get bored. Other entries will be added to supplement data in our application notes and component data sheets.


Feel free to comment and let us know what you would like to see and what you like or dislike.  We will do our best to respond to your requests in a timely fashion. 

PSoC Rocks my friends!!

Mark Hastings

 

]]>
Tue, 19 Apr 2011 17:50:41 -0600
Complete project walk-thru, making a simple voltmeter with PSoC Creator with a PSoC3 or PSoC5 http://www.cypress.com/?rID=49976 I know I said we wanted to keep these videos between 1 and 5 minutes, but this first video takes the first time or novice PSoC Creator user through a simple project from start to finish.  The project is a simple voltmeter that measures a voltage between 0 and 1 volt and displays the result on a 2 by 16 character display with a floating point value. Although this project uses a PSoC3, it is equally compatible with PSoC 5. The video is about 15 minutes, but I recommend it for new users.  If you don’t want to watch the entire video just fast forward to the parts of interest.  You can download a copy of the project described in this video here.

Mark Hastings

 

The entire code for this project is shown below.

/* ========================================
 * MyFirstvoltMeter
 *
 * Simple project to read a voltage between
 * 0 and 1 volts and display it on an LCD.
 *
 * ========================================
*/
#include
#include

void main()
{
    int32 adcResult;
    float adcVolts;
    char  tmpStr[25];
   
    ADC_Start();  /* Initialize components */
    LCD_Start();
   
    LCD_Position(0,0);    /* Display message */
    LCD_PrintString("PSoC VoltMeter");
   
    ADC_StartConvert();   /* Start ADC conversions */

    for(;;)  /* Loop forever */
    {
       if(ADC_IsEndConversion(ADC_RETURN_STATUS) != 0)  /* Check for result */
       {
          adcResult = ADC_GetResult32() ;               /* Get Reading     */
          adcVolts = ADC_CountsTo_Volts( adcResult) ;   /* Convert to volts */
          sprintf(tmpStr,"%+1.3f volts", adcVolts);     /* Create a formatted string */
          
          LCD_Position(1,0);                            /* Display on LCD */
          LCD_PrintString(tmpStr);
       }
    }
}

]]>
Tue, 19 Apr 2011 17:49:03 -0600