I am using the following switch to power a PCB, The PCB will be powered using Li-Poly Battery(4.2V).
10 Pcs 12V Switch, XCOZU 20A 12 Volt Switch Auto Switch 5 Color Led Rocker Switch Car Light Switches, DC Rocker Switch Round Automotive Illuminated Switch On Off Toggle Switch: Amazon.co.uk: Car & Motorbike
Therefore the LED on this switch is also powered using the 4.2V.
When I measure the cathode pin on the switch is measure about 1.8V.
Is there a reason why this can pin can not be directly connected to a GPIO pin on an XMEGA? As seems to have a resistor inbuilt into it.