PIC16F690 port B

78 views
Skip to first unread message

Pete

unread,
Nov 4, 2011, 10:34:18 AM11/4/11
to pickit-devel
Going through Chuck Hellebuyck's book 2 chapeter 10 driving stepping
motors. Understand it all and it works fine. Try to change the
output port from C to B in order to free up the 8 pins in port c for
something new. I wrote:

PORTB = 0x00;
TRISB = 0x00'

case 1;
RC4 = 1;
RC5 = 1; etc.

and changed the "switch" steps to port B. Nothing works. I don't
understand why. Is there something about port b that is hard to
understand?

Sincerely,
Pete Lefferson

Rufus

unread,
Nov 5, 2011, 1:47:01 AM11/5/11
to pickit-devel
Is there an ANSELB on the chip you are using?

You may need ANSELB = 0;

Rufus

unread,
Nov 5, 2011, 2:02:46 AM11/5/11
to pickit-devel
Checked the Data sheet. B4 and B5 are AN10 and AN11.

If you're not using analog, use:

ANSELH = 0;

Oops, never mind. Data sheet says ANSEL doesn't disable outputs....

Peter Lefferson

unread,
Nov 5, 2011, 12:26:57 PM11/5/11
to pickit...@googlegroups.com
Thank you so much for thinking about my problem. I solved it. So simple
! It was a bit setting.

God bless,
Pete Lefferson

--
You received this message because you are subscribed to the Google Groups
"pickit-devel" group.
To post to this group, send email to pickit...@googlegroups.com.
To unsubscribe from this group, send email to
pickit-devel...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pickit-devel?hl=en.

Peter Lefferson

unread,
Nov 5, 2011, 12:28:41 PM11/5/11
to pickit...@googlegroups.com
Again I thank you. The chip has a million switches that must be set
carefully. At least this has be a study of the chip.

God bless,
Pete Lefferson

-----Original Message-----
From: pickit...@googlegroups.com [mailto:pickit...@googlegroups.com]
On Behalf Of Rufus
Sent: Saturday, November 05, 2011 1:03 AM
To: pickit-devel
Subject: [pickit-devel] Re: PIC16F690 port B

ANSELH = 0;

--

Reply all
Reply to author
Forward
0 new messages