CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F
57
Code Examples
5.3.4
Verifying Output
When the example code is built and programmed into the device, make all the hardware connections
and reset the board by pressing the RESET button or by power cycling the board. The LED1 blinks
with a blink period of 1.4 Hz.
Note
Remove the jumper JP3 to verify output at 5 V.
Figure 5-43. Verify Output: Code Example 3
5.4
Code Example 4: ASM_Example_DAC_ADC
5.4.1
Project Description
This project generates a sine wave using a 6-bit DAC. The sine wave period is based on the current
ADC value of the potentiometer. The project uses the following user modules:
Counter8:
An 8-bit counter is used to generate an interrupt at the DAC update rate (1/64 sine wave
period). By adjusting the counter period, the DAC frequency and the resulting sine frequency can be
modified.
DELSIG8:
Current ADC conversion values are used to reload counter period. ADC input voltage is
between 0 V and Vdd, depending on the potentiometer.
PGA:
This module is implemented as buffer with user-programmable gain.
DAC6:
This module
converts digital input to analog output, which is used to generate sine wave. The
DAC output is routed to P0[5] in the chip design. When P0[5] is connected to an LED on the board
using single strand jumper wire, the LED blink period varies with the position of potentiometer. The
sine wave pattern can be observed on an oscilloscope when the DAC output (P0[5]) is connected to
the oscilloscope.