AnsweredHot!cerebot 32MX4 pic32

Author
yysa05
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2018/08/06 07:04:12
  • Location: 0
  • Status: offline
2018/08/17 09:28:54 (permalink)
0

cerebot 32MX4 pic32

hello,
i am using an starter kit cerebot 32MX4 with pic32, and i want to avoid obstacles, i have an sharp ir range sensor GP2Y0A02YKOF 20-150cm, it has an analog output, i want to configure on channel 14 but i dont know how.
pls help me.
#1
Jim Nickerson
User 452
  • Total Posts : 5842
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: online
Mysil
Super Member
  • Total Posts : 3276
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: cerebot 32MX4 pic32 2018/08/17 11:08:09 (permalink) ☼ Best Answerby yysa05 2018/08/21 05:35:37
5 (1)
Hi,
You may look up the Family Reference Manual section 17:  10-bit ADC.
In the product webpage for the PIC device you have,
https://www.microchip.com/wwwproducts/en/PIC32MX460F512L
open the Documents tab, and scroll for the A/D Converter document.
It have detailed description of the ADC module, with list of what settings to consider, and example code for various modes of operation.
 
When you have a understanding of what is needed,
it may also be possible to use MCC:  Microchip Code Configurator, to make some example code for the AD converter.
Now, MCC do not support the PIC32MX460, so you will have to cheat somewhat.
PIC32MX450... and PIC32MX470F512L have ANSELx registers, and more Analog input pins than your PIC32MX460, which have AD1PCFG registers to choose between Analog and Digital inputs.
Apart from this, the A/D converter itself is very similar.
 
    Mysil
#3
yysa05
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2018/08/06 07:04:12
  • Location: 0
  • Status: offline
Re: cerebot 32MX4 pic32 2018/08/21 05:36:17 (permalink)
0
Tank you,but MCC work on MPLAB? because i use MPLAB not MPLAB X.
post edited by yysa05 - 2018/08/21 06:27:00
#4
qhb
Superb Member
  • Total Posts : 9609
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: cerebot 32MX4 pic32 2018/08/21 21:01:30 (permalink) ☄ Helpfulby yysa05 2018/08/28 10:40:30
5 (1)
yysa05
.... but MCC work on MPLAB? because i use MPLAB not MPLAB X.

No it doesn't.
Yes, there are some good reasons to stick with MPLAB8, but it does mean you will have to write all your own code.
 
You could of course install both versions of MPLAB, and use MCC to generate some code just to have a look at how it did it.
 
#5
Jump to:
© 2019 APG vNext Commercial Version 4.5