PDA

View Full Version : Help



4u2n
- 22nd September 2004, 19:10
I want to learn program a pic in basic

I have try many thing but can't get work

Can some on help to defint the start of the PIC BASIC PROGRAM


I want to have RB0 to RB5 to be OUTPUT
and RA0 to RA3 to be INPUT

The input/output is aktiv at +5v

alle have to sit to To as not aktiv..

The chip i a 16F628A

please help

Dwayne
- 22nd September 2004, 21:40
Hello

4u2n>>I want to learn program a pic in basic

I have try many thing but can't get work

Can some on help to defint the start of the PIC BASIC PROGRAM
<<

There are many examples on the site....

If you want to compile the programs, there is a site called.

www.compilespot.com

This site will allow you to use the compiler to a limited extent.


4u2n>>I want to have RB0 to RB5 to be OUTPUT <<
and RA0 to RA3 to be INPUT<<


well, a start can be something like this... I don't have the chips specs, but this will probably be a good start.


TRISA=%00001001
TRISB=%00000000

if Porta.0=1 then Portb.0=1
else Portb.0=0
endif

if Porta.3=1 then Portb.5=1
else Portb.5=0
endif


this is the best that I can do...I do not fully understand your question, but I think this is a start for you.


Dwayne