Coding and general discussion relating to the compiler
Moderators: David Barker, Jerry Messina
-
skartalov
- Posts: 37
- Joined: Fri Apr 09, 2010 10:50 am
- Location: BULGARIA
Post
by skartalov » Wed Jul 20, 2011 7:04 am
Hi,
I am using 18F452 at 20MHz for a project.
Modules in use: GLCD,SD, UTILS.
I put setalldigital() in the beginning of my prog, but still PORTA.4 is always zero. I cannot set it high.
Why is that?
Any suggestions?
-
octal
- Registered User
- Posts: 586
- Joined: Thu Jan 11, 2007 12:49 pm
- Location: Paris IDF
-
Contact:
Post
by octal » Wed Jul 20, 2011 7:36 am
If I remember, on all (or most) PICs, PortA.4 is an open drain (output) pin, so it won't go high automatically, you need to add a pullup resitor (1K may be enough) to it to make it act as a "normal" output pin.
-
skartalov
- Posts: 37
- Joined: Fri Apr 09, 2010 10:50 am
- Location: BULGARIA
Post
by skartalov » Thu Jul 28, 2011 5:07 am
octal wrote:If I remember, on all (or most) PICs, PortA.4 is an open drain (output) pin, so it won't go high automatically, you need to add a pullup resitor (1K may be enough) to it to make it act as a "normal" output pin.
Yes, in fact - this was the case!
Thanks a lot!