CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Output_low not 0V

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
miky_boy



Joined: 11 Jan 2008
Posts: 8

View user's profile Send private message

Output_low not 0V
PostPosted: Wed Nov 05, 2008 10:47 pm     Reply with quote

Hi guys, I made my program and I use some ports of the pic to make a selection of an opamp gain. To make this selection I use only output_low and output_float in pic ports connected to a some resistances, when I use output_float it put high-z so it's okay, but when I select output_low it doesn't send 0V, it sends around 10mv. With this value it change the final result in opamp, because the input voltage is so low too.
In the ground at LM7805 the value is 0V fixed, but in port of pic isn't.
I searched a lot but I can't find any similar situation, if anybody can help me or have suggestion I will be very appreciative.
Very thank's in advice.
Strong regards,
Miky
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Nov 05, 2008 11:26 pm     Reply with quote

Take a look at the data sheet. There is no minimum spec for VOL, but there is a max. Its 0.6V for the chip I happen to be looking at, and it's probably similar for all of them. In short, there's no guarantee the low output voltage will be zero. Considering you're looking at a MOSFET with some amount of ON-state resistance, you're probably never going to see exactly 0V. It's probably also going to vary somewhat with supply voltage, temperature, etc.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Nov 05, 2008 11:53 pm     Reply with quote

As a simple fact, a CMOS digital processor output is no analog signal, although it can be used for this purpose in many cases (e. g. for 8 or 10-Bit accuracy). The observable residual voltage has two main sources: finite on-resistance of the output driver when sinking current and voltage drops at the uP internal ground net.

If you need analog signal quality with a digital signal, you should use an analog switch. Also a separate single gate driver may overcome the problem of voltage drops. However, you should be aware, that an analog switch and even a mechanical relay have finite on-resistances.

You should study professional circits, e. g. of measurement equipment, how they handle similar problems. Also major analog IC vendors (Analog, TI, Maxim, Linear) applications notes can be expected to present solutions that don't depend on partly unspecified properties of digital components.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Nov 06, 2008 7:00 am     Reply with quote

A better way to do this is to have the PIC drive a discrete MOSFET to switch your analog signal. Digital PIC pins have very loose voltage specs and tend to be noisy too.
_________________
The search for better is endless. Instead simply find very good and get the job done.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

try this part
PostPosted: Thu Nov 06, 2008 11:40 am     Reply with quote

Typically where a LOW offset from ground is required
I use an 2n7000 or 2n7002 for up to 50 ma current SINKING.

Pic drives the drive gate thru 270 ohms with a shunt to
ground of 10k or so.

Even with 50 ma and a 12V source on the MOSFET side - offsets as low as 20-30 mV are possible.
miky_boy



Joined: 11 Jan 2008
Posts: 8

View user's profile Send private message

PostPosted: Fri Nov 21, 2008 11:52 am     Reply with quote

Hi guys thank's to all answers.
Okay I don't know that in datasheet says this problem, we never look at the final pages Smile, but yes I found it and I understand the problem.
I look around and I see analog switch like some of you said, and it's done, I used 4066 and it's work great, I have only to change the pic output ports to high and low, before is low and hi-z, and I had 0v in output of this 4066 device.
So I have to thank to all that help me in this question, I'm so sorry to this delay, but only now this project it's done and I have finished my high-school.
Very thank's and strong regards Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group