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.

PIC - Outputting variable voltages

Status
Not open for further replies.

ronsimpson

Well-Known Member
Most Helpful Member
superflux,
You did not understand my last post about driving a LED. You do not have one output =1 and the other =0!
The pins have three states. 1, 0, Z (z=input)
pin1, pin2, current
0, 0, 10mA
Z, 0, 8mA
0, Z, 2mA
Z, Z, 0mA
 

superflux

New Member
superflux,
You did not understand my last post about driving a LED. You do not have one output =1 and the other =0!
The pins have three states. 1, 0, Z (z=input)
pin1, pin2, current
0, 0, 10mA
Z, 0, 8mA
0, Z, 2mA
Z, Z, 0mA

On the contrary, I did understand and I thought it was a good solution.

I was simply asking if the when 2 or more PORTs are set to OUTPUT and are connected and one of them is "1" and the other is "0", does that "0" represent 'ground' and if so, can I assume that it will ground out the voltage sent from the other connected PORT that is set to "1" (high)?

I guess what I'm asking is when an OUTPUT port is set to "0" is that GROUND or just 0 volts?
 
Last edited:

ronsimpson

Well-Known Member
Most Helpful Member
0=0 volts, 1=supply voltage, assuming the current is low. Z= any voltage from 0 to supply and no current.
 

superflux

New Member
PWM is a much better way to drive an LED, why wouldn't you want to use it?

During the ADC process, where I sample with a delay between each of the 8x sample reading, I would get a bright blip out of the LED.

I use PWM for many other projects, but I since I need that longer sample time, I don't want to run into issues with it.

Is the R2R ladder not a good solution in your opinion?
 

be80be

Well-Known Member
During the ADC process, where I sample with a delay between each of the 8x sample reading, I would get a bright blip out of the LED.

I use PWM for many other projects, but I since I need that longer sample time, I don't want to run into issues with it.

Is the R2R ladder not a good solution in your opinion?

You can go from 0 to 5 and full on at any voltage.

You have no duty to worry about.

I've done some things with leds and R2R make the leds look like there on fire
I couldn't get it to work with pwm
 
Last edited:

be80be

Well-Known Member
All blip can be fixed with software. Some time down the road if you don't run out of time lol
 

superflux

New Member
I can probably program the LED PWM in the ADC delay, but if the R2R ladder works just as well, then why bother with the extensive programming?
 

be80be

Well-Known Member
I can probably program the LED PWM in the ADC delay, but if the R2R ladder works just as well, then why bother with the extensive programming?

That's what I think keep it simple R2R 10 lines PWM a page and 2 week making it do what you want.

What's in your code LOL
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top