element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Reading in a 0V - 5V Analogue voltage on the PSOC 4 Pioneer board
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 15 Nov 2013 10:50 AM Date Created
  • Views 1068 views
  • Likes 0 likes
  • Comments 1 comment
  • pioneer
  • pioneer_kit
  • psoc4
  • psoc
Related
Recommended

Reading in a 0V - 5V Analogue voltage on the PSOC 4 Pioneer board

Former Member
Former Member
15 Nov 2013

This confused me for a bit so if the following helps anyone then great.

 

Here is my circuit diagram..

C0YVPZT.png

 

The problem I was having was assuming that using a single ended ADC input at 12 bits was going to give me 0 for 0V and 4096 for 5V.

However the reality is different, if you look at the ADC data sheet on page 8 it says that the maximum value you can get from a single

ended input is 11 bits.

 

So the maximum you can get is 2047, the output is always signed.

 

Here is my ADC config

yDOb3TP.png

 

The other thing you need to watch out for is what voltage is the board powered by. You will need to change jumper J9 into 5V, it comes 3.3V as default.

Also you need to change the system tab in the .cydwr file to 5V VDDA or the calculations will come out wrong, this is set to 3.3V default too.

6kt0IOH.png

 

I am using a potentiometer on the input but if you want to quickly test if it is working you could just wire directly from the ADC pin to the 5V, 3.3V and 0V supplies

on the board like so..

3ga1EuS.jpg

 

Here is my source code.. (it is all included in the project below)

KrEhBHX.png

 

Incase it helps anyone this is the thread I opened on the Cypress forums asking for help, it explains all the problems I ran into there..

https://secure.cypress.com/?app=forum&id=4749&rID=88221

 

I have attached my project so you can use it too.

Attachments:
5V ADC Measurement.Bundle01.zip
  • Sign in to reply
  • DAB
    DAB over 12 years ago

    Good post.

     

    It always pays to check the fine print on the defaults.

    Like you, I would have assumed that the 12 Bits were 0 to 5v.

     

    Thanks,

    DAB


    • 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