Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to change the output voltage?

Status
Not open for further replies.
Hi,

I am using a microcontroller.
if Input Port A is '0', then the output of the Port B is 3.0 V and 0.0 V
if Input Port A is '1', then the output of the Port B is 5.0 V and 0.0 V

How to realize that?

Thanks
 
janetsmith2000@yahoo.com said:
Hi,

I am using a microcontroller.
if Input Port A is '0', then the output of the Port B is 3.0 V and 0.0 V
if Input Port A is '1', then the output of the Port B is 5.0 V and 0.0 V

How to realize that?

Your question is rather vague and doesn't really make much sense?. Try giving more details, also you probably shouldn't be saying 'port', more likely you mean 'pin'?.
 
janetsmith2000@yahoo.com quote
I am using a microcontroller.
if Input Port A is '0', then the output of the Port B is 3.0 V and 0.0 V
if Input Port A is '1', then the output of the Port B is 5.0 V and 0.0 V
Seems like you want to chenage the logic levels definition for port B depending on port A state
Well the microcontroller I have worked with this is not possible with software.
Which microcontroller you are using?
 
err...not possible with the software?
 
Yes, I know additional software is required.

I am using PIC16F628A.

My idea is, based on the input, uC can change the connection of the circuit (open or close), thus the supply voltage (vdd) of uC become 5V or 3V, and affect the output voltage of uC.

I am not sure if PIC can run at 3V or not.

btw, i cann't find the LF series (3.3V) of PIC from microchip.com


Thanks.
 
It is not recommended to switch the power supply of the microcontroller when it is running
Beacause if you dont take proper care in the switching circuit than it might cause the microcontroller to reset or certain inputs to go out of specifications which can damage the IC
If you can describe your application requirements and exactly what you want to do we may be able to provide you different ideas
 
Hi,

Basically i am doing some Smart card application. I need to interface with smart card.

although MAXIM and other IC company provides level-shifter for smart card interface IC, but i try to see if i can avoid to use them.

as far as i know, level-shifter ic is shift the voltage plus output some defined bit for certain operation. I guess i can produce the defined bit by using uC. I am not sure if I can change the ouput voltage level of uC.

Smart card needs 2 input voltage (VCC and VPP), and 1 IO pin.

The thing is smart card may run at 3 kind of voltage, 5v, 3v and 1.8v.
and also the smart card may run at different clock speed.

The way to determine the voltage and clock speed required is 1st sendind and ATR request, using a predefined initial frequency, and the card will return all the operating condition.

So I will need to change the voltage level and frequency aft the 1st ATR.
 
At least now you give some clue as to what you are asking! - the same question has been discussed various times previously in these forums, it's probably best if you read those rather than starting yet another thread.

Basically it depends on the exact devices either end - using an LF series PIC would solve the problem in one easy step. Or, a 5V PIC can receive data from a 3.3V device without any problem, and if the 3.3V device has protection diodes you only need a single resistor to feed it - if it doesn't have protection diodes you require a diode as well).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top