PDA

View Full Version : HElp Please.



joseluistajada
- 15th October 2009, 17:30
Im using a 16f690 pic and PBP2.46, and PBP 2.5
I have many problems to use a simply code, example

init:

High PORTC.5
High PORTC.4
High PORTC.3

High PORTC.6
High PORTC.7
High PORTB.7

GOTO init

This code dont work good. Many outputs donīt work fine at this code, outputs are a impredecible state.
What are the problem...

Any solution?...

Dave
- 15th October 2009, 18:47
joseluistajada, Have you set the TRIS register to determine which ports will be inputs and outputs?

Dave Purola,
N8NTA

Darrel Taylor
- 15th October 2009, 19:38
ANSEL = 0
ANSELH = 0

- OR -


INCLUDE "ALLDIGITAL.pbp (http://www.picbasic.co.uk/forum/showthread.php?t=11100)"

Glenn
- 15th October 2009, 20:46
joseluistajada, Have you set the TRIS register to determine which ports will be inputs and outputs?


You dont need to set the pins to outputs when using "high" and "low".

It's probably the analog part that is the problem just as darrel writes.

mackrackit
- 15th October 2009, 21:22
PBP did not support this chip before the patch of 2.46.

Go here to get the patch
http://www.melabs.com/support/upgrade.htm#pbp