Closed ecvary closed 7 months ago
Please share your test code, and I'll try it on a board.
Please share your test code, and I'll try it on a board.
``
void setup() { delay(1000); pinMode(p2, INPUT_PULLUP); pinMode(p3, INPUT_PULLUP); pinMode(p4, INPUT_PULLUP); pinMode(p5, INPUT_PULLUP); pinMode(p6, INPUT_PULLUP); pinMode(p7, INPUT_PULLUP); pinMode(p8, INPUT_PULLUP); pinMode(p9, INPUT_PULLUP); pinMode(p10, INPUT_PULLUP); pinMode(p11, INPUT_PULLUP); pinMode(p12, INPUT_PULLUP);
pinMode(pA0, INPUT); pinMode(pA1, INPUT); pinMode(pA2, INPUT); pinMode(pA3, INPUT); pinMode(pA4, INPUT); pinMode(pA5, INPUT); pinMode(pA6, INPUT); pinMode(pA7, INPUT);
pinMode(led, OUTPUT); digitalWrite(led, LOW);
Serial.begin(9600); }
void loop() {
int p2P = digitalRead(p2); int p3P = digitalRead(p3); int p4P = digitalRead(p4); int p5P = digitalRead(p5); int p6P = digitalRead(p6); int p7P = digitalRead(p7); int p8P = digitalRead(p8); int p9P = digitalRead(p9); int p10P = digitalRead(p10); int p11P = digitalRead(p11); int p12P = digitalRead(p12);
int pA0P = analogRead(pA0); int pA1P = analogRead(pA1); int pA2P = analogRead(pA2); int pA3P = analogRead(pA3); int pA4P = analogRead(pA4); int pA5P = analogRead(pA5); int pA6P = analogRead(pA6); int pA7P = analogRead(pA7);
Serial.print(p2P); Serial.print(p3P); Serial.print(p4P); Serial.print(p5P); Serial.print(p6P); Serial.print(p7P); Serial.print(p8P); Serial.print(p9P); Serial.print(p10P); Serial.print(p11P); Serial.println(p12P); delay(100);
}
All work when i remove analog test from sketch. Thanks for respons.
Internal pull up on minicore version 2.2 cannot be used? I made 2 minimum systems, first I made the smd mega328 version, I checked the internal serial monitor pull up on the D6 and D7 had a problem, at first I thought it was a failed chip. then I made a mega328 dip version and the results were the same, pull up pins D6 and D7 didn't work. can you help how to fix it?