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 support@ccsinfo.com

Electronics Question...

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







Electronics Question...
PostPosted: Fri Feb 24, 2006 9:38 pm     Reply with quote

Guys I a looking for a circuit that can perform the following,,,


When PIC output is High (5V) it will go thru the circuit and the circuit will output (5V)

When PIC output is Low (0V) it will go thru the circuit and the circuit will output (-5V) instead of 0 V


any recomendation??
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Feb 24, 2006 10:36 pm     Reply with quote

Do you want this exact thing, or do you really want an RS-232
level translator ?
CCS ADDict
Guest







PostPosted: Fri Feb 24, 2006 10:56 pm     Reply with quote

I want to generator a sequence using PIC....

like from PIN A0...

5V -5V 5V 5V -5V -5V 5V 5V 5V -5V -5V -5V with 1 sec delay in between.


To produce 5 V,,, I can easily just OUTPUT_High(PIN_A0)....

but to produce -5 V,,, PIC can't do that...right?

so I need additional external circuit/IC to produce -5V...may I know how can I achieve that?
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

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

PostPosted: Sat Feb 25, 2006 1:20 am     Reply with quote

CCS ADDict wrote:

so I need additional external circuit/IC to produce -5V...may I know how can I achieve that?


If you have only a +5V supply, then yes - you need an additional something for -5V. If you don't need a lot of current, you can use a charge-pump inverter such as TC7660. It's simple, small and it requires only several additional 0.1uF capacitors to run. Of course it's not the only solution... Where do you get +5V from?

If you have an RS-232 transceiver in your system such as MAX232, you can get -10V from it. There will be a lot of ripple, but you cam mitigate this by adding large capacitors. This is a fairly non-orthodoxal approach.
CCS ADDiCT
Guest







PostPosted: Sat Feb 25, 2006 5:25 am     Reply with quote

I think...TC7660 is a nice 1 for me..
bvq
Guest







Bipolar O/P
PostPosted: Sat Feb 25, 2006 12:06 pm     Reply with quote

I would make a +/-5V bipolar supply using a simple DC-DC converter (or Maxim style charge pump IC). Then feed the I/O pin to a bipolar supply comparator with the threshold set to about 2.5V. When the O/P > 2.5V the comparator will O/P 5V and when the I/O is < 2.5V the comparator will O/P -5V.

You could make the comparator from a couple of transistors configured as a long tail pair.
CCS ADDiCT
Guest







Re: Bipolar O/P
PostPosted: Sun Feb 26, 2006 3:57 am     Reply with quote

bvq wrote:
I would make a +/-5V bipolar supply using a simple DC-DC converter (or Maxim style charge pump IC). Then feed the I/O pin to a bipolar supply comparator with the threshold set to about 2.5V. When the O/P > 2.5V the comparator will O/P 5V and when the I/O is < 2.5V the comparator will O/P -5V.

You could make the comparator from a couple of transistors configured as a long tail pair.


sound like exactly what I did...dude...

have any schemactic sample or link..stuff??
SherpaDoug



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

View user's profile Send private message

PostPosted: Sun Feb 26, 2006 1:46 pm     Reply with quote

If the +5V and -5V don't have to be very accurate you could use a MAX232 chip. To disable the voltage doubler just leave out C1 from pins 2 to 3 and connect pin 2 to VCC.
If you need accurate +/-5V you will need to get them from regulators and then they can be applied to pins 2 and 6 of a MAX232 if you leave out C1 and C2 (pins 4 and 5). Or you can use any other RS232 driver running from +/-5V.
_________________
The search for better is endless. Instead simply find very good and get the job done.
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