һЩעÒâµã
1 Ìá¸ß²ÉÑùʱ¼ä
Èç¹ûÌõ¼þÔÊÐí£¬¿ÉÒÔ¾¡¿ÉÄܵÄÌá¸ß²ÉÑùʱ¼ä£¬ÕâÑùת»»½á¹û¿ÉÒÔ¸üÎȶ¨Ò»Ð©¡£
2 MSP430F5438ûÓÐREFÄ£¿é
ÏÖÔÚ¿ÉÒÔÔÚTI¹ÙÍøÉÏÏÂÔصõ½µÄʾÀý´úÂë»òÊý¾ÝÊÖ²á²Î¿¼ÊÖ²áµÈ£¬¶¼ÊÇΧÈÆMSP430F5438AµÄ¡£µ«ÊÇÊÐÃæÉϺܶàMCU»¹ÊÇMSP430F5438£¬ÆäʵMSP430F5438AºÍMSP4305438ÊÇÓÐÇø±ðµÄ£¬MSP430F5438ûÓÐREFÄ£¿é£¬ËùÒÔʹÓÃƬÄÚµÄ2.5²Î¿¼µçÔ´»¹ÊÇÓÐЩ²»Îȶ¨µÄÒòËØ¡£¿ÉÒÔͨ¹ýÒÔϵÄʵÏÖ²âÊÔһϣ¬ADת»»µÄÄ¿±êÒÀÈ»ÊÇLDOÊä³ö¡£
ÐèÒªÐÞ¸ÄÒÔϼ¸¸ö²¿·ÖµÄ´úÂë
µÚÒ»£º
ADC12CTL0 = ADC12SHT0_15 + ADC12SHT1_15 + ADC12ON; ÐÞ¸ÄΪ
ADC12CTL0 = ADC12SHT0_15 + ADC12SHT1_15 + ADC12ON +
ADC12REF2_5V + ADC12REFON;
ʹÓôò¿ªÆ¬ÄÚ2.5V²Î¿¼µçÔ´
µÚ¶þ:
ADC12MCTL0 = ADC12SREF_0 + ADC12INCH_11;ÐÞ¸ÄΪ
ADC12MCTL0 = ADC12SREF_1 + ADC12INCH_11;
ת»»²Î¿¼µçѹΪVref£¬¼´ÐÞ¸Ä1ÉèÖõÄ2.5V²Î¿¼µçÔ´
µÚÈý:
float ldo_voltage = ADC12MEM0 / 4096.0 * 3.3 * 2;ÐÞ¸ÄΪ
float ldo_voltage = ADC12MEM0 / 4096.0 * 2.5 * 2;
Ì滻ת»»¹«Ê½£¬²Î¿¼µçѹÓÉ3.3V±äΪ2.5V