Hi, my name is Bence Kovari from Hungary. I have an FRDM-KEAZ128 board (80 LQFP package). Iam doing ADC, and i would like to use an External Voltage source as Analog Reference. The way i tried: I've checked my Header/Pinout, and connected my own voltage (in this case 1V) to AREF pin, and gnd to gnd (just one pin below AREF). I coded the initialization structure, ADC_Init() etc (works fine so far). I add the line to the code to select external VREF:
ADC_VrefSelect(ADC,0x01);
Then i read the channel ADC_CHANNEL_AD29_VREFH that should show my own external voltage,
but nothing happens. It's still 5V, the internal ref regardless. I've also tried:
ADC_SC2 |=ADC_SC2_REFSEL(0b01); (which i copied from an example source code).
I've checked the Reference manual that describes this topic quite shortly and messy a bit. Or i may have misunderstood something in the vref schematics or channel/pins description. So please if you could tell me how to do this stuff correctly i would really appreciate that!
Sincerely,
B.K.
已解决! 转到解答。
Hi Bence,
From the FRDM-KEA128 schematic, you can get that if you want to use the external reference, you should choose options3.
Answer your question: How should i remove the resistors technically?
You should find an electric soldering iron, then remove R103, R99 and D7, short R109 in the FRDM-KEA128 board. It is the hardware operation.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Bence Kovari,
I found you have some errors:
1. VREFH can't connect to 1V, because from the datasheet you can get that:
You can get that the Min data of VREFH is VDDA/2, you can't connect it to 1V.
2.Select the reference pin pair as the voltage reference
You used this code:
ADC_SC2 |=ADC_SC2_REFSEL(0b01); (which i copied from an example source code).
But from the reference manual, you can get :
If you want to use the VREFH and VREFHL, you should choose REFSEL=00.
3. Take care the hardware
You can find the schematic of FRDM-KEA128 from this link:
If you want to connect the VREFH to the voltage which you want, you should remove R103, R99, then connect VREFH to the voltage which you want, otherwise, VREFH is still connected to the VDD_MCU.
Wish it helps you!
If you still have question, please kindly let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry Zhou,
First of all let me say thank you for answering me. The 1V was just a suddenly improvised value, my aim is to apply 3.3V, and by now i have noticed the hardware voltage limits as well. The voltage reference selection in the software is clear also. Some question arises in relation to the third part. How should i remove the resistors technically? I stumbled upon those resistance removing schematics while seeking the solution, but its implementation puzzled me a bit. If you could share any practical methods i would be really grateful.
Thank you for your kindness again,
Bence Kovari
Hi Bence,
From the FRDM-KEA128 schematic, you can get that if you want to use the external reference, you should choose options3.
Answer your question: How should i remove the resistors technically?
You should find an electric soldering iron, then remove R103, R99 and D7, short R109 in the FRDM-KEA128 board. It is the hardware operation.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
Presuming this soldering operation made me believe that may be any other solutions. So if there is no other way to use external reference without modifying the hardware itself then im gonna need to prepare my soldering kit quite soon :smileyhappy: Just a little part of me hoped it was managable with jumpers or something like that. Thank you for your help once again, will give a feedback as soon as i'm finished.
Best wishes,
Bence