Hello!
In the example released today we will show the user how to create a project that demonstrates how to read a temperature value and display that value onto the LCD. The same data is also sent over the USB port to be displayed on a Hyperterminal software window. In this example you will utilize the USB capabilities of the CY8C24x93 device.
For more information take a moment to review the earlier posts:
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Project Images
User Modules Used:
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- ADCINC
- SLCD
- Timer16
- USBUART
Firmware Description:
The main.c firmware is included in the example project. Please review the commented sections for more details.
After initiating the user modules the device will loop continuously. The device performs three separate actions: Read the Thermistor, Update the LCD, and Transmit over the USB.
In this project the device is reading an onboard Thermistor to display the ambient temperature. Included in the project are two source files, Thermistor.h and Thermistor.c. These two files support the algorithm for measuring the Thermistor and provide a simple API to the user MeasureTemperature(). This API will return a temperature value to the user. The CY8C24x93 device utilizes the onboard ADC user module to perform all of the conversions from the Thermistor.
Once the Thermistor is read the LCD screen is updated with this value. The value will be displayed to the user to within the tenth of a degree.
Once the LCD is updated the Thermistor values is sent over the USB interface to the host PC. To read this value the user can run a simple Hyperterminal program and connect to the COM port. The hyperterminal program will then display the data as it is transmitted from the device.
Hardware Connections:
There are no hardware configurations for this example. All of the onboard connections have been made. The user will need to connect the PSoC 1 USB connector to the host computer.
Test Your Project:
Build the project and program the PSoC 1 device using the program button in PSoC Designer, Program>Program Part. Once the device has been programmed change the USB connection to the PSoC 1 USB connector. You will see the Thermistor value then displayed on the LCD screen.
To read the data over the USB port launch a Hyperterminal application such as Putty and connect to the COM port. In the Device Manager the PSoC 1 COM port will show up as “Demo (COM#)”.
Once the hyperterminal software is running the values will be displayed in the terminal window.
I hope this example can help you in your design.
Best,
Matt