Parallel port weirdness

Status
Not open for further replies.

izua

Member level 3
Joined
Oct 31, 2006
Messages
63
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,880
I'm playing with PICs these days, and I've made a little asm program that delivers a memory location bit by bit, via two pins - signal and clock.

I wanted to read this from the parallel port (I'm not sure how to use serial) but it behaves very weird. The clock is really slow (so i can see it with leds, about 800 ms).

First, I noticed that the floating pins are always logic 1. This is a problem. I made a simple construction, with a normally open pushbutton connected to V+ and the collector of a NPN transistor, and the emitter connected, as follows:
- port input
- resistor
- ground

I'm not sure what I did wrong. However, I came with a workaround (which is pretty evil). Since the pin is always floating on 1, i can short it to ground via the transistor, and it will be 0. This approach works, but I don't like the fact that the pin is actually floating.

Here's the picture.
Any ideas?

**broken link removed**

Might it be because I have shorted the transistor because of the absence of a resistor on the base (but the pic has a limit, and in the other mode, it always works) ? The resistor I used is 1K.

If you can, suggest other values, too.
izua
 

Use only pull-up or pull-down resistors (about 10k).
 

Ain't that a pulldown configuration?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…