PDA

View Full Version : TLL Logic? reading 3.3v on a pin?



RFEFX
- 28th September 2010, 04:21
Ok here is the setup

Pic basic pro
PIC16F877A via ICSP

I have a 5vdc board but i have an RF section which requires 3.3v this RF section has an output logic of 3.3v connected to ports A0 - A4 ... the problem i am having is ports A0 - A3 which are TTL. Porta.4 which is an Schmitt trigger input reads the low voltage just fine its the other ports that i get no response with..

do i have to do a special config for these 4 ports?

Setting the TRISA register has no effect.

is there another register i am missing?

Thanks

prstein
- 28th September 2010, 05:22
Add the lines:


ADCON1=7
CMCON=7

Near the top of your program. This should set your analog ports as digital. Then the TRIS register will have an effect.

Best Regards,
Paul

dhouston
- 28th September 2010, 12:03
Porta.4 which is an Schmitt trigger input reads the low voltage just fine...I would expect more trouble with the Schmitt trigger which requires 0.8*Vdd or 4V for logic high.

Anyway, I usually use the circuits shown in FIG 13 or FIG 14 in this App Note http://www.zbasic.net/appNotes/AN213.pdf

RFEFX
- 28th September 2010, 15:16
I would expect more trouble with the Schmitt trigger which requires 0.8*Vdd or 4V for logic high.

i agree but found that the following works well with it.

IF porta.4 != 0 then <label>

Thnx for your help guys

BigWumpus
- 6th October 2010, 00:23
Forget all this TTL-things !
You are in the CMOS-decade !!!!

No one is using TTL-Logic !!!!

Just look in the datasheet and look at the functions of each post-pin !! there is a lot of surprise !!!