element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Connected Cloud Challenge
  • Challenges & Projects
  • Design Challenges
  • Connected Cloud Challenge
  • More
  • Cancel
Connected Cloud Challenge
Blog The Bio Highway – Exploring ADC with Cypress ModusToolbox and Device Configurator
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vlasov01
  • Date Created: 20 Apr 2020 4:10 AM Date Created
  • Views 983 views
  • Likes 2 likes
  • Comments 1 comment
  • community
  • ide
  • modustoolbox
  • psoc 6
  • psoc training
  • adc
  • cypress
Related
Recommended

The Bio Highway – Exploring ADC with Cypress ModusToolbox and Device Configurator

vlasov01
vlasov01
20 Apr 2020

Plan for The Week

 

My plan for this week was pretty simple - enable reading of analog data from on-board thermistor using ModusToolbox. It is an important step to convert Arduinio code for heart beat sensor to PSoC 6 and specifically to my board CY8CPROTO-062-4343W.

 

Training

I watched several training videos on how to use ModusToolbox. One of them was explaining how to use Device Configurator tool of ModusToolbox to configure UART. I was not able to find ModusToolbox videos for ADC configuration.

Welcome to ModusToolbox: #2 Configuring PSoC Devices

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Than I watched another video on how to configure PSoC 6 to read Analog signal, but it was based on PSoC Creator IDE.

PSoC 6 101: Lesson 2-6 Basic PSoC 6 Analog Features

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The training materials are great. I like how Alan Hawse present complex subjects. So I highly recommend them. But by the end of my training I've realized that there is a big difference in IDEs between PSoC Creator, ModusToolbox 1.0 and ModusToolbox 2.x. And I don't think that projects can't be easily migrated between them. It seems that PSoC Creator is a great tool, but only works on Windows platform. So Cypress released a new Eclipse based IDE - ModusToolbox in 2018. And it supports Linux and MacOS in addition to Windows, but PSoC Creator training materials can't be directly applied to the new IDE.

 

Configuration

I've created a new blinky project and launched Device Configurator. I've enabled SAR ADC in Peripherals tab and set some of its parameters based on training videos I've watched.

Fullscreen contentimage_134640.html Download
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

Then I've read specification of the board related to thermistor.

Fullscreen contentimage_134641.html Download
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

Then I've switched to Device Configurator - Pins tab and configured connection to the thermistor output on pin 10-1.

Fullscreen contentimage_134642.html Download
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

Device Configurator - Errors

When I start saving configuration I've got several errors. I'll try to fix them shortly, so I can continue my progress on the project.

Fullscreen contentimage_134643.html Download
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>

Meantime, I'm trying to get some advice form the community. I've published question related ADC configuration on Cypress community board and send related question to Alan Hawse as it was recommended on his training video.

  • Sign in to reply
  • saicheong
    saicheong over 5 years ago

    The photo under element14 community seen currently out of order......so i don't know what wrong with your config.

     

    Under Device Configurator you need config the ARef, Clock, GPIO and connect together under Peripherals>Programmable Analog>12-bit SAR ADC.

    After that you need to call Cy_SAR_Init and Cy_SAR_Enable ..... which may sophisticate.

     

    As for simple Analog Input,  just use https://cypresssemiconductorco.github.io/psoc6hal/html/group__group__hal__adc.html ,

    as the description said this is High level interface, so leave the Device Configurator default (no Analog port tick, SAR no tick, Aref no tick, all close).

    following the instruction and just change the P10_0 to your analog input. The code should work.

    If you study the code inside, the cy_hal_dac accuracy build, setup and init all of relative SAR,clock,ARef....., if you config those under Device Configurator, they will conflict and not work.

     

    The Device Configurator give you more flexible but it harder to setup, as cy_hal_adc easy of use and most case it should work.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube