
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F
50
Code Examples
5.2
Code Example 2: ASM_Example_ADC_UART_LCD
5.2.1
Project Description
This project demonstrates a 12-bit incremental ADC by measuring the voltage of the potentiometer,
transmitting the conversion result on the UART, and displaying it on the LCD. The project uses the
following modules:
ADCINC:
This module processes the programmable gain amplifier (PGA) output at the rate of 180
samples per second and produces the corresponding digital output.
PGA:
This module is used at unity gain to supply the input to ADC.
UART:
This is an 8-bit universal asynchronous receiver transmitter (UART). The clock divider VC3
generates the baud clock for the UART by dividing 24 MHz by 156. The UART internally divides VC3
by 8, resulting in a baud rate of 19,200 bps. The ADC output is sent to the PC using UART module.
LCD:
This module is used to display the ADC output (hex) values. If the ADC has completed conver-
sion, the output is displayed on the LCD as ASCII text. The same is transmitted to the PC through a
RS-232 cable.
5.2.2
Creating the Project
The procedure for creating this project is similar to the flow described in
. The previous example demonstrated coding in C language, while this example
implements the same functionality in Assembly language. The LCD bargraph function is disabled to
keep the code compact.
To create the project:
1. Follow steps 1 to 8 from
5.1.2 Creating My First PSoC 1 Project
.
2. In the
Generate 'Main' File Using:
option, select
Assembly
and click
OK
.
3. Follow steps 10 through 28 from
5.1.2 Creating My First PSoC 1 Project
.
4. Open the existing
main.asm
file in Workspace Explorer. Replace the existing
main.asm
content
with the content from the file located at
<Install_directory>:\Cypress\CY3210-PSo-
CEVAL1\<version>\Firmware\ASM_Example_ADC_UART_LCD\ ASM_Example_AD-
C_UART_LCD\main.asm
.
5. Follow steps 30 through 32 from
5.1.2 Creating My First PSoC 1 Project
to build the project and
program the device.
Содержание PSoC 1 CY3210-PSoCEVAL1
Страница 71: ...CY3210 PSoCEVAL1 PSoC 1 Evaluation Kit Guide Doc 001 66768 Rev F 71 Appendix Figure A 2 Bottom Copper Layer...
Страница 72: ...CY3210 PSoCEVAL1 PSoC 1 Evaluation Kit Guide Doc 001 66768 Rev F 72 Appendix Figure A 3 Top Overlay...
Страница 75: ...CY3210 PSoCEVAL1 PSoC 1 Evaluation Kit Guide Doc 001 66768 Rev F 75 Appendix Figure A 6 Place New Chip...