|
剛咝辛薒arduino 自帶範例程序 adc_i2V56,下載後工作正常;但 8F328P-U 板再不能下載,會出現以下的警告:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x42
......
有興趣的朋友可以試試,但後果自負。
程序:
- //============================================
- // ADC demo for Larduino w/ LGT8F328D
- // Using new added internal 2.56V reference
- //============================================
- uint16_t value;
- void setup() {
- // put your setup code here, to run once:
- analogReference(INTERNAL2V56);
- Serial.begin(19200);
-
- }
- void loop() {
- // put your main code here, to run repeatedly:
- value = analogRead(VCCM);
- Serial.println(value);
- delay(1);
- }
复制代码
|
|