Skip to content

Analog pin seems not to be an input #164

@BrixInMotion

Description

@BrixInMotion

I'm having problems reading the analog pins on an XMC4700.

A. XMC4700 Relax Kit for 5V Shields
B. Lib Version 1.5.0
C. Arduino IDE Version 1.8.13
D. No extra lib, Hardware: 100k Potentiometer

All analog pins behave the same: When I ramp up the voltage with the potentiometer everything works fine until 1V. Afterwards it looks like in the picture below.
analogRead_bug

According to the picture, the Serial output prints random values between 0 and 1023.
For me it looks like the pin is defined as output and is not floating. I'm using minimal code.

uint16_t result = 0;  
void setup() {  
   Serial.begin(115200);  
   wiring_analog_init();  
}  
void loop() {  
  result = analogRead(A5);  
  Serial.println(result);  
  delay(500);  
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions