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
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog Renesas Envision Kit RX65N Roadtest Part 4E - Analog to Digital Conversion
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: Andrew J
  • Date Created: 11 Dec 2019 8:05 PM Date Created
  • Views 693 views
  • Likes 4 likes
  • Comments 0 comments
Related
Recommended
  • rpbrx65n
  • envision kit
  • renesas

Renesas Envision Kit RX65N Roadtest Part 4E - Analog to Digital Conversion

Andrew J
Andrew J
11 Dec 2019

Limitations for my Roadtest

The RX65N MCU operates at a voltage from 2.7V to 3.6V.  The 12-bit ADC analog input pins voltage is AVss <= Vpin <= AVcc.  AVss and AVcc do not need to be tied to Vcc.  On the Envision board, VCC = AVcc = 3.3V; Vss =AVss = 0V.  There are two 12-bit conversion units: 0 and 1; thus, AVSS0; AVCC0; AVSS1; AVCC1.  The Arduino pins are tied across both groups.

 

Therefore, voltage on the Analog pins must lie between 0V and 3.3V.  I was going to connect this to my PSU, but its Vout for analog conversion is set to 0V to 5V: I could do this with a voltage divider I guess but it’s just going to affect the results. Instead, I will do it via a breadboard: I have an INA260 IC that I can plug in to read Voltage and Current (via I2C) plus a thermistor for temperature readings.  I can simulate other temperature readings with potentiometers.  The Arduino pins provide for both a 5V and 3.3V output which can be used to drive the test circuit, along with an external PSU to drive a range of voltages and currents through the INA260.  So, although not quite what I wanted to do, the principle is exactly the same.

 

Summary of ADC on the RX65N

The MCU provides a 12-bit ADC capability, across 2 units.  Unit 0, for high-speed conversion, has 8 channels and Unit 1, for middle-speed conversion, has 21 channels plus a temperature sensor (for the CPU) output and internal reference voltage.  It uses successive approximation to produce the result.  It can operate in:

  • Single scan mode: input channels are converted in ascending order: 0-7; 0-20.
  • Continuous scan mode: input channels are continuously converted in ascending order: 0.7; 0-20
  • Group scan mode: the 8/21 channels are divided into two or three groups - A & B; A, B & C - and converted in ascending order in each group

Group scan mode is interesting.  Priority scanning can be assigned to group scan mode and a higher priority interrupts a lower priority:  Group A > Group B > Group C.  This would allow you to assign what you consider a more important conversion to be made, overriding others.  For example, if I was using ADC conversion for Voltage and Current (rather than I2C) then I could prioritise this to be higher than the ADC for temperature conversions on the basis that a PSU user is likely to be more interested in V and A than degrees C.  Similarly, I could prioritise the temperature reading of the Linear Regulators higher than the temperature readings of the Bridge Rectifier on the basis that the former will run hotter, and thus be more likely to reach operational limits first.  To make this all work of course, priority triggers cannot ALWAYS override the lower priority triggers otherwise they’d never be read: care and consideration to the triggers must be given.

 

Types of triggers for the ADC are:

  • Software trigger
  • Synchronous trigger: triggers by timers built into the MCU
  • Asynchronous trigger: triggers by external triggers tied to a pin for each Unit (thus, two asynchronous triggers, one for each unit)

 

Conversion speed depends on the resolution mode configured, and assuming the AD conversion clock is running at 60MHz:

  • 12-bit: 0.48uS per channel
  • 10-bit: 0.45uS per channel
  • 8-bit: 0.42uS per channel

There are other features, but these are the main ones.

 

There is a FIT module for the ADC with an application note describing how to configure and use it.  There is a demo available for a number of MCUs/boards, but not the RX65N or Envision board.  However, the ADC functionality for the RX65N is shared with the RX64M and RX71m so the demos should be adaptable from the RSK board they are designed for.  And indeed they are, with minimal change.

 

I have set up a demo project to get this working using the Arduino headers I’ve soldered onto the board and a potentiometer to adjust the voltage.  Here’s a sketch of the circuit:

image

And here’s a (TBH, not very interesting) video of it running.  I’m using a multi-turn pot and haven’t gone down to zero otherwise I’d completely lose you all!  In retrospect, I should have increased the font size, but I think you'll get the idea.

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

 

As you can see, it’s very accurate - between 0 and 5mV different between the conversion and DMM reading.  It remained this accurate throughout the full range of the pot.

 

The code is set up to trigger a reading on a timer, with the actual display of value/reading made through a callback.  I’m taking 10 readings before displaying anything: this slows it down to make it easier to see but also improves the accuracy as the ADC is storing and averaging results.  The flashing “*” is just an indicator of the timer unit triggering (it’s actually toggling every 10 triggers).  I’ve zipped the project and attached it below.

 

Summary Thoughts

This was simple to get from a demo to an alternate working project for the Envision board.  I’m impressed with the accuracy as well.  Apart from that, there’s not much more to say in terms of the demo itself.  The ADC functionality looks to be rich although I doubt I’ll use all the features for this road test.

 

Further Entries

I will update this entry to provide links to further instalments as I create them:

Part One: Introduction

Part Two: Getting Going

Part Three: Development Software

Part Four A: Smart Configuration

Part Four B: User Fit Parts

Part Four C: Segger emWin Introduction

Part Four D: Removal of the LCD

Part Four E: Analog to Digital Conversion (this post)

Part Five: Static Setup of the GUI

Part Six: Getting the Display Working

Part Seven: USB/Serial Interface

 

Roadtest review

 

Also, worth reading Jan Crump's road test as he's taking a more technical approach.

Attachments:
ADC_Demo_Project.zip
  • Sign in to reply
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