Electronic – Voltage at output pin of a controller

outputpicpinsport

I would like to ask a simple question. I do have controller whose pins are configured were configured as o/p. The controller runs at 3.3v and it's from the Pic18f family of controllers.Why is it that the o/p pin shows only voltage of 2.23v when configured as o/p. Is it the maximum or should it show >3.0 v.

It's been on my mind for some time. Is it a natural thing or some configuration mishap?

I would like your take on this phenomena.

edit:

Void main() {
    TRISD=0x00;   

    while(1) {
        PORTEbits.RE2=1;
    }   
}

Regarding schematic all the Vdd and Vss pins were connected to 3.3v and gnd respectively.

Best Answer

Well, you're not disclosing the part number of the chip nor the exact schematic, so it's pretty hard to guess, but I'll try.

Take a typical PIC18F part, the PIC18F1220. When operating from a 3V supply, the \$V_{OH}\$ of a port pin looks like this:

enter image description here

You are observing a drop of about 1.07V from Vdd. From the graph, that would typically represent a current draw of about 8mA. So I might guess that you've got about a 200-300 ohm load (to Vss) on the port pin, which is quite a heavy load.

Edit: Given the actual data sheet for the PIC18F in question, a curve similar to the above is not provided, however there is a relevant line in the specifications:

The PIC is guaranteed to provide at least 2.4V provided you draw less than 6mA over the -40~85°C temperature range. Which leads us to the conclusion that the load exceeds 6mA by some margin (since it's probably not 85°C and since 2.23V < 2.4V), as previously concluded.

enter image description here